Remove a Folder from Git
Tagged with: command, folder, git, reculsive, remove, rm
Friday, July 11th, 2008 09:41 PM
Remove a given folder from a Git repository…
git rm -r cache/
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 */* .
Copying a directory
cp -a dir1 dir2
Remove two directories and their contents recursively
rm -rf dir1 dir2
Remove a directory called ‘dir’ and contents recursively
rm -rf dir
Search string “test_text” at directory ‘/var/log’ and below
grep test_text -R /var/log/*
Estimate space used by directory.
du -sh dir
Go back to the previous folder
cd -
You can create a directory tree using just one command in Linux
mkdir -p /tmp/dir1/dir2