DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Removing multiple file in solaris

  1. #1
    Join Date
    Dec 2001
    Location
    Baltimore, MD
    Posts
    374

    Removing multiple file in solaris

    Hi all
    How can I delete multiple in solaris
    New to unix and dba before me never trim the alert logfile. we have log file date jan 2003. I need to remove them as we have space issue. I was removind them one by one but I know that there is got to be a better way to remove multiple file

    alert_vault.04072004.log*
    alert_vault.04082004.log*
    alert_vault.04102004.log*
    alert_vault.04112004.log*
    alert_vault.04122004.log*
    alert_vault.04132004.log*
    alert_vault.04142004.log*
    alert_vault.04152004.log*
    alert_vault.04162004.log*
    alert_vault.04172004.log*
    alert_vault.04182004.log*
    alert_vault.04192004.log*

    Can someone help
    Thanks
    Last edited by Ablakios; 10-30-2004 at 10:31 PM.
    Arsene Lupain
    The lie takes the elevator, the truth takes the staircase but ends up catching up with the lie.

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    It's a lot like DOS (if you are familiar those commands).

    rm alert_stsiog.04*.log

    will remove all of your April files.

    Make a bunch of files (or just copy the ones you have now if they're not too big) into a "playground" directory and experiment with the wild cards you can use. That's the best way to learn.

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    cd $ORACLE_HOME/admin/yoursid/bdump
    find . -type f -mtime +30 -exec rm -f {} \;
    Jeff Hunter

  4. #4
    Join Date
    Dec 2001
    Location
    Baltimore, MD
    Posts
    374
    Thanks to both Stecal and Jeff.
    Note to Jeff:
    Could please elaborate a little on the combination of the wildcard command?. Will it remove 30 days worth of log?
    Arsene Lupain
    The lie takes the elevator, the truth takes the staircase but ends up catching up with the lie.

  5. #5
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    man find
    Jeff Hunter

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