How to search for a folder and then switch to it in Linux.

This simple command will search for a folder named xray* and then switch to it. ┌──[[email protected]]─[~/Documents] └──╼ ╼ $ cd $(find . -type d -name "xray*")┌──[[email protected]]─[~/Documents] └──╼ ╼ $ cd $(find . -type d -name "xray*") After running this command, it has found a folder that matches the wildcard and then switched to it. ┌──[[email protected]]─[~/Documents/xray-16] … Read more

Very useful ways to create wildcards with the Linux shell.

This is an example of a wildcard, using the [0-9] and [A-Z] wildcards to look for numbers and capital letters. deusexmachina:Documents jason$ ls -hula [A-Z]rma[0-9]* -rwxr-xr-x 1 jason staff 1.7G 5 Mar 20:14 Arma3_x64_2017_11_13_21_50_20_373.avi -rwxrwxrwx 1 jason staff 1.2G 28 Jun 14:04 Arma3_x64_2018_01_04_15_29_53_844.avi -rwxrwxrwx 1 jason staff 1.0G 4 Jan 16:13 Arma3_x64_2018_01_04_15_32_03_159.avi -rwxrwxrwx 1 jason … Read more

Deleting files on your Linux machine that have strange names. And how to use wildcards on the shell.

I ran a Perl script on my system that created a bunch of files on my computer named as shown below. I could have typed rm -f A* but that could have deleted other files that have a capital “A” as the first letter of the filename. That is where wildcards come into play. I … Read more

Useful Linux shell tricks. Using Brace expansions to create folders.

The Linux command-line offers many useful methods of creating many folders on your computer at once.  This command will create a few folders on your system named one,two,three,four and create the folders five,six,seven,eight within each folder created. ~$ mkdir -p {one,two,three,four}/five/six/seven/eight~$ mkdir -p {one,two,three,four}/five/six/seven/eight This command will create four folders named one,two,three,four and put the … Read more

A correction I have to make regarding the Powershell and wildcards. The bash shell is still better though.

I need to correct what I said in this posting: http://www.securitronlinux.com/bejiitaswrath/bash-shell-is-better-than-powershell-and-discussion-of-the-linux-desktop-versus-windows/ and also this one. regarding the Powershell and its handling of certain constructs that I mentioned in this posting: http://www.securitronlinux.com/bejiitaswrath/windows-powershell-not-as-good-as-bash-shell-and-other-thoughts/. It turns out that the Powershell does support this after all as shown in this sample below. PS C:\Users\Homer\Documents> ls STRIFE[0-9].wad   Directory: C:\Users\Homer\Documents … Read more