On Wednesday 02 January 2008 06:39, Stefan Hundhammer wrote:
> On Wednesday 02 January 2008 15:05, Istvan Gabor wrote:
> > How can I delete only soft link files from a directory using the
> > command line? I have too many files to delete them one by
> > one.

I should point out (and I hope I'm not too late) that there's an 
ambiguity in your (Istvan's) question (and / or a discrepancy with 
Stefan's suggested recipe):

You ask about deleting symbolic links "from a directory." Stefan's 
recipes will target all symlinks found anywhere within the entire 
directory hierarchy rooted at the first argument (all arguments to find 
that precede the first option are file or directory names to use as 
starting points for traversing the file system hierarchy.)

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


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

Reply via email to