The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to delete specific files

Discussion in 'General Discussion' started by big_bull, Jun 27, 2008.

  1. big_bull

    big_bull Well-Known Member

    Joined:
    Nov 19, 2006
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello,

    Will you please provide any command to search for specific file and delete it.

    I have tried :

    find -name *.mp3|awk '{print $5}'|sed 's/\:/ /g'|awk '{print "rm -rf "$1}'

    and

    find -name *.mp3 -exec rm {} \;

    but it is giving error.
     
  2. freelancer4u

    freelancer4u Member

    Joined:
    Oct 26, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    This should work


    :)
     
Loading...

Share This Page