
Table of Contents
This command sorts the lines in the input.txt
file:
sort ./input.txt
This command sorts the lines in the input.txt
file and removes duplicates:
sort ./input.txt | uniq
This command sorts the lines in the input.txt
file, removes duplicates and writes the output in the file:
sort ./input.txt | uniq > output.txt
Find files in the current directory and its subdirectories with a name containing the specified string.
find . -name "*string*" -print
Find files in the current directory (not-recursive) with a name containing the specified string.
find . -maxdepth 1 -name "*string*" -print
Find files in the current directory (not-recursive) with a name containing the specified string, but avoid files with a name containing "readme".
find . -maxdepth 1 -name "*string*" ! -name "*readme*" -print