cat
Read the contents of a file in console
cat filename.txt
Override the contents of another file
cat source.txt > destination.txt
Concatenate multiple files to one
cat source1.txt source2.txt > destination.txt
grep
By default, the grep
command outputs entire lines that contain the match.
grep "search_string" filename
A line in a text file is a sequence of characters followed by a line break.
Find and list all .DS_Store
in current folder recursively
find . -name ".DS_Store"
Delete all files that are recursively matching from current directory.
-type f
is a tag to filter only for files, excluding directoriesfind . -name ".DS_Store" -type f -delete
$home
Represents user's home directory regardless of where it is being called from.
$home
is same as ~
.
std