Most Popular
1500 questions
87
votes
7 answers
Can overwritten files be recovered?
I am not talking about recovering deleted files, but overwritten files. Namely by the following methods:
# move
mv new_file old_file
# copy
cp new_file old_file
# edit
vi existing_file
> D
> i new_content
> :x
Is it possible to retrieve anything…

Question Overflow
- 4,718
87
votes
2 answers
Discovering metadata about a PDF
Suppose I have a PDF and I want to obtain whatever metadata is available for that PDF. What utility should I use?
I find the piece of information I am usually most interested in knowing is the paper size, something that PDF viewers usually don't…

Faheem Mitha
- 35,108
87
votes
4 answers
Recursive grep vs find / -type f -exec grep {} \; Which is more efficient/faster?
Which is more efficient for finding which files in an entire filesystem contain a string: recursive grep or find with grep in an exec statement? I assume find would be more efficient because you can at least do some filtering if you know the file…

Gregg Leventhal
- 7,590
87
votes
3 answers
How do services in Debian work, and how can I manage them?
In Windows I have the services manager, where I see all system services, that can be started through Windows itself, I set up the user it uses, the rights management is in there, and I can pass variables and some other information to the services, I…

Erdinc Ay
- 1,020
86
votes
8 answers
List all available ssl ca certificates
My git client claims
error: Peer's Certificate issuer is not recognized.
That means it can not find the corresponding ssl server key in the global system keyring. I want to check this by looking at the list of all system wide available ssl keys on…

Jonas Stein
- 4,078
- 4
- 36
- 55
86
votes
4 answers
How to turn off the beep only in bash tab-complete
I find the beep useful for some things, so I only want to turn it off for tab completion (I'm not asking how to completely turn it off, that has already been answered in a different question on Serverfault). I also don't have root access, working on…

Shep
- 1,051
86
votes
10 answers
How do you kick a benign user off your system?
I was googling this a bit ago and noticed a couple of ways, but I'm guessing that google doesn't know all. So how do you kick users off your Linux box? also how do you go about seeing they are logged in in the first place? and related... does your…

xenoterracide
- 59,188
- 74
- 187
- 252
86
votes
7 answers
How to view a TTF font file?
Is there an application to simply preview a font from a TTF file without installing it?

Ivan
- 17,708
86
votes
4 answers
Why would anyone choose not to use the lowlatency kernel?
I can't find any good information on the rt and lowlatency Linux kernels.
I am wondering why anybody would not want to use a lowlatency kernel.
Also, if anyone can tell what the specific differences are, that would be great too.

Startec
- 1,879
86
votes
5 answers
Bash: How to read one line at a time from output of a command?
I am trying to read the output of a command in bash using a while loop.
while read -r line
do
echo "$line"
done <<< $(find . -type f)
The output I got
ranveer@ranveer:~/tmp$ bash test.sh
./test.py ./test1.py ./out1 ./test.sh ./out ./out2…

RanRag
- 5,875
86
votes
3 answers
What happens when you delete a hard link?
If you do rm myFile where myFile is a hard link, what happens?

trusktr
- 4,165
86
votes
15 answers
How to grep a specific line _and_ the first line of a file?
Assuming a simple grep such as:
$ psa aux | grep someApp
1000 11634 51.2 0.1 32824 9112 pts/1 SN+ 13:24 7:49 someApp
This provides much information, but as the first line of the ps command is missing there is no context for the info. I…

dotancohen
- 15,864
86
votes
8 answers
count lines in a file
I'm sure there are many ways to do this: how can I count the number of lines in a text file?
$ file.txt
1020 lines

Chris Smith
- 971
86
votes
5 answers
No sha256sum in MacOS
I tried to use sha256sum in High Sierra; I attempted to install it with MacPorts, as:
sudo port install sha256sum
It did not work.
What to do?

Rui F Ribeiro
- 56,709
- 26
- 150
- 232
86
votes
8 answers
put history command onto command line without executing it
I use !n where (n) is the line number for executing a line in the history file I want executed at the command prompt which I find via history|less.
But there is a command line history event I wish to manually modify. How can I insert into the…

Vass
- 5,371