Tips tagged bash


418

Tip #46  

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

Read more »

232

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 »

165

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 »

108

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 »

106

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 »

96

Tip #375   Bash function to decompress archives

From dotfiles.org; original author unknown:

Read more »

85

Tip #161   Simple password generator

This is a simpler password generator.

Read more »

45

Tip #47   Changing file extensions

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

Read more »

27

Tip #216   Create a Terminal Calculator

Put the following in your .bashrc file

Read more »

20

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 »