Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to compresse files with tar ?

Status
Not open for further replies.

haux

Programmer
Apr 11, 2001
79
DZ
How to compress all my files in /home/kerbachi to an archive kerbachi.tar.gz ?
please i am a newbie with Linux :(

Thanks for all :)
 
hi
i would use this command

tar -czf kerbachi.tar.gz /home/kerbachi/

if you do not want some file to be included in the archive add --exclude filename to the command
 
I had done :
tar -czf kerbachi.tar.gz /home/kerbachi/

in the directory /et/httpd/conf/

I got this message :
tar : Remouving leading '/' from member names

and the file is in the directory /etc/httpd/conf/ and not in the expected directory /home/kerbachi/ !!!

Thanks for all

 
the file is created in that directory where you run the command, if you want the file to be created in /home/kerbachi just do
tar -czf /home/kerbachi/kerbachi.tar.gz /home/kerbachi/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top