How to list the names of the files from all the subdirectories?
Hi, I'm currently trying to print the names of all the .txt files in the subdirectories that contain the string I'm searching.
I tried with this code, but it seems that it searches for the names that matches the string instead of searching for the string in the individual files and printing the name of that file that contains the string
I also tried this code but nothing happens.
Can anyone help me?
---------- Post updated at 06:13 PM ---------- Previous update was at 06:07 PM ----------
Also, I tried this code and it seems to work, but only if the argument is "2010"
If I use "11/27/2010" as arguments it doesn't print anything.
I need to find the largest files in a directory & it's subdirectories.
I'm not sure what options on ls -l will work to give me this. or is there another way to do this?
Thanks,
igidttam (6 Replies)
If I execute the command "ls -l /export/home/abcde/dev/proj/code/* | awk -F' ' '{print $9}' | cut -d'/' -f6-8" it will list all the files in /export/home/abcde/dev/proj/code/ directory as well as the files in subdirectories also
proj/code/test.sh
proj/code/test1.c
proj/code/unix... (8 Replies)
Hi,
I have a very big directory structure that consists of many sub-directories inside.There are around 50 ".gz" files under this dir structure.
I want to copy all the gz files alone to a seperate location.
Plz help me. (2 Replies)
I was wondering if someone could help me with this:
I have multiple directories and subdirectories with files in them. I need to move all files from all directories and subdirectories into one root directory. However, when i do
find /home/user -mindepth 1 -iname "*" -type f -exec mv {} . \;
... (3 Replies)
Dear all,
I have a dir structure like
main_dir
At_nn Ag_js Nf_hc ....
mcd32 mgd43... mcd32 mgd43... mcd32 mgd43...
and each subdir (e.g. mcd32, mgd43) contains files.
Now, i... (15 Replies)
I need to write a script to :
list files with *.i extension in a directory and all its subdirectories + 30days old, save it in a file and then remove (2 Replies)
Hello,
I wanted to
list all files in subdirectories which are modifiled recently. need to display all files with full details like hpw it display with ls -l ( date, size,..)
Thanks
Bala (3 Replies)
Discussion started by: balareddy
3 Replies
LEARN ABOUT DEBIAN
torrus_rrddir2xml
TORRUS_RRDDIR2XML(8) torrus TORRUS_RRDDIR2XML(8)NAME
rrddir2xml - Searches a directory for RRD files and generates Torrus XML configuration file.
SYNOPSIS
torrus rrddir2xml --dir=DIR [options...]
DESCRIPTION
rrddir2xml searches in a given directory for RRD files and creates Torrus XML configuration file suitable for browsing ofthose data files.
With default options, it is usable for RRD files generated by Torrus' SNMP collector, where the file name starts with the host name,
separated by underscore from interface name or other MIB specifics. With these defaults, it creates a subtree per each host name, and all
RRD files belonging top that host name are sorted alphabetically in that subtree.
OPTIONS --dir=DIR
Absolute path to the directory for searching. The directory may contain also non-RRD files. Only regular files are processed, and the
symlinks are ignored.
--recursive
If specified, the directory will be searched recursively. All file names across all subdirectories must be unique. Symlinks to other
directories are ignored.
--filter=Regexp
If the filter is specified, then rrddir2xml lists only those files and subdirectories whose names match the given regular expression.
--out=FILE
Output XML file name. If relative path given, the file is placed in /etc/torrus/xmlconfig. Default: rrddir.xml.
--subtree=SUBTREE
Top subtree path in the generted XML. Default is the top of the tree ("/").
--split=REGEXP
Regular expression used for splitting the file name into parts to build the subtree hierarchy. Default is a sequence of underscores
("_+").
--levels=INTEGER
Number of levels of hierarchy to build by splitting the file names. Default is 2 levels.
--comment=TEXT
Text to put as "comment" parameter to the top subtree.
--holtwinters
If specified, Holt-Winters prediciton boundaries and failures are displayed in the graphs.
--verbose
Prints extra diagnosics.
--debug
Prints debugging information.
SEE ALSO torrus(8)NOTES
See more documentation at Torrus home page: http://torrus.org
AUTHOR
Stanislav Sinyagin <ssinyagin@yahoo.com>
torrus 2.03 2013-07-26 TORRUS_RRDDIR2XML(8)