Tag: folder

Move files from Folder 2 Levels Deep

Use this command to move files from folders two level deep to the current folder… mv */*.* .

Incremental Backup with tar

Make a incremental backup of directory ‘/home/binnyva’ tar -Puf backup.tar /home/binnyva

Zip Command in Linux

Command to create a zip file from a given folder. zip -r File.zip Folder/

rsync Local Folder with Remote

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 using SCP

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 Open File in a Given Directory

Find the process that’s opened the file from a specified directory. You can use this if you cannot unmount a…

Create a Bzip2 File

create a tarball compressed into bzip2 tar -cvfj archive.tar.bz2 dir

Remove a Folder from Git

Remove a given folder from a Git repository… git rm -r cache/

Create ISO Image of a Folder

Create an iso image of a directory mkisofs -J -allow-leading-dots -R -V “Label CD” -iso-level 4 -o ./cd.iso data_cd

Move Subfolder Files to Current Folder

This command moves all the files in the subfolder to the current folder. mv */* .