![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Protecting the directory tree | rooneyl | UNIX for Dummies Questions & Answers | 2 | 02-17-2008 05:59 PM |
| directory tree | ravi raj kumar | Shell Programming and Scripting | 3 | 01-24-2008 01:08 PM |
| Searching directory tree | blane | Shell Programming and Scripting | 7 | 05-29-2007 07:30 PM |
| directory as tree | anything2 | High Level Programming | 2 | 03-01-2007 09:38 AM |
| Directory tree search??? | solvman | High Level Programming | 3 | 09-28-2001 01:27 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
setup directory tree
All,
I am new to Unix scripting ans was looking for some guidance. I basically have to: 1. Check if a directory exists - if not create it 2. Check the permissions of the dir - if Wrong change loop this. Sort of creating a directory tree. Thanks. Last edited by wicked24; 11-13-2007 at 08:19 AM.. Reason: Hit enter key by mistake |
|
||||
|
To make a directory tree, even if some don't exists, use :
Code:
mkdir -p toto/titi/tata/tutu Use chmod command to set rights after creation. Good luck. |
|
||||
|
Ok – Here is what I need:
Below is the directory structure that I want to create and set permissions on. Directory Permissions /apps/ki01/logs/app_yyxzzz drwxr-xr-x /apps/ki01/bin/app_yyxzzz drwxr-xr-- /apps/ki01/scripts/app_yyxzzz drwxr-xr-- /apps/ki01/src/app_yyxzzz drwxr-xr-- /apps/ki01/ssl/app_yyxzzz/ drwxr-x--- /apps/ki01/htdocs/IHS_yyxzzz/ drwxr-xr-- /apps/ki01/ssl/IHS_yyxzzz/ drwxr-x--- /export/home/trace/app_yyxzzz/ drwxr-xr-x 1st – I need to check if the directory already exists and also if it matches the permissions. 2nd – if not then create the directory and set correct permissions. This is for all directories. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|