![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Listing directories and sub directories | jinxor | UNIX for Advanced & Expert Users | 3 | 03-11-2008 07:27 AM |
| moving directories to new directories on multiple servers | mackdaddy07 | Shell Programming and Scripting | 0 | 04-06-2007 08:30 AM |
| [awk]: Row begins by random number and field 10 is greater than 10.00% | Lomic | Shell Programming and Scripting | 3 | 03-18-2005 06:59 AM |
| remane a file that begins with $$$ | westcoldspring | UNIX for Dummies Questions & Answers | 3 | 11-01-2004 02:24 PM |
| what is the . and .. directories ? | ssmian | UNIX for Advanced & Expert Users | 8 | 03-02-2004 01:30 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
how to tar directories that begins with 'sample_ZZZ'????
Hi,
I have a bunch of images (8k) in several directories. I want to tar these directories up and unzip them to development and production with the same path. Example: /about/images/sample_01 /about/images/sample_02 /about/images/sample_03 /about/images/lorem_ipsum /about/images/lorem_ipsum2 ... ... How would I tar up all the directories that begin with 'sample_'? Thanks for your help. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
I'm guessing that all the sample_* directories are under /about/images
cd to the /about/images and the run the following: Code: tar cvf sample.tar sample_* This will create a /about/images/sample.tar file. View the table of contents of your tar file to see if all the directories and sub-directories are intact: Code: tar tvf sample.tar Run the following on your production or development environment tar xvf sample.tar |
|
#3
|
|||
|
|||
|
Correct. Let me try and report back. Thanks for your response!
|
|
#4
|
|||
|
|||
|
Ok, I was able to the tar the directories correctly however... when I went to un-tar it, i got the following error message:
tar: can't set time on genga_58: Read-only file system tar: genga_title.html - cannot create tar: genga_title.pff - cannot create tar: genga_title.txt - cannot create tar: zoomifyViewer.js - cannot create tar: can't set time on genga_title: Read-only file system i cd to my destination and did the following cmd: tar -xvf /xxxxxxx/xxxxxxxxxx/genga.tar Can some one hep with the un-tarring? Thanks! |
|
#5
|
|||
|
|||
|
Below is my assumption on what is happening and what could be done...
Are you running the below command from the root [/] ? If you are then you need write permissions on the root directory? The below command means that you are trying to extract all the files and directories to the root directory. tar -xvf /xxxxxxx/xxxxxxxxxx/genga.tar I would suggest to 'cd' into /xxxxxxx/xxxxxxxxxx/ and run: tar -xvf genga.tar This will try to extract your files and directories to /xxxxxxx/xxxxxxxxxx/ where I guess you have the write permission. |
|||
| Google The UNIX and Linux Forums |