//View Tip #403
Similar Tips
» Stream shell commands to Twitter
» Changing file extensions
» Keeping your Home Directory Organized
» Directories and its size
» Change extension of files in the current directory

 

Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
If you just want to find out what's new in a directory:

lsnew() { ls -lt ${1+"$@"} | head -20; }



View Comments »




Comments 

Add your comment

Comments are currently disabled
I tend to use `ls -ltr` to see the most recent files.  Simple and quick
Posted 2008-11-14 19:10:25
What does this do:

 ${1+"$@"}

?

I can't see that it does anything other than pass the function arguments to ls.

(Incidentally, you should add "--" to the ls call to make sure it doesn't try and parse any of the arguments as command line options.)
Posted 2008-11-16 02:26:22

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit