Move files from Folder 2 Levels Deep
Use this command to move files from folders two level deep to the current folder…
mv */*.* .
Use this command to move files from folders two level deep to the current folder…
mv */*.* .
Make a incremental backup of directory ‘/home/binnyva’
tar -Puf backup.tar /home/binnyva
Command to create a zip file from a given folder.
zip -r File.zip Folder/
Synchronize a local directory with a remote directory via ssh and compression
rsync -az -e ssh --delete ip_addr:/home/public /home/local
Copy files/folder to a remote server.
scp <file> binnyva@192.168.0.100:/home/binnyva/
scp -r <folder> binnyva@192.168.0.100:/home/binnyva/
Find the process that’s opened the file from a specified directory. You can use this if you cannot unmount a USB drive and want to know which file is open.
lsof +D /media/usb
create a tarball compressed into bzip2
tar -cvfj archive.tar.bz2 dir
Remove a given folder from a Git repository…
git rm -r cache/
Create an iso image of a directory
mkisofs -J -allow-leading-dots -R -V "Label CD" -iso-level 4 -o ./cd.iso data_cd
This command moves all the files in the subfolder to the current folder.
mv */* .