03-27-2009
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
Appreciate your help
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I've got 100 directories that each have 2 directories with in them.
Structered like this:
/home/domains/domain1/
through to
/home/domains/domain100/
and those 2 directories mentioned above are here:
/home/domains/domain1/directory1/
/home/domains/domain1/directory2/
through to... (7 Replies)
Discussion started by: Neko
7 Replies
2. UNIX for Advanced & Expert Users
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
3. Shell Programming and Scripting
hi experts(novice people can stay away as it is no child's game),
i am developing a script which works like recycle bin of windows.
the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to... (1 Reply)
Discussion started by: yahoo!
1 Replies
4. Solaris
Hello
root@ne-ocadev-1:/root/scripts>su espos -c find /a35vol100/ESPOS/oracle/db/9.2.0/oradata/ESPOS/archive -type f -atime +10 -exec ls {}
shell-init: could not get current directory: getcwd: cannot access parent directories: Permission denied
find: insufficient number of... (6 Replies)
Discussion started by: babu.knb
6 Replies
5. UNIX for Dummies Questions & Answers
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
6. UNIX for Advanced & Expert Users
looking for a wget option that does not retrieve entire path from source box...
currently working with the following syntax:
wget --no-verbose --mirror --no-parent --no-host-directories --page-requisites --ftp-user=mis --ftp-password=secret ftp://192.x.x.x/tmp/test
is anyone familiar... (0 Replies)
Discussion started by: mr_manny
0 Replies
7. Shell Programming and Scripting
Hello all,
I'm trying to copy all files within a specified directory to another location based on a find filter of mtime -1 (Solaris OS). The issue that I'm having is that in the destination directory, I want to retain the source directory structure while copying over only the files that have... (4 Replies)
Discussion started by: hunter55
4 Replies
8. Shell Programming and Scripting
I am fairly new to bash(but am proficient in C++), and have only completed a few simple scripts. This is my first script that I actually need to do a serious task.
All of my audiobooks are stored in traditional MP3 format: Music/Artist/Album/*.mp3 (which in this case is... (0 Replies)
Discussion started by: gamendorf
0 Replies
9. UNIX for Dummies Questions & Answers
can anyone explain parent directories in detail.
for example /home/unix/jones i'm not understanding what exactly the parent directory is.
Thanks! (5 Replies)
Discussion started by: austing5
5 Replies
10. UNIX for Dummies Questions & Answers
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
mkdir(1) General Commands Manual mkdir(1)
NAME
mkdir - make a directory
SYNOPSIS
mode] dirname ...
DESCRIPTION
creates specified directories in mode 0777 (possibly altered by unless specified otherwise by a option (see umask(1)). Standard entries,
(for the directory itself) and (for its parent) are created automatically. If dirname already exists, exits with a diagnostic message, and
the directory is not changed.
Options
recognizes the following command-line options:
After creating the directory as specified,
the file permissions are set to mode, which is a symbolic mode string as defined for (see chmod(1)). The has precedence
over
Intermediate directories are created as necessary.
Otherwise, the full path prefix of dirname must already exist. requires write permission in the parent directory.
For each directory name in the pathname prefix of the dirname argument that is not the name of an existing directory,
the specified directory is created using the current setting, except that the equivalent of is done on each component to
ensure that can create lower directories regardless of the setting of Each directory name in the pathname prefix of the
dirname argument that matches an existing directory is ignored without error. If an intermediate path component exists,
but has permissions set to prevent writing or searching, fails with an error message.
If the option is used, the directory specified by dirname (excluding directories in the pathname prefix) is created with
the permissions specified by mode.
Only subdirectories can be created (see limits(5)).
Access Control Lists - JFS File Systems Only
If the parent directory has an access control list (ACL, see aclv(5)), and that ACL contains default entries, an ACL is created for the new
directory, and the parent directory's default entries are applied to the new directory's ACL, both as regular entries and as default
entries.
EXTERNAL INFLUENCES
For information about the UNIX standard environment, see standards(5).
Environment Variables
provides a default value for the internationalization variables that are unset or null. If is unset or null, the default value of "C" (see
lang(5)) is used. If any of the internationalization variables contains an invalid setting, will behave as if all internationalization
variables are set to See environ(5).
If set to a non-empty string value, overrides the values of all the other internationalization variables.
determines the interpretation of text as single and/or multi-byte characters, the classification of characters as printable, and the char-
acters matched by character class expressions in regular expressions.
determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error and informa-
tive messages written to standard output.
determines the location of message catalogues for the processing of
International Code Set Support
Single- and multi-byte character code sets are supported.
DIAGNOSTICS
returns exit code 0 if all directories were created successfully. Otherwise, it prints a diagnostic and returns non-zero.
returns exit code 0 if the option was specified, and all the specified directories now exist. If any of the intermediate directories do
not have search or write permission (with the option), prints a diagnostic and returns non-zero.
EXAMPLES
Create directory beneath existing directory in the current directory:
Create directory path underneath the current directory and set permissions on directory to read-only for all users
which is equivalent to (see chmod(1)):
If directories or and already exist, only the missing directories in the specified path are created.
SEE ALSO
rm(1), setacl(1), sh(1), umask(1), aclv(5), standards(5).
STANDARDS CONFORMANCE
mkdir(1)