AuthorTopic: Post your favorite shell commands! (Read 5902 times)

xkill is my last choice for shutting down a program. The reason is that often there are processes from the program still running if you've stopped it with xkill.

I prefer to kill processes. If I'm able to open a terminal, I typeps -eto see what processes are running. Then I trykill ****(**** being replaced by the process number). If the process won't quit, I trykill -9 ****

That usually does it. There is also akillall nameof processbut I haven't had much luck with it. I'm probably doing something wrong, but I'm not that enamored with the intricacies of commands, so I stick with what works for me (kill or kill -9).

If I can't open a terminal, I try to open another console with the control+alt+F2 command. Then I run ps -e in that console and see if I can get rid of the offending processes. Control+alt+F7 takes me back to my GUI desktop.--GrannyGeek

Please make sure you include either a description of the command or a reference link to explain the command. I'm thinking of newbies here who might find these commands useful but might not know what they do or how to use them.

I cheated a bit, because the find command can be used in combination with any other.

you can use it like this for example:

find /home/rbistolfi/ -name "*.txt"

And it will return all the files ending in "txt" under my home folder. Recently I made a mistake while compiling Xfce4 and I missed a version number for one of its deps in several SlackBuilds. You can use find to fix stuff like that:

Of which the first 3 I used most and love 'h'. Safedelete is an old program tosafely delete files. Can be retrieved again after deletion for a given period of time.

That would work as well:# alias rm='mv --target-directory=/home/peter/.trash $1'

I have to add, if one has done a history|grep the history is listed with its corresponding numers.Then one just has to enter "!number" like !452 for example and that command will be executed. Fast and easy. Recently I had to manually enter the sound modulesabout 20 of them. h snd would list the ones I had entered the first time then it was just a matter of entering one number after the other with !.

The command I got most excited about when I learned about them where pdftotext and doc2txt. Just so you can unleash the full might of grep, sed, awk and ye olde cut on document formats that are not otherwise friendly to the command line natives.

Another one I find most useful is `apropos`, for when you know what you want to do, but not the name of the command that does it.

But the most geeky command in my arsenal most be *drumroll* `VBoxHeadless --startvm spoednix`-- where 'spoednix' is the name of the virtual machine you want to say 'power on' to.

Quote from: bigpaws

Is there anything better than cat?

Nope. Nothing beats cat. Almost nothing. I use it more often than `cd` or `ls` even: