Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Searching & moving


    Hi.

    Noobie question!

    I have a top level folder under public_html folder where my website is hosted and it regularly gets photos uploaded to it by security cameras, However, each day a new folder gets created automatically and I want to be able to run a cron job that will search for all .jpg files in the folder immediately under public_html and the subfolders under that and move them to a different folder under public_html - BUT NOT the folders as well.

    Any help would be greatly appreciated. Here is what I have so far, but it doesn't work at all:

    find ~/public_html/security_cameras/camera1/*.jpg -type f -print0 | xargs -0 mv -t ~/public_html/security_cameras/photos

    Thanks.
    Woz

  2. #2
    -->
    All good. I've managed to get it working

    Thanks.

Posting Permissions

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