Notes and Useful Info

linux

Read more...

bash: define character ranges by enclosing them in brackets ([]). Let’s say you want to look for folder names that start with either D or M. Type: ls [DM]* Say you’re in a folder filled with subfolders named after each year. To copy the folders for the previous five years into ~/backup, use: cp -r 201[56789] /home/USERNAME/backup You can even simplify them further with a dash (–): cp 201[5-9] /home/USERNAME/backup Bash will iterate from 5 to 9 to include the numbers between them. [source]

Read more...