Find the answer to your Linux question:
Results 1 to 3 of 3
Hi guys. I have constructed the following script, stored in a .bash file. This will help me clean my ftp-drive easily. The thing is that the folder Ghost_Images is kept ...
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    4

    [SOLVED] Have a look at this please!

    Hi guys.

    I have constructed the following script, stored in a .bash file. This will help me clean my ftp-drive easily. The thing is that the folder Ghost_Images is kept clear but not the contents of it...

    How do i exclude the folder Ghost_Images AND IT'S CONTENT?


    find . -ctime +15 ! -name "Ghost_Images" -exec mv {} /cygdrive/e/ftp/ \;

    find . -ctime +90 -exec rm {} /cygdrive/e/ftp/ \;


    Thanks in advance.

    Best Regards, Henrik

  2. #2
    Linux Newbie
    Join Date
    Sep 2007
    Posts
    161
    hi Henrik,

    i think you need to use the find test "-wholename" instead of "-name". check out the find manual, it'll give you the detail.

    cheers, kai

  3. #3
    Just Joined!
    Join Date
    Jul 2008
    Posts
    4
    Quote Originally Posted by kai12 View Post
    hi Henrik,

    i think you need to use the find test "-wholename" instead of "-name". check out the find manual, it'll give you the detail.

    cheers, kai
    Hi

    Thanks for the help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...