Most Popular
1500 questions
226
votes
8 answers
When does /tmp get cleared?
I'm taking to putting various files in /tmp, and I wondered about the rules on deleting them?
I'm imagining it's different for different distributions, and I'm particularly interested in Ubuntu and Fedora desktop versions.
But a nice general way of…

John Lawrence Aspden
- 2,536
- 4
- 17
- 12
226
votes
6 answers
How do I view the details of a digital certificate .cer file?
I am using Windows and have been given a .cer file. How can I view the details of it?

yazz.com
- 7,193
- 15
- 38
- 39
225
votes
10 answers
How to check if a library is installed?
In Linux, how do I check if a library is installed or not? (from the command line of course).
In my specific case now, I want to check whether libjpeg is installed.

hasen
- 2,534
- 2
- 18
- 12
224
votes
7 answers
How do you add a Windows environment variable without rebooting?
I would like to add an Environment variable to a Windows machine (desktop or server) and be able to use it without rebooting that machine.
Say you have a production server which hosts a variety of apps and a new app needs a particular Environment…

Chad Braun-Duin
- 2,259
- 3
- 15
- 11
223
votes
13 answers
How do I load a sql.gz file to my database? (importing)
I'm trying to import a gzipped SQL file into mysql directly. Is this the right way?
mysql -uroot -ppassword mydb > myfile.sql.gz

Alex
- 8,471
- 26
- 75
- 99
222
votes
14 answers
Shell command to monitor changes in a file
I know there was a command on Unix that I could use to monitor a file and see changes that are getting written to it. This was quite useful especially for checking log files.
Do you know what it is called?

Sebastian Hoitz
- 3,169
- 3
- 24
- 19
222
votes
3 answers
What is the difference between Unix sockets and TCP/IP sockets?
It's from this answer:
https://stackoverflow.com/questions/2482411/is-this-pdo-bug-fixed-now/2482424#2482424
When the host is "localhost", MySQL Unix clients use a Unix socket, AKA Unix Domain Socket, rather than a TCP/IP socket for the connection,…

apache
- 3,227
- 7
- 27
- 25
221
votes
3 answers
How can I override CMD when running a docker image?
I want to inspect a docker image created by someone else with both an entrypoint and cmd specified, for example:
ENTRYPOINT ["/usr/sbin/apache2ctl"]
CMD ["-D", "FOREGROUND"]
I currently do:
docker run --interactive --tty --entrypoint=/bin/bash…

warp
- 2,429
- 2
- 15
- 6
219
votes
13 answers
Any benefit or detriment from removing a pagefile on an 8 GB RAM machine?
I'm running Windows 7 on a dual core, x64 AMD with 8 GB RAM.
Do I even need a page file?
Will removing it help or hurt performance?
Would it make a difference if this is a server or a desktop?
Does Windows 7 vs. Windows 2008 make a difference with a…

Jason
- 3,247
- 9
- 27
- 28
218
votes
11 answers
"Add correct host key in known_hosts" / multiple ssh host keys per hostname?
Trying to ssh into a computer I control, I'm getting the familiar message:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! …

Samuel Edwin Ward
- 2,363
- 3
- 14
- 12
217
votes
8 answers
Setting the hostname: FQDN or short name?
I've noticed that the "preferred" method of setting the system hostname is fundamentally different between Red Hat/CentOS and Debian/Ubuntu systems.
CentOS documentation and the RHEL deployment guide say the hostname should be the…

Cakemox
- 25,209
- 6
- 44
- 67
213
votes
6 answers
Nginx config reload without downtime
I use nginx as a reverse proxy.
Whenever I update the config for it using
sudo "cp -r #{nginx_config_path}* /etc/nginx/sites-enabled/"
sudo "kill -s HUP `cat /var/run/nginx.pid`"
I face a brief downtime. How can I avoid that?

Saurav Shah
- 2,245
- 2
- 14
- 4
213
votes
11 answers
How to read backward from the end of file in less or more?
I've found one way so far: less +G filename, but it scrolls up line-by-line only with ↑.
What's a more powerful less usage which provides scrolling by page, backward pattern search, and so on?

yetanothercoder
- 2,235
- 2
- 14
- 6
212
votes
16 answers
How do diff over ssh?
How do I diff files/folders across machines provided that the only connectivity available is ssh?

Alexey Timanovsky
- 3,471
- 3
- 19
- 8
211
votes
18 answers
How to use rsync over FTP
Any unix:
I have the following cmd line which works fine.
rsync -avr -e ssh /home/dir user@example.com:/home/
But I need to set it up now to rsync to a remote server that only has an FTP server on it.
How do I go about that?
I looked at the rsync…

bumperbox
- 2,313
- 3
- 16
- 13