07-31-2015, 07:20 AM
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?
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?