Most Popular
1500 questions
94
votes
9 answers
Recovering accidentally deleted files
I accidentally deleted a file from my laptop. I'm using Fedora. Is it possible to recover the file?

C.S.
- 1,793
- 2
- 18
- 21
94
votes
5 answers
apt-get fails: The method driver /usr/lib/apt/methods/https could not be found
I tried to update my OS Debian jessie using the terminal and i get an error :
“E: The method driver /usr/lib/apt/methods/https could not be found.” error?
My sources.list :
deb http://httpredir.debian.org/debian/ jessie main
deb-src…

GAD3R
- 66,769
94
votes
4 answers
What does "esac" mean at the end of a bash case statement? Is it required?
I have found multiple examples of "esac" appearing at the end of a bash case statement but I have not found any clear documentation on it's use. The man page uses it, and even has an index on the word…

GrnMtnBuckeye
- 1,067
94
votes
6 answers
How to check which process is using most memory
When I check free in one of Prod server it showing 70% of memory is being used:
total used free shared buffers cached
Mem: 164923172 141171860 23751312 0 4555616 20648048
-/+ buffers/cache: …

sandeep
- 941
94
votes
11 answers
Execute a specific command in a given directory without cd'ing to it?
Is there a way to execute a command in a different directory without having to cd to it? I know that I could simply cd in and cd out, but I'm just interested in the possibilities of forgoing the extra steps :)

Naftuli Kay
- 39,676
94
votes
3 answers
How do I recover from the Heartbleed bug in OpenSSL?
CVE-2014-0160 a.k.a. Heartbleed is a vulnerability in OpenSSL. It looks scary.
How do I determine whether I am affected?
If I'm affected, what do I need to do? Apparently upgrading isn't enough.

Gilles 'SO- stop being evil'
- 829,060
94
votes
5 answers
Where are my sshd logs?
I can't find my sshd logs in the standard places.
What I've tried:
Not in /var/log/auth.log
Not in /var/log/secure
Did a system search for 'auth.log' and found nothing
I've set /etc/ssh/sshd_config to explicitly use SyslogFacility AUTH and LogLevel…

HXCaine
- 1,169
94
votes
13 answers
Linux tools to treat files as sets and perform set operations on them
Does anyone know of any linux tool specifically designed to treat files as sets and perform set operations on them? Like difference, intersection, etc?

nilton
- 1,043
94
votes
3 answers
How does Linux "kill" a process?
It often baffles me that, although I have been working professionally with computers for several decades and Linux for a decade, I actually treat most of the OS' functionality as a black box, not unlike magic.
Today I thought about the kill command,…

seratoninant
- 813
94
votes
9 answers
How to avoid password prompt with rsync (and without using public keys)?
I need to execute rsync, without it prompting me for password.
I've seen in rsync manpage that it doesn't allow specifying the password as command line argument.
But I noticed that it allows specifying the password via the variable…

Dor
- 2,535
94
votes
7 answers
How can I make iconv replace the input file with the converted output?
I have a bash script which enumerates through every *.php file in a directory and applies iconv to it. This gets output in STDOUT.
Since adding the -o parameter ( in my experience ) actually writes a blank file probably before the conversion takes…

meder omuraliev
- 1,085
94
votes
3 answers
Open a window on a remote X display (why "Cannot open display")?
Once upon a time,
DISPLAY=:0.0 totem /path/to/movie.avi
after ssh 'ing into my desktop from my laptop would cause totem to play movie.avi on my desktop.
Now it gives the error:
No protocol specified
Cannot open display:
I reinstalled Debian…

justin cress
- 1,331
94
votes
4 answers
How do I completely silence a cronjob to /dev/null/?
On my Ubuntu-Desktop and on my debian-server I have a script which needs to be executed each minute (a script that calls the minute-tic of my space online browsergame).
The problem is that on debian derivates cron is logging to /var/log/syslog…

rubo77
- 28,966
93
votes
63 answers
What are your favorite command line features or tricks?
Share your command line features and tricks for Unix/Linux. Try to keep it shell/distro agnostic if possible. Interested in seeing aliases, one-liners, keyboard shortcuts, small shell scripts, etc.

cmcginty
- 2,683
- 4
- 21
- 12
93
votes
12 answers
How to print all lines after a match up to the end of the file?
Input file1 is:
dog 123 4335
cat 13123 23424
deer 2131 213132
bear 2313 21313
I give the match the pattern from in other file ( like dog 123 4335 from file2).
I match the pattern of the line is dog 123 4335 and after printing
all lines without…

loganaayahee
- 1,129