Most Popular

1500 questions
185
votes
16 answers

Why is DNS failover not recommended?

From reading, it seems like DNS failover is not recommended just because DNS wasn't designed for it. But if you have two webservers on different subnets hosting redundant content, what other methods are there to ensure that all traffic gets routed…
Lin
  • 2,949
185
votes
14 answers

How to create a UUID in bash?

In Java it is possible to create a random UUID: UUID uuid = UUID.randomUUID(); How to do this in Bash?
raoulsson
  • 4,813
184
votes
31 answers

How do I prevent accidental rm -rf /*?

I just ran rm -rf /* accidentally, but I meant rm -rf ./* (notice the star after the slash). alias rm='rm -i' and --preserve-root by default didn't save me, so are there any automatic safeguards for this? I wasn't root and cancelled the command…
184
votes
61 answers

Good tools that fit on a thumb drive

I have been on the lookout lately for some good tools to fill up my flash drive and I thought I would ask the Server Fault community for recommendations on good tools that will fit onto a thumb drive. Some I use are Driver Packs, CCleaner and the…
Shard
  • 1,432
183
votes
12 answers

What does "Warning: untrusted X11 forwarding setup failed: xauth key data not generated" mean when ssh'ing with -X?

When I use ssh -X on my Mac (running OS X 10.6.7) to connect to my Ubuntu (11.04) box, I get the following warning: Warning: untrusted X11 forwarding setup failed: xauth key data not generated Warning: No xauth data; using fake authentication…
183
votes
18 answers

How do you restart php-fpm?

I need to reload my php.ini and there's nothing in the help dialog about restarting it.
Galen
  • 1,983
183
votes
5 answers

What is the difference between Load Balancer and Reverse Proxy?

I'm not clear about the difference between Load Balancer and Reverse Proxy. They both seems having same behavior: distributing incoming requests to backend servers.
Morgan Cheng
  • 2,174
  • 2
  • 16
  • 13
181
votes
8 answers

How do I sleep for a millisecond in bash or ksh

sleep is a very popular command and we can start sleep from 1 second: # wait one second please sleep 1 but what the alternative if I need to wait only 0.1 second or between 0.1 to 1 second ? remark: on linux or OS X sleep 0.XXX works fine , but…
yael
  • 2,473
180
votes
2 answers

How do you answer yes for yum install automatically

In centos how do you answer yes automatically for yum install so that it is an unassisted install?
DiverseAndRemote.com
  • 2,101
  • 3
  • 16
  • 16
180
votes
11 answers

Run an interactive bash subshell with initial commands without returning to the ("super") shell immediately

I want to run a bash subshell, (1) run a few commands, (2) and then remain in that subshell to do as I please. I can do each of these individually: Run command using -c flag: $> bash -c "ls; pwd; " however, it immediately…
180
votes
18 answers

Disk full, du tells different. How to further investigate?

I have a SCSI disk in a server (hardware Raid 1), 32G, ext3 filesytem. df tells me that the disk is 100% full. If I delete 1G this is correctly shown. However, if I run a du -h -x / then du tells me that only 12G are used (I use -x because of some…
initall
  • 2,375
  • 3
  • 18
  • 19
180
votes
8 answers

Sudo as different user and running screen

Found out today that running screen as a different user that I sudo into won't work! i.e. ssh bob@server # ssh into server as bob sudo su "monitor" - screen # fails: Cannot open your terminal '/dev/pts/0' I have a script…
sdot257
  • 3,069
177
votes
5 answers

What's the difference between authorized_keys and authorized_keys2?

Just wanted a quick summary of the differences between them and why there are two?
Jon
  • 2,131
176
votes
7 answers

How can I read pcap files in a friendly format?

a simple cat on the pcap file looks terrible: $cat tcp_dump.pcap ?ò????YVJ? JJ ?@@.?E
Tony
  • 4,253
176
votes
9 answers

Is it possible to detach a process from its terminal? (Or, "I should have used screen!")

Possible Duplicate: Can I nohup/screen an already-started process? On Unix (specifically, Linux), I've started a job in a regular ssh->bash session. I'd like to leave work soon, but I now realize that the job is going to take several hours. If I…
mike
  • 4,013