command line - How to delete all ._ files? - Ask Ubuntu


i replaced default macos (el capitan) ubuntu 16.10 (on macbook pro 11.1, , backed documents external drive.

when migrated documents drive, ended lot of ._ files (including ._ds_store, ._.ds_store, , copies of several documents starting ._ followed original document name.

i rid of files. tried bleachbit, 1 apparently finds ._ds_store files, not other types. interested in figuring out way safely delete these ._ duplicates of documents. also, these ._ files scattered around on several different folders , sub-folders, able make system-wide search spot them , delete them, without deleting care about.

could recommend best way this? thanks

using find, parent, recursively:

find . -type f -name '._*' 

after checking append -delete remove files:

find . -type f -name '._*' -delete 

using bash, parent directory:

shopt -s globstar  ## enables recursive glob match f in **/._*; [[ -f $f ]] && echo "$f"; done 

after checking, do:

for f in **/._*; [[ -f $f ]] && rm "$f"; done shopt -u globstar 

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User