jonny5alive wrote:
find . -name "*" -print | xargs rm -v
At the risk of starting a command improvement match, I would personally do:
Code:
find /var/lib/php5/session | xargs rm -v
The '-name '*' -print' portion in not necessary since find with no other arguments will print all items on the specified path. If you want to be safe then you might do:
Code:
find /var/lib/php5/session -print0 | xargs -0 rm -v
The -print0 and -0 arguments are to make find print the list as 0-terminated strings, and for xargs to parse them as so. This gets around issues with filenames with spaces in them, or worse, filenames with newlines in them, a potential security risk.
edit:
find's docs about file name handling.