![]() |
|
|
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 |
| Archiving the files | Sunitha_edi82 | Shell Programming and Scripting | 1 | 08-05-2008 08:50 AM |
| Archiving by Time | aefskysa | Shell Programming and Scripting | 4 | 07-18-2008 10:04 AM |
| Archiving big ammount of files. | Maxeg | UNIX for Dummies Questions & Answers | 3 | 03-27-2008 04:26 PM |
| Archiving and moving the files | nvuradi | Shell Programming and Scripting | 1 | 03-09-2007 08:58 AM |
| Backing up or Archiving files in UNIX | Dsartelle | UNIX for Dummies Questions & Answers | 2 | 09-16-2004 04:42 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Archiving and move files in the same time
Hi All,
I have tried so many command but none work like i wanted. I would like archive which i assume it will move the files and archive it somewhere. for example: if i have a folder and files: /home/blah/test /home/blah/hello /home/blah/foo/bar i would like to archive folder blah which including the subfolder. i use gtar -czf backup.tar.gz blah but it does not actually move the files "test" and "hello" and "bar" Is there any way to archive specific files inside directory/subdirectory but actually also move the files to the archive file but i would like to keep the dir structure as well? please help any advise.. |
|
||||
|
How about if you try Code:
gtar -czf backup.tar.gz blah/* Nb: But the files are not moved. The archive will have a copy of the files but they will still exist in /home/blah/... Last edited by Vi-Curious; 08-18-2008 at 12:52 AM.. Reason: Add comment |
|
||||
|
It is not going to move the files, ever. If you want the files moved, you need to move them. And where do you want them moved to or do you really just want them deleted? I don't think I understand what you want to happen.
As for my previous post, I guess I misunderstood you there as well. I thought you were saying that gtar did not put the files (located in the subdirectory) into the archive file. It should, without the /*, but I thought you were saying it didn't. |
|
||||
|
Ok..
What i'm trying to do is: I have many files that our company don't use anymore but i need to keep it up to 10 yrs.. What i want is to archive all those files to a separate harddrive/partition. if i use gtar -czf backup.tar.gz blah, it will give me a copy of those files to different location which i don't want that. i would like to take all those files away from source to destination but specific files only.. |
|
||||
|
I still don't understand your resistance to using the gtar archive. If you have files in some source directory that you want archived and stored in some destination, you can gtar the files to be archived, put the gtar file in the destination, and delete the files from the source directory. By using gtar, you are compressing the archived files so that they don't take as much disk space.
If, however, you really don't want to bother with the compressed archive file, you can just use mv to move the files where you want them. The main question, then, is how do you identify which files you need to archive? What is the criteria? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|