Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Compare two directory and find differents Post 303045817 by RudiC on Tuesday 14th of April 2020 04:30:56 AM
Old 04-14-2020
That was not mentioned in your OP. Try
Code:
find SRC -iname "*.doc*" | while read FP; do FB="${FP%.*}"; [ ! -f "${FB/SRC/DST}.pdf" ] && echo "$FP"; done
SRC/D2/File6.doc
SRC/D2/File2.docx
SRC/D1/File6.doc
SRC/D1/File2.docx
SRC/File6.doc
SRC/File2.docx

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Directory compare script

Hello, I am looking for a script, or pointer to an approach to creating a script, that will compare two versions of a codebase and output a third directory structure containing only the files that differ between the two. I use diff quite often, but it will only create patch files (AFAIK). Does... (3 Replies)
Discussion started by: jwilliams108
3 Replies

2. Shell Programming and Scripting

Script That Can navigate to 3 differents directory & remove files under them

Hi I am Trying to Write a script that can goto 4 different directorys on the server & remove the Files older then 30 days ?? /logs logs1 logs2 logs3 Now I need to remove files under logs1 logs2 logs3 which are older then 30 days whose name stat 'sit' , 'mig','bld' . in... (3 Replies)
Discussion started by: Beginner123
3 Replies

3. Shell Programming and Scripting

How i can obtain differents data on a single pass?

#!/bin/bash for i in `ls -c1 /usr/share/applications` do #name=`cat /usr/share/applications/$i | grep ^Name= | cut -d = -f2` #categories=`cat /usr/share/applications/$i | grep ^Categories= | sed 's/;/=/g' | cut -d = -f2` name=$(grep ^Name= /usr/share/applications/$i | cut -d = -f2)... (12 Replies)
Discussion started by: alexscript
12 Replies

4. Shell Programming and Scripting

Compare new version of two directory

How to compare new version exist of two path directory. for e.g., path1 - /user/path/test/ path2 - /user/path/score/ If its exist new version then copy that new version into the first path directroy. How will do this. (3 Replies)
Discussion started by: roy1912
3 Replies

5. Shell Programming and Scripting

Extract sequences of bytes from binary for differents blocks

Hello to all, I would like to search sequences of bytes inside big binary file. The bin file contains blocks of information, each block begins is estructured as follow: 1- Each block begins with the hex 32 (1 byte) and ends with FF. After the FF of the last block, it follows 33. 2- Next... (59 Replies)
Discussion started by: Ophiuchus
59 Replies

6. Shell Programming and Scripting

Find every directory named XYZ under the DVLP directory

I only want to find files under each branch of the directory tree inside directories named XYZ and there are multiple XYZ directories? (7 Replies)
Discussion started by: emc^24sho
7 Replies

7. Programming

Query SQL get two values differents from the same columns

Hi, I have 2 different values in the same column and two different values in other column Query 1 ins name value 1 Test 12345 1 TestV1 12/10/2014 8 Test 85435 8 TestV1 11/11/2005 9 Test 42232 9 TestV1 19/10/2000 6 Test 54321... (6 Replies)
Discussion started by: faka
6 Replies

8. Shell Programming and Scripting

awk - matching on 2 columns for differents lines

Given this file (I separated them in block to make my explanation clearer): 92157768877;Sof_deme_Fort_Email_am_%yyyy%%mm%%dd%;EMAIL;20/02/2015;1;0;0 92157768877;Sof_trav_Fort_Email_am_%yyyy%%mm%%dd%;EMAIL;20/02/2015;1;0;0 91231838895;Sof_deme_faible_Email_am;EMAIL;26/01/2015;1 0;0... (1 Reply)
Discussion started by: Andy_K
1 Replies

9. Shell Programming and Scripting

Compare directory dates

hi, I need to know if a specific directory exists in a folder named after the date of yesterday (02/06/2015) The problem is simple but not how to do it. :confused:i= date -d "yesterday" '%Y-%m-%d' <- the format of directory is 2015-06-02 if in /var/logroot/index exist directory whit... (4 Replies)
Discussion started by: tmeto
4 Replies

10. UNIX for Beginners Questions & Answers

How to find and get a file in an entire directory with an excluded directory specified?

