Some more excellent BASH shell tricks for Ubuntu and Linux Mint.

How to filter the output of ls to only find certain files in a folder. This example will only return files that are made up of letters and end in the *.html extension. [ [email protected] ] [ Jobs 0.PWD: ~/Documents.bash 4.2.36. ] [ 9 ] [ 11:54:15 ] [ $ ]-> ls -hula [a-z]*.html -rw-r–r– … Read more

Another good grep trick to find strings that end in numbers but you are not sure which.

How do you search a binary file for a certain string that ends in a number; but you are not sure what the number is? Then this command will perform this task. john@adeptus-mechanicus ~/Documents/master $ strings vesperas.wad | grep -a "MAP[0-9]" MAP15john@adeptus-mechanicus ~/Documents/master $ strings vesperas.wad | grep -a "MAP[0-9]" MAP15 I was using this … Read more

How to put line numbers on the output of a command and other useful Linux commands.

If you want to put line numbers in the output of a command; then feed it through the nl command. This will put the required line numbers there for you. [john@deusexmachina]:~/Desktop> ls -hula | nl 1 total 452K 2 drwxr-xr-x 3 john john 4.0K Nov 14 10:46 . 3 drwxr-xr-x 46 john john 4.0K Nov … Read more