Directory Manipulation
Change directory
cd
|
Remove directory
rmdir
|
Move directory
mv source destination
|
Remove all files recursively
rm -rf
|
Copy directory or file
cp source destination
|
Create shortcut
ln -s path alias
|
Create directory
mkdir directory name
|
Create empty file or update time stamp.
touch filename
|
Navigation
List all directory contents in long data form
ls -al directory
|
Find all java files by extension
find directory -name pattern
|
Find all indexed paths in updatedb
locate option pattern
|
Finds source, binary and manual files:
whereis filename
|
Shows full path of command
which -a filename
|
Display
Variable string
echo string
|
Numbered-line text
cat -n filepath
|
Scrollable numbered-line text
less -N filepath
|
Current directory
pwd
|
Beginning of a file
head
|
End of a file
tail
|
Count: character, word and line
wc
|
Directory hierarchy
tree path
|