I would like to run ls and exclude certain files in the output.
When I run the following command, I get all files with each on one line:
$ ls -1
file1
file2
file3
temp
I would like to run this command in a way so it shows
$ ls -1 <insert magic here> temp
file1
file2
file3
Best Answer
-I = Ignore the filename, i.e., don't list the specified file.
To ignore more than one file add an -I before each filename.
To ignore files by their name extensions do the following, for example.