Linux 101 : Useful Shell Tips - Tricks -find, mv, subcommands, ... -
The below command creates the files - file1, ..., file5 -:
To find all the file in our current directory, we use the following:
To find all the subdirectories in our current directory, we use the following:
To find a file in our current directory, we use:
To move files to a different "destination" directory, we could use the below - the result of the "find" command will be the input of "mv" -:
We could also use the "exec" command, that take its input from the command preceding it.
The below command looks for a file named "filename" and displays it:
Remark:
The "." refers to the current directory.
Comments