bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vdir needed?


From: Dan Jacobson
Subject: Re: vdir needed?
Date: 24 Nov 2001 09:36:43 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "H" == Hans-Bernhard Broeker <address@hidden> writes:

H> Dan Jacobson <address@hidden> wrote:
>> Um, what is the major bonus of having this command instead of just a
>> tiny alias in ones .bashrc if one pleases,  etc.?:

H> Not everybody is allowed the luxury of using BASH or some other type
H> of shell that does have aliases.

OK, then make it a shell script, linked also to v,
that way it would even work in every situation

|`vdir': Verbosely list directory contents
|
|   `vdir' (also installed as `v') is equivalent to `ls -l -b'; that is,
|by default files are listed in long format and special characters are
|represented by backslash escape sequences.

Indeed, something like
ls -l -b ${1+"$@"}
or
exec ls -l -b ${1+"$@"}
would be a lot simpler than

# which vdir|xargs ls -l
-rwxr-xr-x    1 root     root        46780 10  2  2000 /usr/bin/vdir

ok, but not faster...

#which vdir|xargs file
/usr/bin/vdir: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically 
linked (uses shared libs), stripped

$ cat vdir1
ls -l -b ${1+"$@"}
$ cat vdir2
exec ls -l -b ${1+"$@"}
$ for i in vdir vdir1 vdir2;do echo ----------- $i:;time $i >/dev/null;done
----------- vdir:

real    0m0.193s
user    0m0.060s
sys     0m0.070s
----------- vdir1:

real    0m0.497s
user    0m0.200s
sys     0m0.260s
----------- vdir2:

real    0m0.481s
user    0m0.150s
sys     0m0.280s

so never mind.  sorry.
-- 
http://www.geocities.com/jidanni/ Tel+886-4-25854780



reply via email to

[Prev in Thread] Current Thread [Next in Thread]