Help with ls


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help with ls
# 1  
Old 09-13-2007
Help with ls

Hello:

How could I avoid that ls-command returns an error when there are no files to list?

ls path/*.DEL

Thank you in advance.
# 2  
Old 09-13-2007
Redirect the error output to /dev/null i.e.

Code:
ls path/*.DEL 2> /dev/null

# 3  
Old 09-13-2007
Thank you vino but the ls is in a for-file-in loop.
Sorry that i didn't mention it in my post.
# 4  
Old 09-13-2007
Excuse me for asking. What happens if it is in a for loop ?
 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question