Most Popular
1500 questions
102
votes
11 answers
How can I get diff to show only added and deleted lines? If diff can't do it, what tool can?
How can I get diff to show only added and deleted lines? If diff can't do it, what tool can?
C. Ross
- 3,075
- 9
- 35
- 36
102
votes
6 answers
Why can't MX records point to an IP address?
I understand you should not point a MX record at an IP address directly, but should instead point it to an A record, which, in turns, points to the IP address of your mail server.
But, in principle, why is this required?
dayuloli
- 1,253
- 2
- 11
- 19
102
votes
15 answers
ssh tunnel refusing connections with "channel 2: open failed"
All of a sudden (read: without changing any parameters) my netbsd virtualmachine started acting oddly. The symptoms concern ssh tunneling.
From my laptop I launch:
$ ssh -L 7000:localhost:7000 user@host -N -v
Then, in another shell:
$ irssi -c…
lorenzog
- 2,799
- 3
- 20
- 24
102
votes
7 answers
How to retrieve the last modification date of all files in a Git repository
I know how to retrieve the last modification date of a single file in a Git repository:
git log -1 --format="%ad" -- path/to/file
Is there a simple and efficient way to do the same for all the files currently present in the repository?
Eric Bréchemier
- 1,435
- 2
- 12
- 8
102
votes
8 answers
Can you have more than one ~/.ssh/config file?
We have a bastion server that we use to connect to multiple hosts, and our .ssh/config has grown to over a thousand lines (we have hundreds of hosts that we connect to). This is beginning to get a little unwieldy and I'd like to know if there is a…
wrangler
- 3,080
- 5
- 24
- 20
102
votes
6 answers
High load average, low CPU usage - why?
We're seeing huge performance problems on a web application and we're trying to find the bottleneck. I am not a sysadmin so there is some stuff I don't quite get. Some basic investigation shows the CPU to be idle, lots of memory to be available,…
Spiff
- 1,611
- 2
- 12
- 12
102
votes
6 answers
How to force nginx to resolve DNS (of a dynamic hostname) everytime when doing proxy_pass?
I am using nginx/0.7.68, running on CentOS, with the following configuration:
server {
listen 80;
server_name ***;
index index.html index.htm index.php default.html default.htm default.php;
location / {
root …
xiamx
- 1,212
- 2
- 9
- 10
102
votes
8 answers
How to make bash scripts print out every command before it executes?
For example, I have a simple bash file
#!/bin/bash
cd ~/hello
ls
How can I make it display every command before executing it? Just the opposite effect of "@echo off" in windows batch scripting.
Epeius
- 1,031
- 2
- 9
- 6
102
votes
11 answers
How to prevent a user from login in, but allow "su - user" in Linux?
How do you allow a user to log in using "su - user" but prevent the user from login in using SSH?
I tried to set the shell to /bin/false but the when I try to su it doesn't work.
Are there several ways to only allow logins by su?
Is SSH's AllowUser…
NoozNooz42
- 1,185
- 2
- 9
- 9
101
votes
4 answers
How to filter http traffic in Wireshark?
I suspect my server has a huge load of http requests from its clients.
I want to measure the volume of http traffic.
How can I do it with Wireshark?
Or probably there is an alternative solution using another tool?
This is how a single http…
par
- 1,263
- 3
- 12
- 15
101
votes
3 answers
What is the difference between service and systemctl?
Maybe this is a trivial question, but it is not totally clear to me. On one of our servers we have some background processes running which were started with service and some others which were started with systemctl, like this:
$ service nginx…
Aidas Bendoraitis
- 1,465
- 2
- 14
- 17
101
votes
4 answers
"413 Request Entity Too Large" in Nginx with "client_max_body_size" set
I am uploading a 26Gb file, but I am getting:
413 Request Entity Too Large
I know, this is related to client_max_body_size, so I have this parameter set to 30000M.
location /supercap {
root /media/ss/synology_office/server_Seq-Cap/;
index…
user2979409
- 1,111
- 2
- 7
- 4
101
votes
9 answers
How to add a security group to a running EC2 Instance?
I have an Amazon EC2 instance running and I will like to add another security group to that instance and then remove the current security group from that instance. Is this possible?
Geo
- 3,071
- 11
- 42
- 52
101
votes
2 answers
I have a keypair. How do I determine the key length?
Using OpenSSL from the command line in Linux, is there some way to examine a key (either public or private) to determine the key size?
jdw
- 3,855
- 2
- 17
- 21
101
votes
3 answers
Perform rsync while following sym links
I have a directory that contains symbolic links to other directories located on different media on my system:
/opt/lun1/2011
/opt/lun1/2010
/opt/lun2/2009
/opt/lun2/2008
/opt/lun3/2007
But the symbolic links show up…
ensnare
- 2,212
- 7
- 24
- 40