Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there an easy way to store the usual file attributes like modification time and permissions of a tree to some file, and reapply them later?

This would be useful in many situations where compressing, backup tools, file transfer or copying to less capable file systems result in losing the timestamps or permissions.

Maybe tar could do that in some odd way?

share|improve this question
add comment

2 Answers

tar doesn't need any odd way to do it, there is a -p switch to save permissions (it's used by default by the superuser).

share|improve this answer
    
Yes, but I want to store the attributes alone. I use other tools to store the files, but they do not reliable store attributes. So I like to use something that is able to store attributes but don't neccessary the file contents. –  dronus Aug 28 '13 at 13:20
add comment

Look up fsarchiver

It stores all attributes and files. However, I don't think you can just store the attributes alone.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.