[Help] Bulk chmod when migrating from NTFS
from AntY@lemmy.world to linux@lemmy.ml on 02 Mar 07:47
https://lemmy.world/post/26232257
from AntY@lemmy.world to linux@lemmy.ml on 02 Mar 07:47
https://lemmy.world/post/26232257
At long last I’m finally switching operating system for my gaming PC. I have a lot of photos and such saved that have been moved from an NTFS drive. Is there any tool out there to help me fix the permissions of these files according to file type in bulk?
threaded - newest
Chmod works recursively.
What modes exactly are you trying to set? Why do you need different perms based on the file type?
chmod -R [mode] /dir/path
If you need finer control than recursive
chmod
(see other replies), you can also usefind
to match precisely which files/folders you want and use the-exec
parameter to runchmod
on thoseI wanted to write the same thing. E.g., you can run this in bash to set the permissions for all .conf files to 600:
Your things may be owned by root and have unusual permissions.
So, to make your NTFS drive be owned by your user and group and to set the permissions you can:
Not like you need another utility to do this, but I highly recommend you checkout fd. It’s badass;
-e jpg
is clearly the file extensions you want,-x
is to execute a command with each result. You can also use-X
which executes a command using all the files found as a single argument;