Find the answer to your Linux question:
Results 1 to 3 of 3
I am trying to find and delete a file using this Code: find . -type f -name ph2964781400100954291.jpg -exec rm -f {} \; It does not work, I think because ...
  1. #1
    Just Joined!
    Join Date
    Dec 2008
    Posts
    26

    [SOLVED] Find and delete file

    I am trying to find and delete a file using this
    Code:
    find . -type f -name ph2964781400100954291.jpg -exec rm -f {} \;
    It does not work, I think because by default on my distro rm is iterative.

    How do I fix this?

    Thanks a lot in advance.

  2. #2
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    find knows -delete
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Dec 2008
    Posts
    26
    Thank you that solved it perfectly

Posting Permissions

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