I have some commands that I basically do not understand quite well and I would like someone with knowledge of OS linux to help me.
find -name "*mp3*" -exec mv {} $HOME \
I know that I find it doing a search in all the directories where the files or directories that contain in their name mp3 -exec (I think it is executable) mv (to move) {} (I do not understand it very well but it is to indicate a pattern) $ HOME (refers to the / home / directory) (I have no idea).
find $HOME -name "*.txt" | tr -d " "
Similar to the previous one but with the aggregation of tr (I do not understand it very well but I understand that what we put in argument 1 "" will be replaced by argument 2 "" ex: tr "ax" "bz" replaces the ax by bz) -and that the name of the file or directory ends in .txt
I do not know if it is not specified in the command find d (directory) or f (file) choose one of the two by default?
My big doubt is that I do not understand very well what they do. If you could help me. Thanks.