Sponsored Content
Full Discussion: Linux find help
Top Forums UNIX for Advanced & Expert Users Linux find help Post 303017561 by Don Cragun on Thursday 17th of May 2018 08:27:41 PM
Old 05-17-2018
Your requirements are not clear. The command that you are using is asking for the find utility to look at the root directory, every file in the file hierarchy rooted in the root directory, a file or directory named "php.ini" (and, if "php.ini" is a file of type directory, every file in the file hierarchy rooted in "php.ini") and to print the name of every file it encounters while looking at those files and file hierarchies.

Are you looking for a file named "php.ini"?

Are you looking for a file with a filename that contains the string "php.ini"?

Are you looking for a file with a filename that ends with the string "php.ini"?

Are you looking for a regular file that contains the string "php.ini" somewhere in its contents?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to find the help in Linux

The command 'man' can display the usage of command, is there any other command that can show the help in Linux? Thk a lot (3 Replies)
Discussion started by: zp523444
3 Replies

2. UNIX for Advanced & Expert Users

Find in HP,AIX vs Linux

Hi Guys, Wondering if anyone can help me. I have a find command on a Linux box that works as expected: find \( -not -type d -or -not -name log -and -not -name loc -and -not -name usr -and -not -name etc -and -not -name tmp -and -not -name wrk -and -not -name changes -or -prune \) -and -not... (6 Replies)
Discussion started by: bParks
6 Replies

3. Shell Programming and Scripting

Issue with Find command on Linux

Hi, I am issuing find command below mentioned ways but it givs different count. I don't understand the behaviour. Could any one have any clue? $ find . -mtime -5 -maxdepth 1 -exec ls -lrt {} \; | wc -l 169 $ find . -mtime -5 -maxdepth 1 | wc -l 47 $ find . -mtime -5 -maxdepth 1 | wc -l... (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

4. Linux

Find Page size in linux

Hi, How do i find Linux kernel page size using command ? Thanks in advance. (1 Reply)
Discussion started by: forumguest
1 Replies

5. UNIX for Dummies Questions & Answers

How to find the partition types in linux

How do we find the partition type in Linux? df -T will give me the mounted partition types like ufs, ext3 etc. How do I find out for say a newly added disk to the system? Please advise... Thanks (2 Replies)
Discussion started by: lubu
2 Replies

6. Red Hat

How to find VMware info from Linux?

