
17 Sep
2013
17 Sep
'13
10:35 a.m.
On Tue, September 17, 2013 8:06 pm, Russell Coker wrote:
ls -l *.mkv *.avi *.mp4
The above command will give me errors if I happen to have no .avi files or no .mkv files.
How can I write a command to give a list of all video files and not give an error if some don't exist? Preferably in bash, but I'm willing to try another shell if necessary.
You could always redirect the error message to /dev/null e.g., lev@racoon:~/Desktop$ ls *.mkv *.avi *.mp4 *.xxx 2> /dev/null 1.mkv 2.mkv 3.avi 4.avi 5.mp4 6.mp4 -- Lev Lafayette, BA (Hons), GCertPM, MBA mobile: 0432 255 208 RFC 1855 Netiquette Guidelines http://www.ietf.org/rfc/rfc1855.txt