man
followed by the command name
To find your current path use “pwd”
Syntax: pwd
To change to a specific directory use cd command
Syntax: cd <filename>
Syntax: ls
Type man ls
for more options
ls -ltr
List files by time in reverse order with long listing
General Syntax: *
*
can be used as a wildcard in Unix/Linux
In case of directory, “x” grants permission to list directory contents
If you own the file, you can change its permissions with “chmod”
Syntax: chmod [user/group/others/all]+[permission] [file(s)]
To create a new directory, use the mkdir command
Syntax: mkdir <dirname>
To remove an empty directory, use "rmdir".
Syntax: rmdir <dirname>
Dumps an entire file to standard output
Syntax: cat <filename>
“less” displays a file, allowing forward/backward movement within it
Syntax: less <filename>
“head” displays the top part of a file
Syntax: head <filename>
Same as head, but shows the last lines
Syntax: tail <filename>
Copies a file from source to destination
Syntax: cp <source> <destination>
To move a file to a different location use “mv”
Syntax: command <source> <destination>
To remove a file use “rm”
Syntax: rm <filename>
rm -r
To count the characters, words, and lines in a file use “wc”
Syntax: wc <filename>
The outputs are lines, words and characters.