08-11-2011
Thanks for prompt reply ...but its printing twice one time without path and next with path
to explain better to group
bash-3.00$
bash-3.00$ ls -lRt Raj
RAJ:
total 2
drwxrwxrwx 2 Raj Prati 1024 Aug 6 11:00 Prati
Raj/Prati:
total 413746
-rw-r--r-- 1 Raj Prati 35305472 Aug 6 11:00 TRAMS_I_20110728000000.TXT_2011080616002408
-rwxr-xr-x 1 Raj Prati 35770539 Jul 15 14:10 TRAMS_I_20110707094500.TXT_20110715191002686
-rw-r--r-- 1 Raj Prati 35770539 Jul 15 14:04 TRAMS_20110707094500.TXT_20110715185704506
-rwxr-xr-x 1 Raj Prati 34880052 Jun 22 10:57 TRAMS_I_20110609000000.TXT_20110622155721450
-rw-r--r-- 1 Raj Prati 50 Jun 22 10:23 TRAMS_I_20110601000000.TXT_2011062215232147
-rw-r--r-- 1 Raj Prati 34880052 Jun 9 05:45 TRAMS_I_20110609000000.TXT_20110609104535858
-rwxr-xr-x 1 Raj Prati 35016921 Jun 8 15:05 TRAMS_20110601000000.TXT_20110608200529168
bash-3.00$ ls -lRt | grep 20110609
-rwxr-xr-x 1 Raj Prati 34880052 Jun 22 10:57 TRAMS_I_20110609000000.TXT_20110622155721450
-rw-r--r-- 1 Raj Prati 34880052 Jun 9 05:45 TRAMS_I_20110609000000.TXT_20110609104535858
bash-3.00$
So if we look at above the directory structre is missing but I want directory and subdirectory comletely.
Also,
if somehow I can just print the Timestamp column and Filename it will be great
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'd like find all the files with names containing a certain pattern, in a directory hierarchy - not just a single directory.
For example:
file *.txt
But throughout the entire hierarchy.
Can this be done? If so, how?
Thank you (4 Replies)
Discussion started by: jsmith_4242
4 Replies
2. Shell Programming and Scripting
I have a directory named DIR. The contents of the directory is something like:
a.sh
b.sh
cghsk.sh
assjsjkd
gdshddll
DFG/
...
...
Where only DFG/ is a folder.
I want to grant execute permission to all(a+x), for all the files directly under the DIR directory except the files that... (4 Replies)
Discussion started by: proactiveaditya
4 Replies
3. Shell Programming and Scripting
Anyone knows how I can change this script so that it works recursively as well (meaning: *.c files in sub directories will get changed as well)?
for file in *.c
do
cat file.txt "$file" > tempfile
cat tempfile > "$file"
done
rm tempfile (5 Replies)
Discussion started by: psve
5 Replies
4. Red Hat
Hi guys,
I have just been bothered by a fairly small issue for some time now. I am trying to search (using find -name) for some .jpg files recursively. This is a Redhat environment with bash.
I get this job done though I need to copy ALL of them and put them in a separate folder BUT I also... (1 Reply)
Discussion started by: rockf1bull
1 Replies
5. Shell Programming and Scripting
Hi,
I want to display latest files (created or modified) recursively in a path.
I tried in different ways, but didn't get any desired output:
find $path -type f -exec ls -lt {} \; | sort -n -r
find $path -type f -printf %p";" | xargs -d ";" ls -t
Second one is giving the error:... (21 Replies)
Discussion started by: karumudi7
21 Replies
6. Shell Programming and Scripting
Hi,
Need your help in this.
I have an input file that has multiple enrollment_number, somewhat like
1234567
8901234
9856321
6732187
7623465
Now i have to search and delete these enrollment_number recursively from all the files that are within multiple sub-directories of a... (10 Replies)
Discussion started by: mukulverma2408
10 Replies
7. Shell Programming and Scripting
I would like to write a script that takes something like this:
Line 1
Line 2
Line 3
Line 4
Line 6
Line 7
Line 8
Line 9
etc....
And makes it to look like this:
Line 1|Line 2|Line 3|Line 4|
Line 6|Line 7|Line 8|Line 9|
etc.
I would think it would be fairly easy to use two loops,... (4 Replies)
Discussion started by: jcs
4 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
Could you please help to resolve my following issues:
Problem Description:
Suppose my user name is "MI90".
i.e. $USER = MI90
when i run below command, i get all the processes running on the system containing name MQ.
ps -ef | grep MQ
But sometimes it lists... (8 Replies)
Discussion started by: KDMishra
8 Replies
9. Shell Programming and Scripting
Hi,
this is the structure of the directory
/local/home/app/cases
under cases directory, below are the sub directories and each directory has files.
/local/home/app/cases/1
/local/home/app/cases/2
/local/home/app/cases/3
/local/home/app/cases/4
File types are .txt .sh and so... (5 Replies)
Discussion started by: lookinginfo
5 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have a directory which contains multiple files with .txt extension, i want to rename all these file to .bak extension using find command, this is what i've tried, please help me to correct this :
find /home/application/test -name '*.txt' -exec rename 's/txt/bak/' {} \;
seems to... (8 Replies)
Discussion started by: mukulverma2408
8 Replies
LEARN ABOUT DEBIAN
dnstop
DNSTOP(8) BSD System Manager's Manual DNSTOP(8)
NAME
dnstop -- displays various tables of DNS traffic on your network
SYNOPSIS
dnstop [-46apsQR] [-b expression] [-i address] [-f filter] [-r interval] [device] [savefile]
DESCRIPTION
dnstop is a small tool to listen on device or to parse the file savefile and collect and print statistics on the local network's DNS traffic.
You must have read access to /dev/bpf*.
COMMAND LINE OPTIONS
The options are as follows:
-4 count only messages with IPv4 addresses
-6 count only messages with IPv6 addresses
-Q count only DNS query messages
-R count only DNS reply messages
-a anonymize addresses
-b expression
BPF filter expression
(default: udp port 53)
-i address
ignore select addresses
-p Do not put the interface into promiscuous mode.
-r Redraw interval (seconds).
-l level
keep counts on names up to level domain name levels.
For example, with -l 2 (the default), dnstop will keep two tables: one with top-level domain names, and another with second-level
domain names. Increasing the level provides more details, but also requires more memory and CPU.
-f input filter name
The "unknown-tlds" filter includes only queries for TLDs that are bogus. Useful for identifying hosts/servers that leak queries for
things like "localhost" or "workgroup."
The "A-for-A" filter includes only A queries for names that are already IP addresses. Certain Microsoft Windows DNS servers have a
known bug that forward these queries.
The "rfc1918-ptr" filter includes only PTR queries for addresses in RFC1918 space. These should never leak from inside an organiza-
tion.
The "refused" filter, when used with the -R option, tells dnstop to count only replies with rcode REFUSED.
The "qtype-any" filter tells dnstop to count only message of type ANY.
-n name
Only count messages within the domain name
-P Print "progress" messages on stderr when in non-interactive mode.
-B buckets
Use buckets hash table buckets.
-X Do not tabulate the sources + query name counters. This can significantly reduce memory usage on busy servers and large savefiles.
savefile
a captured network trace in pcap format
device ethernet device (ie fxp0)
RUN TIME OPTIONS
While running, the following options are available to alter the display:
s display the source address table
d display the destination address table
t display the breakdown of query types seen
r display the breakdown of response codes seen
o display the breakdown of opcodes seen
1 show 1st level query names
2 show 2nd level query names
3 show 3rd level query names
4 show 4th level query names
5 show 5th level query names
6 show 6th level query names
7 show 7th level query names
8 show 8th level query names
9 show 9th level query names
! show sources + 1st level query names
@ show sources + 2nd level query names
# show sources + 3rd level query names
$ show sources + 4th level query names
% show sources + 5th level query names
^ show sources + 6th level query names
& show sources + 7th level query names
* show sources + 8th level query names
( show sources + 9th level query names
^R reset the counters
^X exit the program
space redraw
? help
NON-INTERACTIVE MODE
If stdout is not a tty, dnstop runs in non-interactive mode. In this case, you must supply a savefile for reading, instead of capturing live
packets. After reading the entire savefile, dnstop prints the top 50 entries for each table.
HOW MESSAGES ARE COUNTED
By default dnstop examines only query messages and ignores replies. In this case the response code table is meaningless and will likely show
100% "Noerror."
If you supply (only) the -R command line option, dnstop examines replies and ignores queries. This allows you to see meaningful response
code values, as well as all the other tables. In this case all the query attributes (such as type and name) are taken from the Question sec-
tion of the reply.
Note, however, that it is common for a stream of DNS messages to contain more queries than replies. This could happen, for example, if the
server is too busy to respond to every single query, or if the server is designed to ignore malformed query messages. Therefore, you might
want to examine both queries and replies by giving both -R and -Q command line options. In this case, only the response code counts are
taken from the replies and all other attributes are taken from the queries.
AUTHORS
Duane Wessels (wessels@measurement-factory.com)
Mark Foster (mark@foster.cc)
Jose Nazario (jose@monkey.org)
Sam Norris <@ChangeIP.com>
Max Horn <@quendi.de>
John Morrissey <jwm@horde.net>
Florian Forster <octo@verplant.org>
Dave Plonka <plonka@cs.wisc.edu>
http://dnstop.measurement-factory.com/
BUGS
Does not support TCP at this time.
BSD
21 March, 2008 BSD