using Tar -cvf file.tar "Need Help"


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers using Tar -cvf file.tar "Need Help"
# 1  
Old 06-14-2005
using Tar -cvf file.tar "Need Help"

Ok,

I use the command tar -cvf ~kw4691/output/test.tar ~kw4691/input on one UNIX server, lets call it sneezy. I FTP the tared file over to another server, lets call it bashful. Use the tar -xvf test.tar command and get the error

~kw4691/input "could not create the directory"
/hom/dev/sy40 Premission denied
tar: ~kw4691/input/XXXXX.pdf - cannot create

I don't want to have to create the same directory on a different box, I just want to be able to un-tar in any dir after I FTP.

Please HELP

Thanks,

Kevin
# 2  
Old 06-14-2005
don't use absolute pathnames when creating an archive - use relative paths.
# 3  
Old 06-14-2005
I have no say where the original files to be tarred are located, and where the location of the tarred file once tarred. These are set locations.
# 4  
Old 06-14-2005
Try this:

cd ~kw4691; tar -cvf output/test.tar input

This should work.
# 5  
Old 06-14-2005
Yea, that does not work I was already at ~kw4691. I just want to be able to tar the files on one server , FTP to another server, and untar without having to match the path where the files were originally tarred.

i.e sneezy server /home/user/input/xxx.pdf's and on bashful server I don't want to have to create that same path "/home/user/input/". I want to be able to untar in /home or /home/user or wherever.

Thanks,

Kevin
# 6  
Old 06-14-2005
tar -cvf ~kw4691/output/test.tar -C /home/user/input .
# 7  
Old 06-14-2005
That's it.... "-C" before the input declaration.

Thanks,

Kevin
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Ubuntu

What is solution for this error "tar: Exiting with failure status due to previous errors"?

Does anyone know what is solution for this error ?tar: Exiting with failure status due to previous errors from last 3 days I am trying to take backup of home/user directory getting again and again same error please anyone give me solution (8 Replies)
Discussion started by: Akshay Hegde
8 Replies

2. UNIX for Advanced & Expert Users

"Walk" apache installs and do a tar on them...

Hello unix.com Community: I need help with writing a "common" script that can get the httpd installs by name and install directory|ies and tar.gz them up by name and point that tar operation to the matching install directory. I have 2 Distros that I am concerned with for this task: CentOS and... (3 Replies)
Discussion started by: Habitual
3 Replies

3. Shell Programming and Scripting

identify files with "Normal termination" and compress them into a .tar.gz file

Hi, I have hundreds of files "*.out" located in one folder, and I want to: 1. Identify the good files containing "Normal termination" (grep "Normal termination" *.out ) 2. Compress the good files into a tar.gz file (tar cvfz good.tar.gz *.goog.out ) Is there a way I can automate this... (4 Replies)
Discussion started by: rockytodd
4 Replies

4. Shell Programming and Scripting

Bus error while using command tar -cvf

Hi, I am working on a mac OSX machine. I am getting bus error :confused: when i use the command tar -cvf file1.tar file1 What could be the reason for this?? (1 Reply)
Discussion started by: shweeths
1 Replies

5. Shell Programming and Scripting

tar "--totals" writes to stderr not stdout?

I want to use the "--totals" option in GNU tar for some reporting, however I have discovered that it writes the output to stderr not stdout and I would like to know why. This is running from BASH. mkdir /tmp/test touch /tmp/test/foo.file cd /tmp/ tar --totals -clpzf test.tar.gz test 2>... (2 Replies)
Discussion started by: jelloir
2 Replies

6. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

7. UNIX for Dummies Questions & Answers

shortcut for tar cvf - [filename] | gzip > [filename].tar.gz

i'd like to have an alias (or something similar) where i can type a command like "archive" and a filename and have it tar and gzip the file, so... $ archive filename results in filename.tar.gz...do i have to write a script to do this? (4 Replies)
Discussion started by: bcamp1973
4 Replies

8. AIX

"tar" Check sum error

I have a tar file that contains some 50 files in it. while trying to untar i get a checksum error. iam unable to retreive the fiiles from that. Can anyone please help me...? (3 Replies)
Discussion started by: balaa
3 Replies

9. UNIX for Advanced & Expert Users

using TAR -cvf test.tar "HELP"

Ok, I use the command tar -cvf /home/output/test.tar /home/input on one UNIX server, lets call it sneezy. I FTP the tared file over to another server, lets call it bashful. Use the tar -xvf test.tar command and get a error indicating that it is looking for the same directory as where the... (3 Replies)
Discussion started by: wev
3 Replies
Login or Register to Ask a Question