jung_ming2611
01-23-2006, 05:48 PM
I was wondering whether anyone can help me recover a problem.
My initial aim was to tar up a folder which contained many many photos for archiving on my own computer.
I logged in via SSH and *I think* ran the command:
tar -cvf pics.tar /location/to/folder/i/want/tarred
when it completed, i checked out my ftp area and it seemed that all the files that I tarred up had turned into compressed files themselves effectively creating a tarred tar of files.... does anyone know what happened and how I can resolve this? I tried extracting the tar but it just extracted all of the compressed images...
thanks.
LinuxMaster
01-23-2006, 08:46 PM
With that command you would have made /location/to/folder/i/want/tarred into "pics.tar" in your WORKING DIRECTORY. Is that not what you wanted? All your pics in a compressed file? tar -xvf pics.tar will extract them when you need them again.
LinuxMaster
01-23-2006, 08:49 PM
After reading it again... all your individual pictures seem to be tarred seperately?
Try this ---> tar -xvf pics.tar;mv pics.tar pics.temp;tar -xvf *.tar
jung_ming2611
01-23-2006, 08:56 PM
thank you for your reply :)
I have just tried entering that command into SSH and it has extracted as normal, but then when its finished I get the following error.
tar: *.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
I am in my own base area where the pics.tar file is.
edit: also.. the files extraced are .gz files if that helps.
ie "Picture 063.jpg.gz"
jung_ming2611
01-23-2006, 09:27 PM
Sorry for double post but I cant edit previous post:
After trying to do that last command within a folder with .gz files inside I get the following:
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: 2004_0812devon0004.jpg.gz: Not found in archive
which means... hrmm...
jung_ming2611
01-23-2006, 09:29 PM
Sorry for double post but I cant edit previous post:
After trying to do that last command within a folder with .gz files inside I get the following:
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: 2004_0812devon0004.jpg.gz: Not found in archive
which means... hrmm...
edit again!
i used gunzip *.gz within a folder and it unzipped them... i guess i used gzip... :S sorry!
does anyone know how I can do that to all the folders instead of manually within each folder? i have around 40...
LinuxMaster
01-23-2006, 10:34 PM
Use this command:
gzip -d ./*/*.gz
LinuxMaster
01-23-2006, 10:36 PM
This may be helpful to...
mkdir ~/pictures;mv ./*/*.jpg ~/pictures
that will create a pictures directory in your home directory then move all your jpg's to it so you don't have them in their own seperate directories anymore.
jung_ming2611
01-23-2006, 10:38 PM
Thank You Very Much for Your Help :)
It all worked and I have my pictures working as normal! :peace: