Most Popular
1500 questions
78
votes
2 answers
What does the 'd' mean in ls -al results and what is that slot called?
In Linux, what does the d mean in the first position of drwxr-xr-x? And what are all of the possible letters that could be there, and what do they mean?
I'm trying to learn more about the Linux file permissions system, and I'd like to see a list of…

Eric Leschinski
- 3,131
78
votes
3 answers
How do I perform a reverse history search in ZSH's vi-mode?
I use vim for essentially all my editing needs, so I decided to once again try vi-mode for my shell (currently ZSH w/ oh-my-zsh on OS X), but I find myself trying (and failing) to use Ctrl-R constantly. What's the equivalent key-binding? And for…

Hank Gay
- 3,549
78
votes
2 answers
reading from serial from linux command line
I have a serial port device that I would like to test using linux command line.
I am able to use stty and echo for sending commands to serial port, but when device responds I have no way of reading what is coming from serial port. I am using
stty…

erin c
- 893
78
votes
4 answers
Linux: Kill process based on arguments
How can I kill a process based on its command line arguments?
killall, pgrep, and pkill seem to only work based on the process name.
I need this to be able to differentiate between a number of applications running inside Java virtual machines,…

Mark Howard
- 883
78
votes
6 answers
How can I increase the number of inodes in an ext4 filesystem?
I had a problem (new to me) last week. I have a ext4 (Fedora 15) filesystem. The application that runs on the server suddenly stopped. I couldn't find the problem at first look.
df showed 50% available space. After searching for about an hour I saw…

piovisqui
- 885
78
votes
5 answers
Why does '\r' (and not '\n') work to replace with a newline in 'vim'?
In vim editor, I want to replace a newline character (\n) with two new line characters (\n\n) using vim command mode.
Input file content:
This is my first line.
This is second line.
Command that I tried:
:%s/\n/\n\n/g
But it replaces the string…

Raghvendra
- 1,062
78
votes
1 answer
How do I find out more about socket files in /proc/fd?
Looking in /proc/$mypid/fd/, I see these files
lrwx------ 1 cm_user cm_user 64 Oct 14 03:21 0 -> /dev/pts/36 (deleted)
lrwx------ 1 cm_user cm_user 64 Oct 14 03:21 3 -> socket:[1424055856]
lrwx------ 1 cm_user cm_user 64 Oct 14 03:21 4 ->…

benhsu
- 935
78
votes
3 answers
Refresh aliases and functions after defining new aliases and functions?
When I define a new alias in .bash_aliases file or a new function in .bashrc file, is there some refresh command to be able immediately use the new aliases or functions without closing the terminal (in my case xfce4-terminal with a few tabs open,…

xralf
- 15,415
78
votes
9 answers
How to add new lines when using echo
Why does the following command not insert new lines in the generated file and what's the solution?
$ echo "Line 1\r\nLine2" >> readme.txt
$ cat readme.txt
Line 1\r\nLine2

Dumbo
- 1,566
78
votes
4 answers
Run ./script.sh vs bash script.sh - permission denied
When I try to run ./script.sh I got Permission denied but when I run bash script.sh everything is fine.
What did I do wrong?

Piotr Stapp
- 1,003
78
votes
8 answers
Tips for putting ~ under source control
I want to put my home directory (~) under source control (git, in this case), as I have many setting files (.gitconfig, .gitignore, .emacs, etc.) in there I would like to carry across machines, and having them in Git would make it nice for…

Dan McClain
- 883
78
votes
5 answers
How to find and delete files older than specific days in unix?
I have got one folder for log with 7 folders in it. Those seven folders too have subfolders in them and those subfolders have subfolders too. I want to delete all the files older than 15 days in all folders including subfolders without touching…

gtaware
- 891
78
votes
6 answers
Duplicate entries in $PATH a problem?
I source the bashrc's of a few of my friends. So I end up having duplicate entries in my $PATH variable. I am not sure if that is causing commands to take a really long time to start. How does $PATH internally work in bash? Does having more PATHS…

balki
- 4,407
78
votes
2 answers
Copy image from clipboard to file
Is it possible to take an image from the clipboard and output it to a file (using X)?
I can do this with text easily:
$ xclip -selection c -o > file.text
But when I try the above with an image nothing is written.
The reason I want to do this is I…

Lerp
- 913
- 1
- 7
- 6
78
votes
3 answers
Terminate dropped SSH sessions
My SSH sessions seem to be dropping though that is not my major problem - the major problem is my previous sessions are still alive, worse yet one of them is running visudo preventing me from accessing it!
who shows a number of sessions all except…

markmnl
- 1,051