How to get a file 'zlib.h' in an entire directory with an excluded directory specified lives under that starting directory by using find command, as it failed on: $ find . -name 'zlib.h' -a -ipath 'CHROME.TMP' -prune -o -print it'll just list entirely up (2 Replies)
Discussion started by: abdulbadii
2 Replies
NF2CSV(1)						      General Commands Manual							 NF2CSV(1)

NAME
nf2csv - iptables to CSV data SYNOPSIS
nf2csv [options] DESCRIPTION
nf2csv Parses iptables log messages and generates comma-separate value formatted data. This is useful to provide input to the AfterGlow project (see http://afterglow.sourceforge.net) so iptables logs can be visualized graphically. An interesting application of nf2csv and AfterGlow is to parse and visualize the iptables logfiles made available by the Honeynet project in their Scan of the Month challenges. The Scan30 and Scan34 challenges (see http://www.honeynet.org/scans/scan30/ and http://www.honeynet.org/scans/scan34/) contain extensive iptables logfiles, and some graphical representations of these can be viewed here: http://www.cipherdyne.org/psad/honeynet/. The psad pro- gram also has the ability to generate CSV data from iptables logs with its --CSV mode. OPTIONS
-f, --fields <tokens> Specify the set of fields that should be printed from iptables log messages. The most common usage of this argument is SRC DST DPT to print the source and destination IP addresses, followed by the destination port number. Available fields to print include: SRC, SPT, DST, DPT, PROTO, LEN, IN, TOS, TTL, SEQ, ID, TYPE, CODE (and these can also be referred to as src, dst, sp, dp, proto, ip_len, intf, tos, and ttl). There are several additional fields that are not given specific tags within iptables log messages, and these can be included by specifying one of the following: flags, top_opts, ip_opts, chain, log_prefix, frag_bit, src_mac, dst_mac, and udp_len. Each of these fields accepts a search criteria in the form of a numeric comparison, string match, or IP match. See the EXAMPLES section below for more information. -u, --unique-lines Only print unique output lines. This can drastically reduce the output of nf2csv depending on the characteristics of the iptables logfile that is being parsed. -m, --max-lines <num> Specify the maximum number of output lines nf2csv will generate. This is useful for providing a limited set of data to AfterGlow in order to make visualizations more clear and less cluttered. -r, --regex <regex> Specify a regular expression that must match against the entire iptables log message in order for it to be included within the CSV output. This allows log messages to be included from the output with all of the flexibility of regular expressions. See the EXAM- PLES section below for more information. -n, --neg-regex <regex> Specify a regular expression that must not match against the iptables log message in order for it to be included within the CSV out- put. This allows log messages to be excluded from the output with all of the flexibility of regular expressions. See the EXAMPLES section below for more information. -s, --start-line <line> Specify the starting line where nf2csv begins to process iptables log data. If you are processing a huge file with thousands of iptables log messages this option can be useful to parse a specific chunk of this data. Also see the --end-line option below. -e, --end-line <line> Specify the last line of iptables log data that nf2csv will parse. EXAMPLES
The following examples illustrate the command line arguments that could be supplied to nf2csv in a few situations: Print source and destination IP addresses and the destination port number: $ nfcsv -f src dst dp Same as above, but now require that the source IP come from the 11.11.11.0/24 subnet: $ nfcsv -f src:11.11.11.0/24 dst dp Display instances of the MyDoom worm: $ nfcsv -f src dst dp:3127 Display packets that have low TTL values: $ nfcsv -f src dst ttl:<10 Display all traffic to or from the host 11.11.11.67 (this sets up an OR condition between the src and dst fields): $ nfcsv -f src dst dp -r 11.11.11.67 Display likely instances of Window Messanger popup spam attempts (note the use of the --regex argument to require minimal lengths on the UDP length field and source port, but the output contains the destination port of 1026): $ nfcsv -f src dst dp -r SPT={4}.*LEN=[4-9]{2} SEE ALSO
psad(8) AUTHOR
Michael Rash <mbr@cipherdyne.org> BUGS
Send bug reports to mbr@cipherdyne.org. Suggestions and/or comments are always welcome as well. DISTRIBUTION
nf2csv is distributed with the psad project (http://www.cipherdyne.org/psad/) under the GNU General Public License (GPL), and the latest version may be downloaded from http://www.cipherdyne.org/ Linux Jun, 2006 NF2CSV(1)
All times are GMT -4. The time now is 10:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy