Redirect command output to a file:
ls *.png > image_files
Append command output to an existing file:
ls *.jpg >> image_files
Redirect command output to the input of another command: cat *.log | grep error
Create a directory: mkdir dir Create nested directories: mkdir -p dir1/dir2Changing...
List all “regular” files (not starting with .) in the current directory:lsDisplay a long...
Concatenate and display file contents:cat file1 file2Display the contents of several files...
Concatenate all “regular” files: cat *Concatenate all “hidden” files: cat .*Concatenate all files...
Show only the lines in a file containing a given substring: grep substring fileCase insensitive...