[Klug-general] Bash script to delete folders if they exists
Nathan Friend
nathan.friend at gmail.com
Fri Jul 16 11:28:28 UTC 2010
It's for user folders on a mac. So the path is actually /Users/username
On Fri, Jul 16, 2010 at 12:18 PM, Stuart Brand <stuart at stuartbrand.co.uk>wrote:
> What do you want this for? Be careful if you're dealing Cyrus mailbox
> folders...
>
> "Nathan Friend" <nathan.friend at gmail.com> wrote:
>
> >Morning,
> >I would like a simple bash script to check if a list of user directories
> >exist and if they do delete them. If they don't output a message and skip
> >to next folder to check. E.g.
> >
> >Does /Home/user1 exist > Yes > Delete /home/user1 goto next check
> > No > "user1 not found" go to next
> >check
> >Does /Home/user2 exist > Yes > Delete home/user2 goto next check
> > No > "user2 not found" go to next
> >check
> >end.
> >
> >Any ideas how I can do this?
> >
> >Cheers,
> >
> >Nathan.
> >_______________________________________________
> >Kent mailing list
> >Kent at mailman.lug.org.uk
> >https://mailman.lug.org.uk/mailman/listinfo/kent
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/kent/attachments/20100716/dcd4d040/attachment-0001.htm>
More information about the Kent
mailing list