|
From: | Live user |
Subject: | [Bug-tar] Directories are listed like files, no trailing slash shown |
Date: | Fri, 2 Nov 2012 21:24:46 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 |
Either using tar -tf archive.tar OR tar --list -f archive.tarDoesn't show the trailing slash that corresponds to a dir, making impossible to know if the content is a directory or a file without having to use verbose output.
Example: get the contents of a tar archive to a text file: tar --list -f myarchive.tar dir1 dir1/data.dat Where it should be dir1/ dir1/data.dat So I can filter either directories or files: Only files: tar -tf archive.tar | grep -v /$ > files.txt Only directories: tar -tf archive.tar | grep /$ > directories.txt
[Prev in Thread] | Current Thread | [Next in Thread] |