To remove large no.of files using rm *.req gives Error
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: To remove large no.of files using rm *.req gives Error

  1. #1
    Join Date
    Feb 2001
    Location
    Atlanta, USA
    Posts
    131
    Dear Gurus,

    I need to delete large no. of files in a purticular directory in Solarix 8, using rm *.req

    But, rm prompts "Long List Error", so, you can not remove"

    Could some one throw some light on this.

    TIA

    Anandharaj
    Anandharaj
    a_anandharaj@yahoo.com

  2. #2
    How about trying ls *.req > {file}

    vi the file and substitute the begining of each line with rm
    then execute the file like a script.

    for example:

    rm gfsdfsd.req
    rm sdfsdfs.req
    rm sdf dfsdc.req

    I am sure there are better ways of doing this, just one way to do it.
    The brain is a wonderful organ; it starts working the moment you get up in the morning and does not stop until you get into the office.

  3. #3
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    simpler :

    find YOUR_DIRECTORY -type f -name '*.req' -exec rm -f {} \;

  4. #4
    Join Date
    Feb 2001
    Location
    Atlanta, USA
    Posts
    131
    Hi Pipo,

    Say for example,
    My path is /d01/ora/app/1103/log

    i have lot of *.req files.

    I need to delete all the *.req files only from that directory, so could I issue the command something like below:

    find /d01/ora/app/1103/log -*.req f -name '*.req' -exec rm -f {} \;

    pls confirm.

    TIA
    Anandharaj
    a_anandharaj@yahoo.com

  5. #5
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    find /d01/ora/app/1103/log -type f -name '*.req' -exec rm -f {} \;

    if you are not sure, just check files that will be impacted by doing :


    find /d01/ora/app/1103/log -type f -name '*.req' -exec ls -la {} \;


Posting Permissions

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



Click Here to Expand Forum to Full Width