![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Directory Default Permissions | prvnrk | UNIX for Advanced & Expert Users | 4 | 10-18-2007 09:22 PM |
| How Can I Easily Determine If A File Has been Added to a Directory | goodmis | UNIX for Advanced & Expert Users | 7 | 02-03-2007 10:13 PM |
| How Can I Easily Determine If A File Has been Added to a Directory | goodmis | UNIX for Dummies Questions & Answers | 1 | 01-31-2007 03:56 PM |
| cannot determine current directory | axes | UNIX for Advanced & Expert Users | 15 | 11-13-2006 04:39 AM |
| permissions of a directory | smehra | UNIX for Dummies Questions & Answers | 3 | 06-04-2006 07:32 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
determine owner directory permissions from within the directory
From within a directory, how do I determine whether I have write permission for it.
test -w pwd ; echo ? This doesn't work as it returns false, even though I have write permission. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
The current directory is . not pwd. You are trying to test for write permission to a file called pwd in the current directory.
|
|
#3
|
|||
|
|||
|
Doh! So I am. The question still stands though -
test -w . ; echo ? just returns "?" now |
|
#4
|
|||
|
|||
|
Probably found this out already, but:
echo $? |
|
#5
|
|||
|
|||
|
Cheers! It's been a long long day.
|
|||
| Google The UNIX and Linux Forums |