[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC] ls: new option --full-path
From: |
Bauke Jan Douma |
Subject: |
[RFC] ls: new option --full-path |
Date: |
Sat, 17 Apr 2004 14:03:20 +0200 |
User-agent: |
Mutt/1.4.1i |
Good morning,
At the risk of being diagnosed with featuritis, I would like
propose here a new option to 'ls', namely --full-path / -P,
which would enable you to get an unambiguous fully qualified
path for the files listed.
Example:
$ cd / && ls -l --full-path /usr/X11R6/bin | head -n 5
total 17328
lrwxrwxrwx 1 root staff 7 May 18 11:55 /usr/X11R6/bin/X ->
/usr/X11R6/bin/XFree86
-rws--x--x 1 root staff 1621548 May 20 00:03 /usr/X11R6/bin/XFree86
-rwxr-xr-x 1 root staff 2764 Sep 30 2002 /usr/X11R6/bin/XWindows
-rwx--x--x 1 root staff 27494 Mar 6 14:41 /usr/X11R6/bin/Xmark
Full path output would be useful for instance when making file
system 'ls-laR' dumps that you would expect people to grep for
file locations.
Before this is implemented -- I'm not sure if it should be
the full path relative to / or relative from cwd.
I seem to recall I was trying to implement this about two
years ago with the aid of 'find' and 'xargs', but had a hard
time -- something with quotes and whitespace iirc. Now that I
think of it, I believe I had a working diff for ls.c at the
time.
Any thoughts?
-BJ
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [RFC] ls: new option --full-path,
Bauke Jan Douma <=