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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using tar comand to achive range of files

Status
Not open for further replies.

knyam

Technical User
Mar 18, 2004
16
ZW
Hie

Is there a way in which you can use tar command to archive a range of files?

I would want to archive all directories except those starting with c*. i.e achive files from a to b and d to z.

how best can this be done?
 
Something like this perhaps (assuming these directories are in the current working directory)?

Code:
tar cvf /tmp/archive.tar [!c]*

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top