Sponsored Content
Top Forums Shell Programming and Scripting Find directories not containing foo, and copy foo to them Post 76400 by dkaplowitz on Tuesday 28th of June 2005 07:36:38 AM
Old 06-28-2005
Thanks for all the replies. I'm going to try a few things out and see how far I get. I'll post back what I wound up using.

Regards,

Dave
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

foo

if ; then echo Its Cold for $sid at $c_dst $jobroot/scripts/abc.sh $sid COLD $c_dst elif ; then echo Its Hot for $sid at $h_dst $jobroot/scripts/abc.sh $sid HOT $h_dst else echo No backup for $sid today wat does foo do ?? (2 Replies)
Discussion started by: bn_unx
2 Replies

2. Shell Programming and Scripting

Regex & grep-foo

I need a way to grep -v a list of times/date from the output of postqueue -p that are a few hours old, in order to remove them with postsuper -d. Right now I have a script that is deleting the previous day of messages left in the queue, which runs once each day. I want to clean up the job and... (1 Reply)
Discussion started by: DoneWithM$
1 Replies

3. Shell Programming and Scripting

if [ -z echo foo | egrep -e 'regexp' != '' ] -> dont work

Hallo, I need to test a String (a special ip number-string). So I want to run that: ipadress=172.0.0.0 # for debugging: echo $ipadress | egrep -e '172\.?\.??\.??$' # the test that doesnt work if test -z `echo $ipadress | egrep -e '172\.?\.??\.??$'` != "" then echo "match" else... (1 Reply)
Discussion started by: wiseguy
1 Replies

4. Shell Programming and Scripting

using /etc/foo.config in shell script

I'm very very new to shell scripting (about 4 hours) i've google'd till i can't google no more is it possible to have store values in a config file .e.g /etc/foo.conf data=/home/ mount=/dev/sda1 size=1GB and access these values from a shell script but also be able to use... (3 Replies)
Discussion started by: xpd259
3 Replies

5. Shell Programming and Scripting

SED: Extracting text between first occurance of foo in front of bar

Suppose I have a text file that contains the tags <foo> and <bar>. The text file can have unlimted occurances of <foo> and <bar> and looks somthing like this: <foo> Some Text <foo> Some Text <bar> Some Text <foo> Some (1 Reply)
Discussion started by: ArterialTool
1 Replies

6. UNIX for Dummies Questions & Answers

the meaning of "!:*" in "alias foo 'command\!:*' filename"

Hi: How can I remove my own post? Thanks. (2 Replies)
Discussion started by: phil518
2 Replies

7. UNIX for Dummies Questions & Answers

Odd result from cp -R foo/.* bar

I'm not all that much of a newbie but I've not encountered this before. Happens both in Cygwin and in Mac OS X (Darwin): cp -R /path/to/foo/.* /path/to/bar (where directory 'bar' exists) ... seems to copy not only the contents of directory 'foo', but also other directories that are... (3 Replies)
Discussion started by: ChapHarrison
3 Replies

8. UNIX for Dummies Questions & Answers

Having trouble understanding this command: >foo<bar bc

Sometimes it works for me and sometimes I get this error: syntax error on line 1, teletype Basically I've got no idea whats going on, especially at the end of the command: bc Any help is appreciated (1 Reply)
Discussion started by: phunkypants
1 Replies

9. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies
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
All times are GMT -4. The time now is 07:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy