Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, was wondering how I can delete the contents of a dir. Using a command because I want to use it as a cron job on my server. Thanks --Mike...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2003
    Location
    Minnesota
    Posts
    9

    deleting contents of a dir from command


    Hi, was wondering how I can delete the contents of a dir. Using a command because I want to use it as a cron job on my server.

    Thanks
    --Mike

  2. #2
    Just Joined!
    Join Date
    May 2003
    Location
    Minnesota
    Posts
    9
    nvm, for some reason wildcard slipped my mind.

    I just use a
    Code:
    rm *

  3. #3
    Just Joined!
    Join Date
    Jul 2003
    Posts
    4
    cd /directory
    rm -f *

    you want to be sure you're in the right directory when you issue that command otherwise you may smash your box.

  4. $spacer_open
    $spacer_close

Posting Permissions

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