Oracle Solaris System Administration (MOSC)

MOSC Banner

Differences of tar and cpio related to preserving attributes

edited Jul 26, 2011 7:44AM in Oracle Solaris System Administration (MOSC) 3 commentsAnswered ✓
Hello,
It seems that the only way to guarantee that tar will preserve attributes is when it's run as root.
Performing as a regular user, as below, may not preserve attributes as expected:
$ tar cpv@f backup.tar somedir
By contrast, cpio seems to preserve attributes even when not run as root.
$ find somedir | cpio -oP@ > backup.cpio
Carlos.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center