05-03-2012
Thanks! But I still have an issue, it can find the files but the $filedir seems to be empty (i.e. doesn't give anything when I echo $filedir).
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I am new to unix and would like to have a count of all the files in the current directory as well as all the files in a subdirectory.
The command I used was ls -R | wc -l
but the number returned wasn't correct. Can someone please help?
Thanks (2 Replies)
Discussion started by: cbeverly
2 Replies
2. Shell Programming and Scripting
I have a task to move more than 35000 files every two hours, from the same directory to another directory based on a file that has the list of filenames
I tried the following logics
(1)
find . -name \*.dat > list
for i in `cat list` do mv $i test/ done
(2)
cat list|xargs -i mv "{}"... (7 Replies)
Discussion started by: bryan
7 Replies
3. Shell Programming and Scripting
Hi
I need to rename about hundred of files which contain ".R " and the end, for example:
/t1/data/f2993trn.ix7.R
The new file should not have ".R" extension, ex:
/t1/data/f2993trn.ix7.R
Is there a command which I can put in the loop to do this? Thansk for any advice -A (6 Replies)
Discussion started by: aoussenko
6 Replies
4. Shell Programming and Scripting
Hellow i have a large number of files that i want to concatenate to one. these files start with the word 'VOICE_' for example
VOICE_0000000000
VOICE_1223o23u0
VOICE_934934927349
I use the following code:
cat /ODS/prepaid/CDR_FLOW/MEDIATION/VOICE_* >> /ODS/prepaid/CDR_FLOW/WORK/VOICE
... (10 Replies)
Discussion started by: chriss_58
10 Replies
5. Shell Programming and Scripting
how can i find number of lines in files & subdirectories ? (3 Replies)
Discussion started by: pcbuilder
3 Replies
6. UNIX for Dummies Questions & Answers
Hi. I need to delete a large number of files listed in a txt file. There are over 90000 files in the list. Some of the directory names and some of the file names do have spaces in them.
In the file, each line is a full path to a file:
/path/to/the files/file1
/path/to/some other/files/file 2... (4 Replies)
Discussion started by: inakajin
4 Replies
7. Shell Programming and Scripting
Hi All,
I have some 80,000 files in a directory which I need to rename. Below is the command which I am currently running and it seems, it is taking fore ever to run this command. This command seems too slow. Is there any way to speed up the command. I have have GNU Parallel installed on my... (6 Replies)
Discussion started by: shoaibjameel123
6 Replies
8. UNIX for Dummies Questions & Answers
Hi all...
I have a directory called dbrn. This directory contains an unknown number of subdirectories which in turn contain an unknown number of files.
What I want to know is:
How many files with extention .ABC can be found in /dbrn across all subdirecties, and what is the total size for... (9 Replies)
Discussion started by: Beun
9 Replies
9. Shell Programming and Scripting
Want to sftp large number of files ... approx 150 files will come to server every minute. (AIX box)
Also need make sure file has been sftped successfully...
Please let me know :
1. What is the best / faster way to transfer files?
2. should I use batch option -b so that connectivity will be... (3 Replies)
Discussion started by: vegasluxor
3 Replies
10. UNIX for Dummies Questions & Answers
I have a folder named test/ and under that I have multiple directories and in each of the directory I have multiple log files. I want to know how many files exists under each sub directory.
test
|--quanrantine
|--logfile1
|--logfile2
|--spooling
|--logfile1
... (4 Replies)
Discussion started by: ravikirankethe
4 Replies
INI_GET(3) 1 INI_GET(3)
ini_get - Gets the value of a configuration option
SYNOPSIS
string ini_get (string $varname)
DESCRIPTION
Returns the value of the configuration option on success.
PARAMETERS
o $varname
- The configuration option name.
RETURN VALUES
Returns the value of the configuration option as a string on success, or an empty string for null values. Returns FALSE if the configura-
tion option doesn't exist.
EXAMPLES
Example #1
A few ini_get(3) examples
<?php
/*
Our php.ini contains the following settings:
display_errors = On
register_globals = Off
post_max_size = 8M
*/
echo 'display_errors = ' . ini_get('display_errors') . "
";
echo 'register_globals = ' . ini_get('register_globals') . "
";
echo 'post_max_size = ' . ini_get('post_max_size') . "
";
echo 'post_max_size+1 = ' . (ini_get('post_max_size')+1) . "
";
echo 'post_max_size in bytes = ' . return_bytes(ini_get('post_max_size'));
function return_bytes($val) {
$val = trim($val);
$last = strtolower($val[strlen($val)-1]);
switch($last) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return $val;
}
?>
The above example will output something similar to:
display_errors = 1
register_globals = 0
post_max_size = 8M
post_max_size+1 = 9
post_max_size in bytes = 8388608
NOTES
Note
When querying boolean values
A boolean ini value of off will be returned as an empty string or "0" while a boolean ini value of on will be returned as "1". The
function can also return the literal string of INI value.
Note
When querying memory size values
Many ini memory size values, such as upload_max_filesize, are stored in the php.ini file in shorthand notation. ini_get(3) will
return the exact string stored in the php.ini file and NOT its integer equivalent. Attempting normal arithmetic functions on these
values will not have otherwise expected results. The example above shows one way to convert shorthand notation into bytes, much like
how the PHP source does it.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | Previously, the empty string was returned if the |
| | configuration option didn't exist. now, FALSE is |
| | returned instead. |
| | |
+--------+---------------------------------------------------+
SEE ALSO
get_cfg_var(3), ini_get_all(3), ini_restore(3), ini_set(3).
PHP Documentation Group INI_GET(3)