Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a tar archive and want to see the content with the group-ids and user-ids. When using

tar --list -v --file file.tar

I see the user and group names, but I want to see the user-ids and group-ids instead. How can I achieve this? Or are the users itself stored in a tar archive, and not the ID?s?

share|improve this question

1 Answer 1

When you create a tar archive, the tar utility store the User ID. When you show the content, it looks for the user in /etc/passwd, if it is found print the username, if not print the ID.

To avoid this behaviour try with the --numeric-owner option.

share|improve this answer

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.