Sponsored Content
Top Forums UNIX for Advanced & Expert Users recursive chmod that only affects directories? Post 302123048 by reborg on Friday 22nd of June 2007 04:02:20 PM
Old 06-22-2007
Code:
find . -type d -exec chmod 755 {} \;

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep recursive directories

I am trying to locate a file or files with specific data in them. Problem is the file(s) could reside in any one of many directories. My question is. Is there a way of recursively greping directories for the file(s) with the data I am looking for. I have tried - 1. $HOME> grep 47518 | ls... (8 Replies)
Discussion started by: jagannatha
8 Replies

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

3. UNIX for Advanced & Expert Users

chmod to parent and sub directories ?

Hi folk, Could you please give me command to give the rwx permissions to the parent and its sub directories ? Is it possible to fire one command or Script for giving permission to both the parent and its sub directories. I meant to say something like in recurcive. I am using AIX 5.2 ... (2 Replies)
Discussion started by: varungupta
2 Replies

4. AIX

recursive archive directories and subdirectories

Hi everyone, Maybe this is simple question for many of you, but I get confused.:confused: How to archive a parent directory which contains some subdirectories and some files? I have searched this forum, there are some commands like tar,etc, I tried but can not be implemented in my system.... (6 Replies)
Discussion started by: wilsonSurya
6 Replies

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

6. Shell Programming and Scripting

Command to sort directories after a recursive find

find -type d -name "TC_*" | sort That's what I have so far... it finds the appropriate directories and then sorts them. But, when it comes to nested subdirectories, it only sorts relative to the first subdirectory. I want it to sort based on the directory at the end of the path. Does anyone know... (3 Replies)
Discussion started by: crimsondarkn
3 Replies

7. Shell Programming and Scripting

Change Rights Recursive with chmod

Hello, i want just to change Rights for a few direcories anf files, but some directories must be exclude. How can i put the command chmod as chmod -R 755 * exclude toto tata where toto and tata are directories Could you help me for that or must I use the find command Thanks (2 Replies)
Discussion started by: steiner
2 Replies

8. Shell Programming and Scripting

Recursive looping through files and directories

hi; i need a script which will go to all directories and subdirectories and print the filenames as follow; here i m printing only files listing in current directory reason i m doing this is coz i want to perform some operations according to filename achieved so cant use find command;... (4 Replies)
Discussion started by: ajaypadvi
4 Replies

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

10. Shell Programming and Scripting

Recursive search for files and copy to new directories

So I have extremely limited experience with shell scripting and I was hoping someone could point out a few commands I need to use in order to pull this off with a shell script like BASH or whatnot (this is on OS X). I need to search out for filenames with account numbers in the name itself... (3 Replies)
Discussion started by: flyawaymike
3 Replies
MKPROTO(8)						      System Manager's Manual							MKPROTO(8)

NAME
mkproto - construct a prototype file system SYNOPSIS
/usr/sbin/mkproto special proto DESCRIPTION
Mkproto is used to bootstrap a new file system. First a new file system is created using newfs(8). Mkproto is then used to copy files from the old file system into the new file system according to the directions found in the prototype file proto. The prototype file con- tains tokens separated by spaces or new lines. The first tokens comprise the specification for the root directory. File specifications consist of tokens giving the mode, the user-id, the group id, and the initial contents of the file. The syntax of the contents field depends on the mode. The mode token for a file is a 6 character string. The first character specifies the type of the file. (The characters -bcd specify regu- lar, block special, character special and directory files respectively.) The second character of the type is either u or - to specify set- user-id mode or not. The third is g or - for the set-group-id mode. The rest of the mode is a three digit octal number giving the owner, group, and other read, write, execute permissions, see chmod(1). Two decimal number tokens come after the mode; they specify the user and group ID's of the owner of the file. If the file is a regular file, the next token is a pathname whence the contents and size are copied. If the file is a block or character special file, two decimal number tokens follow which give the major and minor device numbers. If the file is a directory, mkproto makes the entries . and .. and then reads a list of names and (recursively) file specifications for the entries in the directory. The scan is terminated with the token $. A sample prototype specification follows: d--777 3 1 usr d--777 3 1 sh ---755 3 1 /bin/sh ken d--755 6 1 $ b0 b--644 3 1 0 0 c0 c--644 3 1 0 0 $ $ SEE ALSO
fs(5), dir(5), fsck(8), newfs(8) BUGS
There should be some way to specify links. There should be some way to specify bad blocks. Mkproto can only be run on virgin file systems. It should be possible to copy files into existent file systems. Mkproto can only copy files up to a single level indirect less 4kb. This works out to about 252Kb 4.2 Berkeley Distribution November 17, 1996 MKPROTO(8)
All times are GMT -4. The time now is 05:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy