Skip to content

Tag: command-line

Surprise! the shell suggests command line switches

I noticed that the bash shell can suggest command line switches for your command. Just type your command, a dash (-) and type tab. The shell will show you available switches. For example, try: and press tab – Surprise! The question is: How do I interface with this feature. I.e., if I write a program tha…

How to list running screen sessions?

I have a bunch of servers, on which I run experiments using screen. The procedure is the following : ssh to server XXX launch screen start experiments in a few tabs detach screen disconnect from the server While the experiments are running, I can easily find on which servers they are by sshing to all servers …

What is the safest way to empty a directory in *nix?

I’m scared that one day, I’m going to put a space or miss out something in the command I currently use: Is there a safer way of emptying the current directory’s contents? Answer The safest way is to sit on your hands before pressing Enter. That aside, you could create an alias like this one …

How do I Send Email from the Command Line?

I would like to quickly send email from the command line. I realize there are probably a number of different ways to do this. I’m looking for a simple way to do this from a linux terminal (likely a bash shell but anything should do) and an alternative way to do this on Windows. I want to be able to