file operations in BASH
How can I perform file operations using criteria other than file names?
For instance, using ls but only displaying files with a certain owner or files modified on a certain date? Same for cp, rm, mv, etc. |
well, you could do
ls -al | grep root that would show all the files and directories that either belong to root or are in the root group. That won't work on cp, rm, or mv tho. I can't think of any way to use those like that. Anyone else? |
The following will find and list all files owned by root in the current (./) directory
$ find . -user root -exec ls -la {} \; `man find` for other options. |
All times are GMT -5. The time now is 05:19 PM. |