Tips tagged bash


Tip #46  

Using expansion to move a file aside without having to type the file name twice

Read more »


Tip #77   Bash fork bomb

Don't forget the bash fork bomb. DO NOT TRY THIS AT HOME... Posted here so that you don't see this in a forum or a mailing list and use it without knowing:

Read more »


Tip #185   CDPATH

This is a little known and very underrated shell variable. CDPATH does for the cd built-in what PATH does for executables. By setting this wisely, you can cut down on the number of key-strokes you enter per day.

For example:
Read more »


Tip #45  

multiple command output into a single program:

diff -u <(ls -c1 dir_1) <(ls -c1 dir_2)

Will show you a diff of files in the root of dir_1 and dir_2 Read more »


Tip #139  

Selected Bash Keystrokes:
Ctrl-U - Cuts everything to the left
Ctrl-W - Cuts the word to the left
Ctrl-Y - Pastes what's in the buffer
Ctrl-A - Go to beginning of line
Ctrl-E - Go to end of line Read more »


Tip #375   Bash function to decompress archives

From; original author unknown:

Read more »


Tip #161   Simple password generator

This is a simpler password generator.

Read more »


Tip #47   Changing file extensions

Rename replaces string X in a set of file names with string Y.

Read more »


Tip #216   Create a Terminal Calculator

Put the following in your .bashrc file

Read more »


Tip #194   Fix the previous command

If, like me, you often make mistakes on the command line, try using the history shortcut '^^' to repeat the last command with changes.

For example:

Read more »