Bash
Watch for file change
tail -f file
Move file/directory
mv /path/to/source /path/to/dest
-v
add verbose
for multiple directories (in this case 2 but can be done with more) at once:
mv /path/to/source1 /path/to/source2 -t /path/to/dest
-t
is for the target directory to move to
Copy file/directory on/from a remote machine
From remote:
scp user@ip_or_name:/path/to/source/ /path/to/dest
To Remote:
scp /path/to/source/ user@ip_or_name:/path/to/dest
-r
for directories
-P
for a specific port
Disk Usage
The command du
(disk usage) lets you find out how much space is used by files.
Human-readable
-h
shows the size of the files in a more human-friendly format (Ko, Mo, Go, To).
Summarize
-s
sums the sizes of all the files and subfolders in the given folder.
Limit depth
-d N
limits the depth of the output to subfolders of depth N
.