Iam trying to load the full path of multiplie files in the same directory to an array if the filenames matches a pattern. The following is the current code;
where $input=C:\test
The above code is only returning the last file in the directory with the full path.
What is the smartest way to just extract file name from a full path name.
e.g. if I have
/usr/sanjay/bin/file_name.c
I want only file_name.c
Sanjay (2 Replies)
hi guys
i give "ps -ef | grep some_executable_file" on the command line.
this "some_executable_file" resides on many paths which r included in the PATH environment variable, so the output depicts only "some_executable_file" in the COMMAND column. how can i get the full path?
thanx (3 Replies)
How can i list every single file on a sun solaris server running 2.8 starting from '/' with the full path included in it?
example.
/
...
...
...
/etc/inetd.conf
/etc/passwd
/etc/shadow
...
...
...
/var/adm/messages
/var/adm/messages.0
/var/adm/messages.1
...
...
...... (4 Replies)
Hi,
I have written this shell script:
fl=`ls -1lrt $mylist | grep '\.xml$' | awk '{print $9}'`
echo $fl (1)
for i in $fl
do
for dir in $mylist
do
if
then
echo $dir/$i >> tmp (2)
fi
done
done
The mylist contains some directory names. The satement (1) gives the sorted list... (5 Replies)
This has been bugging me for a while. How can i list file to show full path.
/directory/test
$ ls file.tst
file.tst
$
desired output:
/directory/test/file.tst (2 Replies)
Hi
anyone can help how put the directory in array in perl.eg directory paths below:-
/home/user/
/home/admin/
/var/log/
IF path eq /home/user/ then the files moved to /data/user/
IF path eq /var/log/ then the files moved to /data/log/
Thanks (1 Reply)
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
Hi,
I would like to know how to grep all the paths in a file having extension .BMP
For e.g.
File Name :
sample.txt
File Content :
xxxxxxxxxxxxxxxxx
xxxxx/root/cdrive/picure.BMP xxxx
xxxxxxxxxxx
xxxxx/root/ddrive/picure.BMP xxxx
xxxxxxxxxxx
Expected Output : ... (4 Replies)
Hi
I have a requirement like this:
/abc/a/x.txt
/abc/a/y.txt
/abc/b/x.gz
/abc/b/y.txt
I need output like this:
/abc/a:*.txt
/abc/b:*.txt
/abc/b:*.gz
I have tried find /abc -type f -name "*.*" ||awk -F . '{print $NF}' it is print only extensions without path name.
Please... (5 Replies)
Discussion started by: lijjumathew
5 Replies
LEARN ABOUT PHP
wincache_rplist_fileinfo
WINCACHE_RPLIST_FILEINFO(3) 1 WINCACHE_RPLIST_FILEINFO(3)wincache_rplist_fileinfo - Retrieves information about resolve file path cacheSYNOPSIS
array wincache_rplist_fileinfo ([bool $summaryonly = false])
DESCRIPTION
Retrieves information about cached mappings between relative file paths and corresponding absolute file paths.
RETURN VALUES
Array of meta data about the resolve file path cache or FALSE on failure
The array returned by this function contains the following elements:
o total_file_count - total number of file path mappings stored in the cache
o rplist_entries - an array that contains the information about all the cached file paths:
o resolve_path - path to a file
o subkey_data - corresponding absolute path to a file
EXAMPLES
Example #1
A wincache_rplist_fileinfo(3) example
<pre>
<?php
print_r(wincache_rplist_fileinfo());
?>
</pre>
The above example will output:
Array
(
[total_file_count] => 5
[rplist_entries] => Array
(
[1] => Array
(
[resolve_path] => checkcache.php
[subkey_data] => c:inetpubwwwroot|c:inetpubwwwrootcheckcache.php
)
[2] => Array (...iterates for each cached file)
)
)
SEE ALSO wincache_fcache_meminfo(3), wincache_fcache_fileinfo(3), wincache_ocache_fileinfo(3), wincache_ocache_meminfo(3), wincache_rplist_mem-
info(3), wincache_refresh_if_changed(3), wincache_ucache_meminfo(3), wincache_ucache_info(3), wincache_scache_info(3), wincache_scache_mem-
info(3).
PHP Documentation Group WINCACHE_RPLIST_FILEINFO(3)