.DS_Store file
.DS_Store
File: DS_Store
is used to store display attribute this folder: for example, the placement of the file icon. After deleting these side effects is the loss of information.
Although these documents would have to Finder
be used, but they are conceived as a more general metadata stores information about the display settings, such as an icon location and view settings.
Prohibit .DS_store generation
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
Recovery .DS_store generation:
defaults delete com.apple.desktopservices DSDontWriteNetworkStores
Delete all directories ".DS_store" file
sudo find / -name ".DS_Store" -depth -exec rm {} \;
Reference dsstore what file
find command with the -exec command
Copy the file from the specified directory contains a lot of files to another directory, you will be reported the following error:
$ ls *_text.jpg
argument list too long: ls
$ cp *_text.jpg ~/Desktop/word
argument list too long: cp
This report errors actually prompt you ls
or cp
too many files, commands and parameters are not too long. Solutions are as follows, can cooperate find && exec
completed.
$ find . -name "*_text.jpg" -exec cp {} ~/Desktop/word
/**
说明:
查找当前目录下文件名包含_text.jpg的所有文件,拷贝到~/Desktop/word目录中,其中{}是find命令查找出来的所有结果
*/
operation result:
find: -exec: no terminating ";" or "+"
Appears find: -exec: no terminating ";" or "+"
the problem, the solution is simple, add a command in the tail \;
. That is, the above command with the following:
$ find . -name "*_text.jpg" -exec cp {} ~/Desktop/word \;
Not only that, but also take into reverse tif
format:
$ find . -name "*_text.jpg" -exec convert -negate {} ~/Desktop/word/{}.tif \;
Referring find the mac: -exec: no terminating "; " or "+" solution