| Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage |
|
|
|
LinuxPlanet / Tutorials
Fun With find and xargs: Sort Flash Cookies By DateMaybe you want to see your listing of Flash cookies sorted by date. Your first impulse might be to use -exec again, like this:
$ find -iname '*.sol' -exec ls -l "{}" \; But this won't work, because the -exec option processes one file at a time, so one file at a time will be sent to ls. We want all of the output of find sent in one batch to ls, which is a job for pipes and the xargs command, like this: $ find -iname '*.sol' | xargs ls -lt xargs is another endlessly useful command that takes the output of another command and lets you run other commands on it. You can do more than simply view your Flash cookies in date order; see man xargs for inspiration. Next: Preventing Flash Cookies »
|
Linux is a trademark of Linus Torvalds.
| home | search | help! | about us | |