Tree command
To give a structured view of directories. Now if you pipe grep
command, may be to find out an unwanted file, that’s so cool!
tree folderpath | grep unwantedfileName
Brace Expansion
To generate sequences of text. Think of it like meta programming, programming on programming!
touch file{1..3}.txt
# This runs as touch file1.txt file2.txt file3.txt
Repeating execution
Using watch - the following command displays the current date and time every second.
watch -n 1 date
Comparisons
The next one, diff command - my favourite. Comparing two files.
diff file1.txt file2.txt
Funny hack pattern
Some interesting pattern about commands are, you reverse the command name, the functionality gets reversed. For example, tac command displays the contents in reverse order.
cat file.txt
# normal order
tac file.txt
# reverse order
Will share some more, as I keep learning! Have fun!