Sponsored Content
Top Forums Shell Programming and Scripting Change Rights Recursive with chmod Post 302437720 by zaxxon on Friday 16th of July 2010 03:12:10 AM
Old 07-16-2010
I do not know a version of chmod that allows a exclude list. So you you could create a list with the find command and remove with grep -v those you do not want and then feed that list in a while/read loop to chmod, for example.
 

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

Groups Rights

I just created a group. How do i make the groups read only to a specific file systems.(home directory). (3 Replies)
Discussion started by: niasdad
3 Replies

2. UNIX for Dummies Questions & Answers

chmod rights issue?

I want to grant the 'write' right to one user so they can delete log files in a given directory. These are http log files, so a new one is created each day. The file owner is 'nobody'. If I use the command 'chmod a=rwx *' will this work for the new files created each day. I've tried the... (7 Replies)
Discussion started by: Westy564
7 Replies

3. HP-UX

User rights

I wan to create a user e.g. Tom. whenever a file is created by user Tom or FTP is done using user as Tom, the rights on the file should be 777 (by default). how can I achieve this. Please help. Its very urgent. (1 Reply)
Discussion started by: sharmavr
1 Replies

4. UNIX for Advanced & Expert Users

change permission chmod

Hi, when I launch my perl script, I write on the shell: perl x.pl How I can can change the permission to write only: x to launch the program? (2 Replies)
Discussion started by: Minguccio75
2 Replies

5. UNIX for Advanced & Expert Users

recursive chmod that only affects directories?

The man page for chmod doesn't list a way to recursively change permissions on directories only, without affecting the files themselves. Let's say that I wanted to change the permissions on the current directory and all subdirectories. I know I can write a bash script that would do this using... (1 Reply)
Discussion started by: retrovertigo
1 Replies

6. Shell Programming and Scripting

change file type to hidden using chmod command

I want to make a hidden file with chmod command. Example: I have a file name inputfile.txt -rw-r--r-- 1 xxxxxx xxxxxx 1388 Sep 12 05:41 inputfile.txt I want to hide that file using chmod command. Please tell me if it is possible or there is some other way to do this. Thanks... (2 Replies)
Discussion started by: rinku
2 Replies

7. UNIX for Dummies Questions & Answers

chmod -R recursive flag

Hi, why can't I use the flag -R recursive ? ftp> chmod -R a+xwr kickstart usage: chmod mode remote-file ftp> chmod a+xwr kickstart 200 SITE CHMOD command successful thanks (2 Replies)
Discussion started by: aneuryzma
2 Replies

8. 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

9. Shell Programming and Scripting

Change the permission to previously used in unix ( chmod )

I have changed the premission of a file to 777. Now I would like to change permission to previously used ( UNDO ). Is there any command ?:confused: (3 Replies)
Discussion started by: frintocf
3 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
explain_chmod_or_die(3) 				     Library Functions Manual					   explain_chmod_or_die(3)

NAME
explain_chmod_or_die - change permissions of a file and report errors SYNOPSIS
#include <libexplain/chmod.h> void explain_chmod_or_die(const char *pathname, int mode); DESCRIPTION
The explain_chmod_or_die function is used to call the chmod(2) system call. On failure an explanation wiil be printed to stderr, obtained from explain_chmod(3), and the the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: explain_chmod_or_die(pathname, mode); pathname The pathname, exactly as to be passed to the chmod(2) system call. mode The mode, exactly as to be passed to the chmod(2) system call. Returns: This function only returns on success. On failure, prints an explanation and exit(EXIT_FAILURE)s. COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller AUTHOR
Written by Peter Miller <pmiller@opensource.org.au> explain_chmod_or_die(3)
All times are GMT -4. The time now is 02:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy