I am trying to tar up a couple of sites using AIX 5.2. I am using tar -cvf tarname.tar directory/ etc. when I untar (tar -xvf tarname.tar) my file permissions on my target are not the same as my source. How can I get an exact copy of my source?
I tried it “tar -xvfp main_022410.tar” in AIX 5.2 I get a error message:
tar: Cannot open p: No such file or directory
AIX doesn’t seem to like the p function modifier.
I thought if I untarred as root I should get the original owners and permissions. This was not the case for the majority of the files. Owners were good the rights were not. Most were only rw-r-r where I was expecting rw-rw-r. I even had issues with directory rights.
You might want to check which tar executable you’re running. For some reason Cloverleaf ships with it’s own copy of tar, and the OS should also have one installed. The version of tar with our install (QDX 5.5, HPUX) supports the -p option.
When using the -f option for the standard version of tar the next thing on the command line must be the file name. That’s why it’s reporting it can’t find the file “p”. You should always make -f the last of multiple options unless you’re reading/writing to the tape drive.