Most Popular
1500 questions
102
votes
10 answers
Does cd . have use?
One of the tutorials I've been following briefly stated that cd . has no use. When trying to replicate issue shown by OP in Symbolic link recursion - what makes it “reset”?, I also tried cd ., which showed the same effect OP described (growing $PWD…

Sergiy Kolodyazhnyy
- 16,527
102
votes
4 answers
Multiline shell script comments - how does this work?
Recently, I stumbled upon a multiline comment type I have never seen before - here is a script example:
echo a
#
: aaa
: ddd
#
echo b
This seems to work, even vim syntax-highlights it. What is this style of commenting called and how to I find…

Wiesław Herr
- 1,360
- 2
- 10
- 10
102
votes
2 answers
Bash test: what does "=~" do?
#!/bin/bash
INT=-5
if [[ "$INT" =~ ^-?[0-9]+$ ]]; then
echo "INT is an integer."
else
echo "INT is not an integer." >&2
exit 1
fi
What does the leading ~ do in the starting regular expression?

ragnarok
- 1,029
102
votes
4 answers
Tmux mouse-mode on does not allow to select text with mouse
I'm using tmux 2.1 and tried to on mouse mode with
set -g mouse on
And it works fine, I can switch across tmux window splits by clicking the appropriate window. But the downside of this is that I cannot select text with mouse. Here is how it looks…

Dmitrii Bundin
- 1,133
102
votes
11 answers
How do I create a blank PDF from the command line?
I recently needed a single blank PDF page (8.5" x 11" size) and realized that I didn't know how to make one from the command line.
Issuing touch blank.pdf produces an empty PDF file. Is there a command line tool that produces an empty PDF page?

Brian Fitzpatrick
- 2,845
102
votes
2 answers
What does status "active (exited)" mean for a systemd service?
I'm working with a custom service which essentially runs a web server, called thisismywebserver. Currently it's not working (ie I get an "Unable to Connect" error trying to access a page).
When I run this command service thisismywebserver status to…

Highly Irregular
- 2,525
102
votes
2 answers
Location of the crontab file
as many (most?) others, I edit my crontab via crontab -e, where I keep all routine operations such as incremental backup, ntpdate, various rsync operations, as well as making my desktop background christmas themed once a year. From what I've…

Jarmund
- 1,118
102
votes
10 answers
How do I split a flac with a cue?
I've got a full album flac and a cue file for it. How can I split this into a flac per track?
I'm a KDE user, so I would prefer a KDE/Qt way. I would like to see command line and other GUI answers as well, but they are not my preferred method.

xenoterracide
- 59,188
- 74
- 187
- 252
101
votes
11 answers
Remove last character from line
I want to remove last character from a line:
[root@ozzesh ~]#df -h | awk '{ print $5 }'
Use%
22%
1%
1%
59%
51%
63%
5%
Expected result:
Use
22
1
1
59
51
63
5

Özzesh
- 3,669
101
votes
12 answers
Which MP3 tagging tool for Linux?
Which application would you recommend for Linux to tag MP3s? Under Windows I used to use Tag&Rename and liked it a lot; it works well under Wine, but I want something that runs natively.

tkit
- 2,408
101
votes
8 answers
Have rm not report when a file is missing?
I have a bash script that I want to remove files from various directories. Frequently, they won't be there because they weren't generated and that's fine. Is there a way to get the script not to report that error, but if rm has some other output to…

flickerfly
- 1,651
101
votes
4 answers
How to read dmesg from previous session? (dmesg.0)
dmesg is a command to read the contents from /var/log/dmesg.
The nice thing compared to less /var/log/dmesg is that I can use the -T flag for human readable time output.
Now I would like to look at /var/log/dmesg.0, to see how my computer crashed.…

donquixote
- 1,507
100
votes
4 answers
What's the difference between SFTP, SCP and FISH protocols?
I used to think SCP is a tool to copy files over SSH, and copying files over SSH is called SFTP, which is itself a synonym to FISH.
But now as I was looking for a Total Commander plugin to do this in Windows, I've noticed that on its page it says…

Ivan
- 17,708
100
votes
4 answers
How can I use column to delimit on tabs and not spaces?
I'd like to use the Unix column command to format some text. I have fields delimited by tabs, but within each field there are also spaces. column delimits on white space (tabs and spaces). How can I make column only use tabs as the delimiter?
I was…

turtle
- 2,697
- 5
- 20
- 17
100
votes
6 answers
Clear unused space with zeros (ext3,ext4)
How to clear unused space with zeros ? (ext3,ext4)
I'm looking for something smarter than
cat /dev/zero > /mnt/X/big_zero ; sync; rm /mnt/X/big_zero
Like FSArchiver is looking for "used space" and ignores unused, but opposite site.
Purpose: I'd…

Grzegorz Wierzowiecki
- 14,264