Search this Website

 

Ubuntu

UNIX

chmod - pass a filelist as a parameter

Category: UNIX-Unix Beginner

chmod - pass a filelist as a parameter?

hi

i have a text file which contains a list of file names (one file name per line). i would like to pass the contents of this file into chmod to change the permissions. i am having trouble getting the correct syntax for this. can someone please tell me if its possible to do this?


code:
chmod 644 $(file contain the list of files whose permission is to be changed



thanks anbu, i tried this and it did exactly what i wanted.