Sponsored Content
Full Discussion: Chmod list of files
Top Forums Shell Programming and Scripting Chmod list of files Post 302762333 by davidm123SED on Monday 28th of January 2013 10:39:37 AM
Old 01-28-2013
Quote:
Originally Posted by zazzybob
Try

Code:
while read item; do
   chmod 640 ${item}
done < ${files}

Hang on - obviously depends on input data too - please post a sample - I was assuming one file per line.
Yes, the file is called /home/david/files.txt and there is one filename per line..

/home/david/fileone
/home/david/directory_example/filetwo

.. etc.

I want to read in the list, and chmod every single one of them to 640.

Thanks.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Numeric CHMOD for .js files

Hello! At present, my .js files are also within the public_html directory. Anyone is able to type the name of these files in their browser address bar and then be presented the javascript (or text) code. What numeric CHMOD should be applied to these, which: Permit the world and group to... (3 Replies)
Discussion started by: Texan
3 Replies

2. Shell Programming and Scripting

help with chmod (files only)

hello, i want to chmod 444 all files in a directory, files in subdirs cannot be chmoded same goes for the subdirs themself. So using: chmod -R 444 /dir/ won't work because it will chmod the directorys and files (together with files in subdirectorys) I figured out how to chmod files... (1 Reply)
Discussion started by: TehOne
1 Replies

3. UNIX for Dummies Questions & Answers

chmod for files and directories

Hi, OS - Unix, linux (all unix flavors) My requirement. To check directory/file exists and then change the permission of the directories/files. Iam trying to start with directory and here is my code in the file totalchange.sh (insideragain - is a directory, test1.txt - is a file under the... (2 Replies)
Discussion started by: kenkanya
2 Replies

4. Shell Programming and Scripting

Apply `chmod` for multiple files through FTP

Hi all, Can you please help me in this aspect. I devoloped a FTP script to copy a directory to remote server. Now i got stuck-up in changing the file permissions for all the files in directory. I tried to change the permissions of single file and I did it but failed in changing... (3 Replies)
Discussion started by: Chanakya.m
3 Replies

5. Shell Programming and Scripting

chmod a lot of files

So i have about 600gb of data.. in which there are alot of directories and alot of files.. Im trying to put this on a ftp server.. So i want to set the permissions on the directories to be 755 and the permission on the files to be 644. So i used: find . -type d -exec chmod 755 {}\; and find .... (6 Replies)
Discussion started by: supermiguel
6 Replies

6. Shell Programming and Scripting

Paramater list too long while chmod

Hi i am transferring the files(around 10000) from the Windows sever to the UNIX server in that i run a command chmod 777 filename.txt but it is taking a longer time as it gives chmod for each and every file. So i thouught of giving the permission from the UNIX itself and i tried running chmod... (2 Replies)
Discussion started by: Codesearcher
2 Replies

7. Shell Programming and Scripting

chmod for great number of files

Hi all, I have a script who generate as an output a lot of files (the number is highly variable : 500 to more than 10000). At the end of this script I need to do a "chmod" on all those files. I tried but it says -bash: /bin/chmod: Argument list too long So it seems that chmod can't... (9 Replies)
Discussion started by: Moumou
9 Replies

8. Shell Programming and Scripting

chmod on 690k files

I have a folder that contains about 690k files and I need to change their permissions. The challenge is, I have no telnet access and the GUI FTP manager via cpanel just simply fails. I tried doing it via command line ftp but that too, fails saying 'no such file or directory'. My last resort is... (11 Replies)
Discussion started by: designflaw
11 Replies

9. UNIX and Linux Applications

What is the difference between chmod in solaris and chmod in Linux?

i think it is the same in both... Iam i right? (1 Reply)
Discussion started by: sumaiya
1 Replies

10. UNIX for Dummies Questions & Answers

Change chmod on files in diff directories

I am looking for a small script to crawl through several directories and change a couple of files in each directory to read write status. Anyone have any ideas ? (5 Replies)
Discussion started by: zapper222
5 Replies
INPUT(1)						      General Commands Manual							  INPUT(1)

NAME
input - Yagi-Uda project antenna defining program SYNOPSIS
input [ - h ] DESCRIPTION
The program input is one of a number of executable programs that forms part of a set of programs, collectively known as the Yagi-Uda project , which were designed for analysis and optimisation of Yagi-Uda antennas. input is an interactive program, that asks the user for information about a Yagi design, such as position of elements, spacing between elements, frequency span of interest and a filename to save the data to. input then writes this information into an ASCII file, which can be read by yagi or optimise The file is ASCII and it's for- mat is easily understood by inspection (there are comments printed in it), so it can if necessary be edited manually. After running input and specifying a filename (for example 144e10) you should then type yagi 144e10 and then output 144e10 and optionally optimise 144e10 OPTIONS
-h Print a help message. FILES
filename ASCII data file in which design is put. PLATFORMS
Both DOS and Unix versions have been built. The DOS version as distributed requires a 386 PC with a 387 maths coprocessor. AUTHORS
Dr. David Kirkby G8WRB (david.kirkby@onetel.net). with help with in converting to DOS/PC from Dr. Joe Mack NA3T (mack@fcrfv2.ncifcrf.gov) SEE ALSO
first(1), yagi(), output(1), optimise(1), input (5), first(5), yagi(5), output(5) and optimise(5). Bugs should be reported to david.kirkby@onetel.net. Bugs tend actually to be fixed if they can be isolated, so it is in your interest to report them in such a way that they can be easily reproduced. If a mistake is made during inputting of data (such as entering an incorrect length), it is not possible to go back and correct this. You should make a note of the error, and edit the ASCII text file with a text editor (vi, DOS edit etc). Version 1.16 24th October 2000 INPUT(1)
All times are GMT -4. The time now is 05:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy