Operating System - Linux
1833772 Members
2350 Online
110063 Solutions
New Discussion

Re: what's different by tar Pcj and tar cvjf ?

 
SOLVED
Go to solution
'chris'
Super Advisor

what's different by tar Pcj and tar cvjf ?

hi

I do backups of my webserver data with tar Pcj

my colleague is doing with tar cvjf

what's really different ?

kind regards
chris
8 REPLIES 8
Steven E. Protter
Exalted Contributor
Solution

Re: what's different by tar Pcj and tar cvjf ?

v stands for verbose output

f stands for use a file

some versions of tar default to a file of /dev/rmt/0m if you don't use the -f parameter and specify a file

P I believe stands for preserve permissions and/or Pathes.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jerome Henry
Honored Contributor

Re: what's different by tar Pcj and tar cvjf ?

Hi
tar Pcj means use absolute paths, of course create, and j zips through bzip2.
tar cvjf means still create, verbosely lists files created, zips through bzip2 and f stands to precise archive file or device to use.
So the main difference is that your colleague uses a more verbose output than you do, and designate the device or the file archive name to use, and you use absolute paths whereas he doesn't...
working on sunday both of you, along with Steven, hu ?

J
You can lean only on what resists you...
'chris'
Super Advisor

Re: what's different by tar Pcj and tar cvjf ?

thanks Steve

and which one should I use in your opinion ?
or how do you save your folders ?

kind regards
chris

'chris'
Super Advisor

Re: what's different by tar Pcj and tar cvjf ?

thanks Jerome

if I can ask only, where you guys from ?
you both, Steven and You
helped me so many times.

best regards
chris
Jerome Henry
Honored Contributor

Re: what's different by tar Pcj and tar cvjf ?

From France Chris (don't know if it's a good place to be or not, but computer don't make that difference),
teaching linux for years, and spending my time discovering new things !
And enjoying your questions always precise and well targeted.
As for your question to Steve, using absolute paths is a good idea, verbose is not useful if you know what you do, but I still like seeing the system confirming that everything goes the way I want, and f is useful only to precise archive to use, which doesn't seem to be a necessity for you (but if you precise it thenafter or before, adding it at that point wouldn't do any harm).
So a tar Pvcj could be workable.
Whatesoever, your way is efficient and working.
BTW, I between Valence and Gap, where do you leave in Switzerland ?

J
You can lean only on what resists you...
'chris'
Super Advisor

Re: what's different by tar Pcj and tar cvjf ?

thanks Jerome

I live close to Zürich.

have a nice sunday
chris
Steven E. Protter
Exalted Contributor

Re: what's different by tar Pcj and tar cvjf ?

I don't think it makes a difference Chris.

I use tar cvf to build or tar rcf to update and tar xvf to lay it down on the other machine.

So long as I position that tar file correctly everything works out.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
'chris'
Super Advisor

Re: what's different by tar Pcj and tar cvjf ?

thanks Steven