Monday, August 8, 2011

How to remove all *.lnk files from pen drive

Yesterday, I have connected my pen drive on someone else's system. Now, when I return home and connected my pen drive on my system, I have found lnk files for each file and directory in my pendrive. It is a waste of time deleting those files one by one. So, here is a simple command to remove all lnk files.

# find /path/to/pendrive -name '*.lnk' -exec rm -v '{}' ';'

12 comments:

  1. Sounds like "someone else" has a virus...

    Also, with find on Fedora, you should just be able to use -delete.

    ReplyDelete
  2. find /path/to/pendrive -type f -iname '*.lnk' -print0 | xargs -0 rm -vf

    ReplyDelete
  3. find /path/to/pendrive -type f -name '*.lnk' -delete

    ReplyDelete
  4. While searching through net I found that your link Promotional Pens gives a knowledge regarding varities of pens, which is more beneficial in our work.
    Thanx alot for giving such a beneficial information.

    ReplyDelete
  5. Hi I agreed you blog is very good interest to read. By Regards Wholesale Printing And Postcard Printing

    ReplyDelete
  6. sorry it didn"t help me. by-the-way can you just let me know how to get that file which has been defected by virus

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. Nice Post Thanku for Sharing........


    Best Online Computer Technical Support‎ Company 2015


    Delwyn Technologies

    ReplyDelete
  10. Here you can buy best pen dives. PTron Idrive High Speed 16GB 3 in 1 OTG Pen Drive Lightning Micro USB For IOS And Android SmartPhones.

    ReplyDelete
  11. they starting making the Sport Pen (or Ladies Pens, or Pocket Pens) after a run of nice dip pens. They really haven't changed that much since they kicked it off. http://www.chinawholesaletown.com/wholesale-Pen/

    ReplyDelete
  12. Hii
    Now and then, you may keep running into issues utilizing the printer when printing your pictures and archives. These difficulties can be settled by getting the assistance of specialized specialists.

    If any one know more about Hp Printer Visit To Technical Supports For Hp Printer | +1-855-517-2433

    ReplyDelete