![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Zipping files older than one month | ramky79 | Shell Programming and Scripting | 2 | 04-07-2008 04:39 PM |
| tar'ing and regular expressions | sirbrian | UNIX for Dummies Questions & Answers | 2 | 07-10-2007 07:17 AM |
| Zipping | dreams5617 | UNIX for Dummies Questions & Answers | 1 | 02-11-2007 08:03 PM |
| Zipping the dir | dreams5617 | Shell Programming and Scripting | 1 | 07-26-2006 12:20 AM |
| Error tar'ing files to tape | FredSmith | SUN Solaris | 6 | 10-06-2005 10:52 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
tar'ing and zipping files
If I have a directory /directory1 and want to tar and zip everything in it into a file new_tar.tar.gz on disk (not tape)
How can I do it? I tried tar -cv /new_tar.tar /directory1/* But I got an error: tar: /dev/rmt/0: No such device or address |
|
||||
|
I would personally never tar anything up with an 'absolute' file name as you'll never know whether you'll have permission to untar it/whether you'll overwrite someone's much needed directory.
I would do the following from directory1: tar cvf home_directory/new_tar.tar * |
|
||||
|
here ...
tar by the name is "tape archive" so it assumes, if "-f" option wasn't provided it tries to put file on the tape drive: /dev/rmt is a acronym of tape drive in UNIX.
So you give it "-f" option and a file name to redirect archive to file and not to tape. Today's tar is quite improved so there's no need to use compression as a separate program. Just add "z", like "tar -cvzf". Some versions of tars take the list of parameters without "-" but normally it is required. Get "UNIX Essentials and UNIX Core" DVD or "UNIX in 24 hours" as they teach all this stuff. Hope it helps. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|