FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 02-17-2012, 07:02 AM
FRank Murphy
 
Default rm no dir?

Sample dir for testing purposes.

In the following how can this be done,
so the symlink is kept.


ls -l /nfs/yum/x86_64/16/_local/

-rw-rw----+ 1 root root
4939e67271963d8214859447421aa2d5d76132703a68fec172 e365d465324e53-primary.sqlite

lrwxrwxrwx. 1 root root packages -> /nfs/yum/i386/16/_local/packages
-rw-rw----+ 1 root root repomd.xml

echo rm /nfs/yum/x86_64/16/_local/*
rm
/nfs/yum/x86_64/16/_local/4939e67271963d8214859447421aa2d5d76132703a68fec172 e365d465324e53-primary.sqlite
/nfs/yum/x86_64/16/_local/packages /nfs/yum/x86_64/16/_local/repomd.xml



man rm doesn't give anything on keeping symlinks.
I would like to have the job eventually to run as a cron.


--
Regards
Frank "Jack of all Fubars"
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 02-17-2012, 07:37 AM
FRank Murphy
 
Default rm no dir?

On 17/02/12 08:02, FRank Murphy wrote:

Sample dir for testing purposes.


Apolgies for self-reply:

This may do:
echo rm -H /nfs/yum/x86_64/16/_local/*.*
(sans echo)



--
Regards
Frank "Jack of all Fubars"
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 02-17-2012, 08:20 AM
FRank Murphy
 
Default rm no dir?

Still learning:

find /nfs/yum/x86_64/16/_local/ -type f ! ( -name packages ) | xargs
echo rm


seems to be it.

--
Regards
Frank "Jack of all Fubars"
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 02-17-2012, 09:09 AM
Joachim Backes
 
Default rm no dir?

On 02/17/2012 10:20 AM, FRank Murphy wrote:
> Still learning:
>
> find /nfs/yum/x86_64/16/_local/ -type f ! ( -name packages ) | xargs
> echo rm
>
> seems to be it.
>

Beware if the path or filename contains blanks or some other whitespaces!

--
Joachim Backes <joachim.backes@rhrk.uni-kl.de>

http://www.rhrk.uni-kl.de/~backes

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 02-17-2012, 05:03 PM
suvayu ali
 
Default rm no dir?

On Fri, Feb 17, 2012 at 11:09, Joachim Backes
<joachim.backes@rhrk.uni-kl.de> wrote:
> On 02/17/2012 10:20 AM, FRank Murphy wrote:
>> Still learning:
>>
>> find /nfs/yum/x86_64/16/_local/ -type f ! ( -name packages ) | xargs
>> echo rm
>>
>> seems to be it.
>>
>
> Beware if the path or filename contains blanks or some other whitespaces!
>

find .... -print0 | xargs -0 ....

--
Suvayu

Open source is the future. It sets us free.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 12:44 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org