Posts Tagged With: folder

Remove a Folder from Git

Tagged with: , , , , ,

Remove a given folder from a Git repository…


git rm -r cache/
No Comments »

Create ISO Image of a Folder

Tagged with: , , , , , , ,

Create an iso image of a directory


mkisofs -J -allow-leading-dots -R -V "Label CD" -iso-level 4 -o ./cd.iso data_cd
No Comments »

Move Subfolder Files to Current Folder

Tagged with: , , , , , ,

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


mv */* .
1 Comment »

Copying a directory

Tagged with: , , , , ,

Copying a directory


cp -a dir1 dir2
No Comments »

Delete Multiple Folders

Tagged with: , , , , ,

Remove two directories and their contents recursively


rm -rf dir1 dir2
No Comments »

Remove a Directory Recursively

Tagged with: , , , , ,

Remove a directory called ‘dir’ and contents recursively


rm -rf dir
No Comments »

Seach for a String in a Folder using grep

Tagged with: , , , , ,

Search string “test_text” at directory ‘/var/log’ and below


grep test_text -R /var/log/*
No Comments »

Show Space Usage of a Directory

Tagged with: , , , , ,

Estimate space used by directory.


du -sh dir
No Comments »

Command to io to Previous Folder

Tagged with: , , , , ,

Go back to the previous folder


cd -
No Comments »

Create a Directory Tree in One Command

Tagged with: , , , , , ,

You can create a directory tree using just one command in Linux


mkdir -p /tmp/dir1/dir2
No Comments »