Sponsored Content
Full Discussion: need Script logic
Top Forums Shell Programming and Scripting need Script logic Post 302513908 by ygemici on Thursday 14th of April 2011 10:04:00 AM
Old 04-14-2011
Quote:
Originally Posted by JSKOBS
How can i get the permission of the files in a directory if we dont have access to the directory.
you have to executable perm on directory at least if you know file names.
 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script logic

Please help me to write the following script. 1) Input files will be in Test directory. (Test/YYYY/MM) folders (Ex: 1) 2010/ 01 2) 2011/05) The file name will be Testfile1_6676543218_Axxxxxxyyyyyzzzzzzzzzzzzzzzzzz.pdf.gz 2) The compare file will be in /tmp directory. (/tmp/comparefile.txt). The... (6 Replies)
Discussion started by: mnjx
6 Replies

2. Shell Programming and Scripting

Need script logic

i have two csv files (rates.csv, reference.csv) as below. rates.csv contains Code, respective Zone details rates.csv ---------- 23,38Nhava 45,37NEWYORK 89,SHILANG 71,ROBACCA reference.csv contains all Zone details reference.csv ------------- 37Newyork robacca 38Nhava... (5 Replies)
Discussion started by: p_satyambabu
5 Replies
DIR(3)									 1								    DIR(3)

dir - Return an instance of the Directory class

SYNOPSIS
Directory dir (string $directory, [resource $context]) DESCRIPTION
A pseudo-object oriented mechanism for reading a directory. The given $directory is opened. PARAMETERS
o $directory - Directory to open o $context - Note Context support was added with PHP 5.0.0. For a description of contexts, refer to "Streams". RETURN VALUES
Returns an instance of Directory, or NULL with wrong parameters, or FALSE in case of another error. EXAMPLES
Example #1 dir(3) example Please note the fashion in which Directory.read(3)'s return value is checked in the example below. We are explicitly testing whether the return value is identical to (equal to and of the same type as - see Comparison Operators for more information) FALSE since otherwise, any directory entry whose name evaluates to FALSE will stop the loop. <?php $d = dir("/etc/php5"); echo "Handle: " . $d->handle . " "; echo "Path: " . $d->path . " "; while (false !== ($entry = $d->read())) { echo $entry." "; } $d->close(); ?> The above example will output something similar to: Handle: Resource id #2 Path: /etc/php5 apache cgi cli NOTES
Note The order in which directory entries are returned by the read method is system-dependent. PHP Documentation Group DIR(3)
All times are GMT -4. The time now is 08:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy