Most Popular

1500 questions
94
votes
6 answers

swap partition vs file for performance?

What is better for performance? A partition closer to the inside of the disk will have slower access times, and we must wait for the drive to switch between the OS and swap partitions. On the other hand, a swap partition bypasses all of the…
Bill Gray
  • 1,345
  • 1
  • 11
  • 18
94
votes
9 answers

GPG does not have enough entropy

I've got a ton of processes running in the background to try and get enough entropy, but I am still failing. **We need to generate a lot of random bytes. It is a good idea to perform some other action (type on the keyboard, move the mouse, utilize…
94
votes
6 answers

How do I create user accounts from the Terminal in Mac OS X 10.5?

I would like to be able to create new users in Mac OS X 10.5 remotely after ssh'ing into the machine. How do I do this?
JR Lawhorne
  • 1,231
  • 2
  • 11
  • 12
94
votes
3 answers

How do I list the files associated with a Python package installed using pip or easy_install?

I've installed a Python package using pip, which is a replacement for easy_install. How do I get a list of which installed files are associated with this package? Basically, I'm looking for the Python package equivalent of dpkg -L or rpm -ql
93
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
93
votes
16 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,072
  • 1
  • 9
  • 13
93
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
  • 933
93
votes
6 answers

Changing host permissions for MySQL users

I have the following grants for a user/database mysql> SHOW GRANTS FOR 'username'@'localhost'; +---------------------------------------------------------------------------+ | Grants for username@localhost …
f00860
  • 1,243
93
votes
3 answers

Curl: disable certificate verification

I am developing and I need to access https://localhost. I know the certificate will not match. I just want curl to ignore that. Currently it gives me the following error message: curl: (51) SSL peer certificate or SSH remote key was not OK Is it…
blueFast
  • 4,340
  • 14
  • 38
  • 55
93
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,328
  • 1
  • 8
  • 11
93
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,290
93
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,129
93
votes
5 answers

Getting the last match in a file using grep

What's the best way of getting only the final match of a regular expression in a file using grep? Also, is it possible to begin grepping from the end of the file instead of the beginning and stop when it finds the first match?
Acorn
  • 1,097
92
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…
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,297
  • 2
  • 17
  • 25