Hi, I have two questions about Linux with VMware: (1) How to tell if the system is real or VMware virtual from a Linux platform without root privilege? (root can use 'dmidecode | grep -i vmware). The command 'dmesg | grep -i vmware' run by everyone is not always working for this purpose. (2)... (2 Replies)
Discussion started by: aixlover
2 Replies

7. Linux

help in find command in linux

I am trying to find pictures which contains a specific word in the file name. For example any .JPG files that contains "lm" at the beginning or at the middle or at the end of the file name. find / -iname "*.jpg" | ...what should go after the pipe? regards, Moaathe (2 Replies)
Discussion started by: kidwai
2 Replies

8. Red Hat

How to find Linux os series?

hai how to find linux os series (3 Replies)
Discussion started by: vinayd
3 Replies

9. Linux

How to Find out if an HP/Linux uses SAN or not?

Is there a command I can run on my HP /LINUX to see if uses SAN? This command work son AIX ls -al /DEV/rdsk however it does not work on HP Linux. Please let me know? Thanks (4 Replies)
Discussion started by: mrn6430
4 Replies
PARSE_INI_FILE(3)							 1							 PARSE_INI_FILE(3)

parse_ini_file - Parse a configuration file

SYNOPSIS
array parse_ini_file (string $filename, [bool $process_sections = false], [int $scanner_mode = INI_SCANNER_NORMAL]) DESCRIPTION
parse_ini_file(3) loads in the ini file specified in $filename, and returns the settings in it in an associative array. The structure of the ini file is the same as the php.ini's. PARAMETERS
o $filename - The filename of the ini file being parsed. o $process_sections - By setting the $process_sections parameter to TRUE, you get a multidimensional array, with the section names and settings included. The default for $process_sections is FALSE o $scanner_mode - Can either be INI_SCANNER_NORMAL (default) or INI_SCANNER_RAW. If INI_SCANNER_RAW is supplied, then option values will not be parsed. As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. In this mode boolean, null and integer types are preserved when possible. String values "true", "on" and "yes" are converted to TRUE. "false", "off", "no" and "none" are considered FALSE. "null" is converted to NULL in typed mode. Also, all numeric strings are converted to integer type if it is possible. RETURN VALUES
The settings are returned as an associative array on success, and FALSE on failure. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 7.0.0 | | | | | | | Hash marks ( #) are no longer recognized as com- | | | ments. | | | | | 5.6.1 | | | | | | | Added new INI_SCANNER_TYPED mode. | | | | | 5.3.0 | | | | | | | Added optional $scanner_mode parameter. Single | | | quotes may now be used around variable assign- | | | ments. Hash marks ( #) should no longer be used | | | as comments and will throw a deprecation warning | | | if used. | | | | | 5.2.7 | | | | | | | On syntax error this function will return FALSE | | | rather than an empty array. | | | | | 5.2.4 | | | | | | | Keys and section names consisting of numbers are | | | now evaluated as PHP integers thus numbers start- | | | ing by 0 are evaluated as octals and numbers | | | starting by 0x are evaluated as hexadecimals. | | | | | 5.0.0 | | | | | | | Values enclosed in double quotes can contain new | | | lines. | | | | | 4.2.1 | | | | | | | This function is now affected by safe mode and | | | open_basedir. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 Contents of sample.ini ; This is a sample configuration file ; Comments start with ';', as in php.ini [first_section] one = 1 five = 5 animal = BIRD [second_section] path = "/usr/local/bin" URL = "http://www.example.com/~username" [third_section] phpversion[] = "5.0" phpversion[] = "5.1" phpversion[] = "5.2" phpversion[] = "5.3" urls[svn] = "http://svn.php.net" urls[git] = "http://git.php.net" Example #2 parse_ini_file(3) example Constants may also be parsed in the ini file so if you define a constant as an ini value before running parse_ini_file(3), it will be integrated into the results. Only ini values are evaluated. For example: <?php define('BIRD', 'Dodo bird'); // Parse without sections $ini_array = parse_ini_file("sample.ini"); print_r($ini_array); // Parse with sections $ini_array = parse_ini_file("sample.ini", true); print_r($ini_array); ?> The above example will output something similar to: Array ( [one] => 1 [five] => 5 [animal] => Dodo bird [path] => /usr/local/bin [URL] => http://www.example.com/~username [phpversion] => Array ( [0] => 5.0 [1] => 5.1 [2] => 5.2 [3] => 5.3 ) [urls] => Array ( [svn] => http://svn.php.net [git] => http://git.php.net ) ) Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => Dodo bird ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( [phpversion] => Array ( [0] => 5.0 [1] => 5.1 [2] => 5.2 [3] => 5.3 ) [urls] => Array ( [svn] => http://svn.php.net [git] => http://git.php.net ) ) ) Example #3 parse_ini_file(3) parsing a php.ini file <?php // A simple function used for comparing the results below function yesno($expression) { return($expression ? 'Yes' : 'No'); } // Get the path to php.ini using the php_ini_loaded_file() // function available as of PHP 5.2.4 $ini_path = php_ini_loaded_file(); // Parse php.ini $ini = parse_ini_file($ini_path); // Print and compare the values, note that using get_cfg_var() // will give the same results for parsed and loaded here echo '(parsed) magic_quotes_gpc = ' . yesno($ini['magic_quotes_gpc']) . PHP_EOL; echo '(loaded) magic_quotes_gpc = ' . yesno(get_cfg_var('magic_quotes_gpc')) . PHP_EOL; ?> The above example will output something similar to: (parsed) magic_quotes_gpc = Yes (loaded) magic_quotes_gpc = Yes NOTES
Note This function has nothing to do with the php.ini file. It is already processed by the time you run your script. This function can be used to read in your own application's configuration files. Note If a value in the ini file contains any non-alphanumeric characters it needs to be enclosed in double-quotes ("). Note There are reserved words which must not be used as keys for ini files. These include: null, yes, no, true, false, on, off, none. Values null, off, no and false result in "", and values on, yes and true result in "1", unless INI_SCANNER_TYPED mode is used (as of PHP 5.6.1). Characters ?{}|&~!()^" must not be used anywhere in the key and have a special meaning in the value. Note Entries without an equal sign are ignored. For example, "foo" is ignored whereas "bar =" is parsed and added with an empty value. For example, MySQL has a "no-auto-rehash" setting in my.cnf that does not take a value, so it is ignored. SEE ALSO
parse_ini_string(3). PHP Documentation Group PARSE_INI_FILE(3)
All times are GMT -4. The time now is 04:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy