Results 1 to 3 of 3

Thread: Telnet Command Question - Delete Single File From Multiple Directorys

  1. #1
    You do realize by 'gay' I mean a man who has sex with other men?
    Join Date
    Oct 2003
    Location
    New Orleans, Louisiana.
    Posts
    21,635

    Telnet Command Question - Delete Single File From Multiple Directorys

    Anyone happen to know the telnet command to delete the same file name across a few thousand directorys?

    Specifically, the thumbs.db file.

    These are all on a unix server if that makes any difference.

    Regards,

    Lee


  2. #2
    virgin by request ;) Chilihost's Avatar
    Join Date
    Oct 2003
    Posts
    4,496
    Lee, depending on how you are setup on the server, you can use * in a forced delete, ie,
    rm -f /var/www/html/images/*/Thumbs.db
    rm -f /var/www/html/images/*/*/Thumbs.db

    etc...

    Not sure if there is another way that is more efficient

    cheers,
    Luke


  3. #3
    dant
    Guest
    A more appropriate way of doing this, would be to use the following:

    Go into the directory tree where you wish to start.

    find . -name "filename.goes.here"|xargs rm -rf

    This will execute the command "rm -rf" for each file that the "find" command returns.

    I would highly suggest using SSH instead of telnet, for various reasons. A quick search on google will assist you in finding reasons why telnet is no longer used, and SSH has taken over.

    Thanks


Posting Permissions

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