Help more people learn by sharing this post!

Tag Archives for " cheatsheet "

Bash expansions

In this post you will learn about bash expansions, you probably already used them if you have done something like “ls *.txt”. Basically the shell does some processing on the command line before actually executing it, which enables us to do a number of things.

Here is a small cheatsheet of the most useful expansions:

Brace expansion

List: {1,2,3}
brace-expansion

This one can be useful to rename a file, for example you can rename access.log to access.log-old using this: mv access.log{,-old}
Continue reading