Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Delete files older then 5 days
- find /u01/app/oracle/diag/rdbms/firds/FIRDS/trace/* -mtime +5 -exec rm {} \;
- # Redirect output as sudo user
- #1 Run a shell with sudo and give the command to it by using the -c option:
- sudo sh -c 'ls -hal /root/ > /root/test.out'
- #2 Use sudo tee (if you have to escape a lot when using the -c option):
- sudo ls -hal /root/ | sudo tee /root/test.out > /dev/null
Add Comment
Please, Sign In to add comment