Most Popular

1500 questions
132
votes
2 answers

Colors in bash after piping through less?

When I have dircolors defined life is full of... color. When I pipe ls through less to scroll around I lose the colors. Any suggestions?
MathewC
  • 7,147
131
votes
44 answers

Cheat Sheets for System Administrators?

I'd like to start a collection of good, free cheat sheet resources for system administrators. Please add your favorite ones. From the Wikipedia "cheat sheet" article: In more general usage, a "cheat sheet" is any short (one or two page) …
splattne
  • 28,776
131
votes
14 answers

Why is RAID not a backup?

When someone mentions RAID in a conversation about backups, invariably someone declares that "RAID is not a backup." Sure, for striping, that's true. But what's the difference between redundancy and a backup?
jldugger
  • 14,602
131
votes
6 answers

Postfix - how to retry delivery of mail in queue?

I have a backup mail server in case of a failure on the main one. In that case of failure, mails come on the backup server and stay there until the main one is back. If I wait some times, the delivery will be done automatically as soon as the main…
Nicolas
  • 1,319
  • 2
  • 8
  • 3
130
votes
15 answers

How to show all banned IP with fail2ban?

When I run this command fail2ban-client status sshd I got this: Status for the jail: sshd |- Filter | |- Currently failed: 1 | |- Total failed: 81 | `- File list: /var/log/auth.log `- Actions |- Currently banned: 2 |- Total…
Dark Cyber
  • 1,409
130
votes
7 answers

How do I list loaded Linux module parameter values?

Is there a standard way to list the parameter values of a loaded Linux module? I'm essentially probing for another answer to this Linux kernel module parameters question, because the module I'm interested in doesn't have a…
cdleary
  • 1,885
130
votes
6 answers

Turn off pager for psql's interactive output

We switched from PostgreSQL 8.3 to 9.0. Perhaps it's a new feature or perhaps just a configuration change, but now when output from commands (like, \d tablename) exceeds visible vertical space, psql seem to pipe the output through something similar…
Yuri Ushakov
  • 1,433
130
votes
4 answers

How can I see Time-To-Live (TTL) for a DNS record?

I would like to see the Time-To-Live (TTL) value for a CNAME record. I have access to dig (on Apple Mac OS X), which gives me an answer like this: % dig host.example.gov <*SNIP*> ;; ANSWER SECTION: host.example.gov. 43200 IN CNAME …
Stefan Lasiewski
  • 24,361
  • 42
  • 136
  • 188
129
votes
11 answers

FreeBSD: Directory called ^C (really!) - how to remove?

I made a typo: $ history 169 9:34 la /usr/local/etc/ 170 9:35 sudo mkdir ^C 171 9:36 sudo mkdir /usr/local/etc/dnsmasq.d Now I have a file that is called ^C (ctrl+C)!! When I use ls I just see a questionmark (probably due to the locale?) %…
Mausy5043
  • 1,367
129
votes
4 answers

How to disable timeout for nginx?

On a local development machine, I have a nginx reverse proxy like so: server { listen 80; server_name myvirtualhost1.local; location / { proxy_pass http://127.0.0.1:8080; } server { listen 80; server_name myvirtualhost2.local; …
k0pernikus
  • 4,730
129
votes
2 answers

How does try_files work?

I looked at the nginx documentation and it still confuses me utterly. How does try_files work? Here is what the documentation says: From NginxHttpCoreModule try_files syntax: try_files path1 [path2] uri default: none context: server,…
user274
129
votes
4 answers

Amazon EC2 terminology - AMI vs. EBS vs. Snapshot vs. Volume

I have been poking around Amazon EC2, and am a little confused on some of the terminology. Specifically with regard to AMI, snapshots and volumes, and an EBS Please correct me if I am wrong, or fill in any serious gaps in my following…
Matt
  • 3,271
129
votes
8 answers

How can I kill all stopped jobs?

When I try to exit from my Linux server I get the message: There are stopped jobs. : Is there a single command to kill these?
yazz.com
  • 7,953
129
votes
8 answers

How to get pid of just started process

I want to start process (eg. myCommand) and get its pid (to allow to kill it later). I tried ps and filter by name, but I can not distinguish process by names myCommand ps ux | awk '// {print $2}' Because processes names are not…
rafalmag
  • 1,401
128
votes
4 answers

How do I auto-start docker containers at system boot?

What is a good way to automatically start docker containers when the system boots up? Is there a preferred way to do this on Ubuntu 14.04? I've used supervisord in the past to auto start web apps. But that doesn't feel like the right thing for…