Copying music

An anoyance that happens frequently when copying stuff from NTFS partitions to (whatever) Linux partition is the messed up file permissions. This can be fixed rather easily for, e.g., a music folder:

find music/ -type f | sed “s/^.*/\”&\”/” | xargs chmod 644

The above statement finds all files in the music folder, puts the resulting file names into parantheses (as they may contain spaces) and sets permissions suitable for music files. And in case of messy directory rights:

find music/ -type d | sed “s/^.*/\”&\”/” | xargs chmod 755