[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mention exact ls switches
From: |
積丹尼 Dan Jacobson |
Subject: |
Mention exact ls switches |
Date: |
Fri, 16 Apr 2021 00:12:18 +0800 |
(info "(cpio) Options") says
'-v'
'--verbose'
[*note copy-in::,*note copy-out::,*note copy-pass::]
List the files processed, or with '-t', give an 'ls -l' style table
^^^^^^^^^^^^^^^^^^^^^
of contents listing. In a verbose table of contents of a ustar
archive, user and group names in the archive that do not exist on
the local system are replaced by the names that correspond locally
to the numeric UID and GID stored in the archive.
OK, but please mention the exact ls switches to make it really match.
OK, I think I figured them out:
f=/tmp/f
touch -d '10 years ago' $f.1
touch $f.2
ls $f.?|cpio -o|cpio -tv|tr -s ' ' #should give the same results as
LC_TIME=C ls -l '--time-style=+%b %e %Y
%b %e %H:%M' $f.?
#at least for files with no multiple blanks in their names.
Also mention there is no way to change cpio -tv date format at all,
so to compare what is in the archive with what is on disk, one needs my
above method.
In fact if the 'not created: newer or same age version exists' could be
a little more specific, saying which one it means, then one needn't make
elaborate scripts to find out too.
$ cpio --version
cpio (GNU cpio) 2.13
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Mention exact ls switches,
積丹尼 Dan Jacobson <=