Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I delete all hidden files from a folder in the Terminal?
#1
When I copy a bunch of jpg's to a flash drive, or an SD card, I also seem to create a bunch of hidden files. These are all small files of 4096 bytes.

These devices are formatted MS-DOS (FAT32)

For example, if I copy a jpg with the filename of IMG_3232.jpg, I also end up with a hidden file called ._IMG_3232.jpg in the same directory. I can see this when I use the ls -al command at the terminal after I've navigated to the folder with the images I've copied. These hidden files cause serious problems when trying to run a slideshow on my television using the TV's SD card input, or my iDevice with the flash drive.

Is there a way to batch remove all of these hidden files (without deleting the real files) using some sort of wildcard in the terminal?



For example, if I do this command:

rm *.jpg

I will delete all jpg files in a directory.



Would something like:

rm *._

do the trick?
Reply


Messages In This Thread
How do I delete all hidden files from a folder in the Terminal? - by freeradical - 07-31-2015, 07:20 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)