want to 'tar' a folder without some contents of folder
Friends ,
Suppose I have a folder "test" . In test folder I have 5 files , Like "file1" "file2" "file3" "file4" and "file5" . Now I want to compress (tar) the "test" folder without the file "file4" and "file5" . Like follwing : tar -cvf test.tar test // it should not contain the 'file4' and 'file5' . Is it possible to do ? If yes then plz help me .... |
You should search for "exclude" in the tar manual page.
|
Code:
man tar Code:
/exclude |
If you use KDE you can also view manual pages in konqueror by entering
Code:
man:pagename |
exclude a folder using tar command
Thx all for reply ...
I can do it in the case of "file" format . But If I want to tar excluding a folder Like /var or /myfolder Like following way : tar -cvf test.tar --exclude /myfolder Then it does not working . Plz help how can I exclude a folder using tar ? |
You left out the files it *should* tar up?
|
All times are GMT -5. The time now is 10:47 PM. |