Exclude "Permission denied" files for "ls -al"
Sometimes when I do "ls -al" I am given a list of files with Permission Denied messages. If I do "ls -al | grep -v 'Permission'" it'd still list them on the screen. Is there anyway to stop this?
I want to be able to do this ultimately but not when it keeps giving me these Permission Denied file names. find . -user 'username' -exec rm -rf '{}'\; |
Maybe dump the error messages to /dev/null (outer space!):
Code:
la -al 2>/dev/null |
Well the question you have to ask yourself is where are the error messages being delivered to, remembering that a pipe by default delivers stdout to the stdin of the next command.
|
Ah thanks thought the pipe command sends everything (both stdout and error) to the next command.
|
All times are GMT -5. The time now is 08:41 AM. |