Force "ls" to show .exe extension
Paul
Paul.Domaskis@gmail.com
Wed Jan 7 16:09:00 GMT 2015
Buchbinder, Barry (NIH/NIAID) [E] <BBuchbinder <at> niaid.nih.gov> writes:
>Paul sent the following at Tuesday, January 06, 2015 7:12 PM
>> I'm wading through many files in two file trees. In particular, I'm
>> looking at corresponding directories in the two trees where "diff
>> -qr" revealed differences. I want the absolute truth of what the
>> filename is with minimal distractions about how to achieve that.
>> Then, I can focus on figuring how those files came about, and how
>> the differences arose.
>
> Not a Cygwin solution but the following should give real names.
>
> cmd /c dir /b /a:
>
> (The /a: makes sure that hidden files are listed.)
That works great, Barry. The following also works:
cmd /c dir /b /a: | dos2unix | xargs ls -ltd
However, variation#1
type -pa pdfcrop | xargs cmd /c dir /b /a:
doesn't work because dir expects DOS filenames (I suspect).
Variation#2
type -pa pdfcrop | xargs cygpath -aw | xargs cmd /c dir /b /a:
doesn't work because the backward slashes are interpretted by Escapes
by bash.
Variation#3 (on *one* line):
type -pa pdfcrop | xargs cygpath -aw -t mixed | xargs cmd /c dir /b
/a:
doesn't work because
Parameter format not correct - "cygwin64"
To find out what was going on, I stuck an "echo" in front of cmd,
which yielded the following (on *one* line):
cmd /c dir /b /a: C:/cygwin64/home/User.Name/bin/pdfcrop
C:/cygwin64/usr/share/texmf-dist/scripts/pdfcrop/pdfcrop.pl
C:/cygwin64/usr/share/texmf-dist/scripts/pdfcrop/pdfcrop.pl
I think the dir command is interpreting /cygwin64 as a command switch.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list