On Wednesday 02 January 2008 07:32, Randall R Schulz wrote:
> ...
>
> If you want to limit the operation to a single directory, add
> the "-maxdepth 1" option:
>
> % find directoryName -maxdepth 1 -type l -print0 |xargs -0 rm

Separately, you might want to run the command once first without 
the -print0 and the xargs in the pipeline just to get a list of the 
files that will be affected:

% find . -type l

You could save this to a file and inspect or save it or you could just 
pipe it to "less" to view it directly.

If you want to see the targets of the links as well as the links, do 
this:

%  find . -type l -print0 |xargs -0 ls -l

(Again, send to a file or pipe through "less.")


Randall Schulz
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to