Most Popular

1500 questions
53
votes
4 answers

How do I make cURL use keepalive from the command line?

I'm trying to verify that HTTP persistent connections are being used during communication with a Tomcat webserver I've got running. Currently, I can retrieve a resource on my server from a browser (e.g. Chrome) and verify using netstat that the…
53
votes
9 answers

Determine if filesystem or partition is mounted RO or RW via Bash Script?

Is there an easy way to determine if a mounted filesystem is mounted as Read-Only or Read-Write? I was thinking just to pipe mount but I thought there might be an easier way.
Jake Wilson
  • 8,924
53
votes
22 answers

Why change default ssh port?

I've noticed that a lot of admins change the default ssh port. Is there any rational reason to do so?
sheerun
  • 633
53
votes
3 answers

How do I activate launchd logging on OS X?

How do I activate launchd logging on OS X 10.6? I added a new daemon that is not starting properly (status is 1). I want to debug the problem but I was not able to find launchd logs, they are not in /var/log/launchd.log.
sorin
  • 8,226
53
votes
2 answers

Windows: redirect stdout and stderror to nothing

I have a command I am running produces a ton of output, I want to silence the output without writing to a file. I have used the following to send all output to a file: command > out.txt 2>&1 ... but again I don't want any file output: command >…
53
votes
6 answers

CIDR for Dummies

I understand what CIDR is, and what it is used for, but I still can't figure out how to calculate it in my head. Can someone give a "for dummies" type explanation with examples?
Bob
  • 2,977
53
votes
12 answers

Tail multiple remote files

Is there a way to remote tail 2 files? I have two servers(a and b) behind a load balancer and I would like to do something like this if possible: tail -f admin@serverA:~/mylogs/log admin@serverB:~/mylogs/log Thanks!
53
votes
4 answers

How can I find out what is causing interrupts on Windows?

Occasionally I come across servers (Windows 2003 and 2008) with high processor % interrupt time. Is there a way to see what program or device is causing the interrupts?
jlupolt
  • 914
52
votes
11 answers

How do I tell if apache is running as prefork or worker?

How do I tell if apache is running (or configured to run) as prefork or worker?
Simon
52
votes
6 answers

How to backup GPG?

What are the critical files I need to backup from GPG? I guess my private key would qualify of course, but what else?
jldupont
  • 1,869
52
votes
6 answers

How to make a global ~/.vimrc?

Right now, I make everyone do ~/.vimrc and put their settings there. How can I make a global, default .vimrc for new users?
Alex
  • 8,591
52
votes
4 answers

Should I edit /etc/crontab or run crontab -e as root?

I'm setting up regular system maintenance tasks which have to run as root. I plan to use the flavour of cron which comes with Ubuntu 14.04 LTS as the default. I see the previous admin (who since left the company) edited /etc/crontab directly.…
marcv81
  • 632
52
votes
14 answers

Linux - What directories should I exclude when backing up a server?

I'm backing up a Linux server and storing it on another server. I began with a simple rsync -aPh --del server.example.com:/ /mnt/backup Then someone pointed out that I shouldn't back up /proc, since you don't want to restore the /proc of one…
Amandasaurus
  • 32,281
  • 69
  • 194
  • 263
52
votes
6 answers

How useful is mounting /tmp noexec?

Many people (including the Securing Debian Manual) recommend mounting /tmp with the noexec,nodev,nosuid set of options. This is generally presented as one element of a 'defense-in-depth' strategy, by preventing the escalation of an attack that lets…
Phil Miller
  • 1,765
52
votes
5 answers

Unable to connect to public PostgreSQL RDS instance

I created a basic test PostgreSQL RDS instance in a VPC that has a single public subnet and that should be available to connect over the public Internet. It uses the default security group, which is open for port 5432. When I try to connect, it…