Bash
Command line Options or Flag
By using an option, you can modify what your original command does. Most commands have plenty of options. You can apply them by:
-
typing your original command (e.g. wc)
-
then a space and a dash ( -)
-
then the option name (e.g. w)
General syntax:
command -option
A few e.g.:
wc -w some_data.csv
On its own, wc counts the number of lines, words and characters in some_data.csv.
But with the -w option, it only counts words.
ls -l
ls lists all the content of your current working directory.
But with the -l option, it also displays additional information for the given files and
directories (e.g. size, date of creation, owner, permissions).
tail -50 some_data.csv
tail prints the last 10 rows of the some_data.csv file.
But with the -50 option, it prints the last 50 rows instead.