1

Apologies for the n00b question. I've installed Plex Media Server on Ubuntu 14.04, and it seemed to be ignoring some folders and files. A very helpful person over at the Plex forums suggested I needed to ensure Plex had the proper permissions to read and access the files, and shared with me the following commands:

cd /directory-containing-media 
sudo find . -type d -print -exec chmod 755 {} \;
sudo find . -type f -print -exec chmod 644 {} \;

It's working well, but I have a lot of sub-folders/subdirectories and it's very time consuming to run in every separate folder. What's the best way to get it to run against all files in all sub-folders? I'm guessing it's to use '-r', but I'm not sure where to put it or if I need any other options etc.

Wilf
  • 30,732

2 Answers2

0

It will take time there is nothing you can do.

Type this warning first go to the desired directory after then type this Its to dangerous Or change the (dot) with you desired directory path

sudo find . -type f -exec chmod 644 {} \; 2>/dev/null >/dev/null & . 

Your problem for time will be solved this will make you terminal free for working while your command is running on back-end.

muru
  • 207,228
0

The commands: sudo find . -type d and sudo find . -type f finds folders and files in that directory recursively.

$ whatis find
find (1)             - search for files in a directory hierarchy

So, It will be execulted recursively and find results in all directories including all sub-directories, for file same works as recursively.

Pandya
  • 37,289