Most Popular

1500 questions
92
votes
9 answers

Linux - Is there a way to prevent/protect a file from being deleted even by root?

I have a very important file which an application in my workplace uses, i need to make sure it is not delete whatsoever, how can I do that?
user256033
92
votes
7 answers

How do I make a connection private on Windows Server 2012 R2

After a restart of one of our servers (a Windows Server 2012 R2), all private connections become public and vice versa (this user had the same problem). Stuff like pinging and iSCSI stopped working, and after some investigation it turned out this…
vgru
  • 1,287
  • 2
  • 17
  • 25
92
votes
15 answers

Why drop caches in Linux?

In our servers we have a habit of dropping caches at midnight. sync; echo 3 > /proc/sys/vm/drop_caches When I run the code it seems to free up lots of RAM, but do I really need to do that. Isn't free RAM a waste?
ivcode
  • 1,062
  • 1
  • 9
  • 13
92
votes
5 answers

Why do systems generally disable virtualization by default in BIOS settings?

I have yet to see a system whose default configuration enables MMU and directed I/O virtualization. Often this necessitates rebooting and going into the BIOS to enable it if you want, e.g., 64-bit support on your VMs. Is there some kind of…
John Feminella
  • 1,318
  • 1
  • 8
  • 11
92
votes
5 answers

Why don't EC2 ubuntu images have swap?

I started a couple servers on EC2 and they don't have swap. Am I doing something wrong or is it that the machines just don't have any?
rafamvc
  • 1,119
  • 1
  • 8
  • 7
91
votes
6 answers

How to determine the hostname from an IP address in a Windows network?

My LAN has 50 Windows hosts. At the Windows command line I try ping to get the IP address of a running Windows machine. The question is how to get hostname of a specific IP address in the same Windows workgroup? Another question is how to know the…
billyduc
  • 1,617
  • 8
  • 24
  • 26
91
votes
2 answers

Does the "bs" option in "dd" really improve the speed?

Every now and then, I'm told that to increase the speed of a "dd" I should carefully choose a proper "block size". Even here, on ServerFault, someone else wrote that "...the optimum block size is hardware dependent..." (iain) or "...the perfect size…
Damiano Verzulli
  • 4,078
  • 1
  • 21
  • 33
91
votes
8 answers

How can I show mysql locks?

Is there anyway to show all the locks that are active in a mysql database?
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
91
votes
7 answers

How to sort ps output by process start time?

Is there a way to sort ps output by process start time, so newest are either at the top or bottom ? On Linux ? On SysV5 ? On Mac ?
Dean Smith
  • 1,270
  • 2
  • 11
  • 13
91
votes
8 answers

What is "anycast" and how is it helpful?

I'd never heard of anycast until a few seconds ago when I read "What are some cool or useful server/networking tricks?". The wikipedia "Anycast" article on it is quite formal and doesn't really evoke a mental picture of how it would be used. Can…
username
  • 4,755
  • 19
  • 55
  • 78
90
votes
2 answers

How can I send a message to the systemd journal from the command line?

In older Linux systems, the logger command can be used to send a log message to syslog. Reading where does logger log its messages to in Arch Linux?, it seems that syslog messages and the logger command line app only talk to the systemd journal if a…
mikemaccana
  • 3,370
  • 5
  • 25
  • 29
90
votes
2 answers

Rsync creates a directory with the same name inside of destination directory

When I run this command rsync -avzp --del -e "ssh -p myport" user@hostname:/var/www/tests /var/www/tests files get synchronized but instead of saving files in /var/www/tests, Rsync creates one more directory "tests" inside of existing…
javi007
  • 903
  • 1
  • 6
  • 5
90
votes
4 answers

Nginx - root versus alias, for serving single files?

After many hours getting nginx to serve single files such as robots.txt (hint: clear your browser cache each time), I wound up with two different ways, one using the alias directive, and one using the root directive, like so: location /robots.txt {…
Cyclops
  • 1,169
  • 2
  • 9
  • 13
90
votes
6 answers

How do you free up a port being held open by dead process?

A colleague of mine recently ran into a problem where a process that had supposedly died was still bound to a network port, preventing other processes from binding to that port. Specifically, netstat -a -b was reporting that a process named System…
Adam Rosenfield
  • 1,000
  • 1
  • 6
  • 6
90
votes
4 answers

How to inspect remote SMTP server's TLS certificate?

We have an Exchange 2007 server running on Windows Server 2008. Our client uses another vendor's mail server. Their security policies require us to use enforced TLS. This was working fine until recently. Now, when Exchange tries to deliver mail…
Skyhawk
  • 14,200
  • 4
  • 53
  • 95