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
x86_format_insn(3)						     libdisasm							x86_format_insn(3)

NAME
x86_format_insn, x86_format_mnemonic, x86_format_operand, x86_format_header - generate a string representation of a disassembled instruc- tion. SYNOPSIS
#include <libdis.h> int x86_format_operand(x86_op_t *op, char *buf, int len, enum x86_asm_format format); int x86_format_mnemonic(x86_insn_t *insn, char *buf, int len, enum x86_asm_format format ); int x86_format_insn(x86_insn_t *insn, char *buf, int len, enum x86_asm_format format ); int x86_format_header( char *buf, int len, enum x86_asm_format format); DESCRIPTION
x86_format_insn generates an assembly-langauge representation of the disassembled instruction in the specified format. x86_format_mnemonic and are called by x86_format_operand to format the instruction mnemonic and operands, respectively, but they may be invoked directly by the user. Each of these routines fills buffer buf of len bytes with an ASCII string representing the instruction, mnemonic, or operand. x86_format_header fills buffer buf of len bytes with a description of the specified format. The following formats are available: native_syntax : Intel syntax with address and hex intel_syntax : Intel x86 syntax att_syntax : AT&T Syntax raw_syntax : Pipe-delimited internal format xml_syntax : XML representation Native syntax uses dest, src ordering and displays the address, opcode bytes, and instruction in tab-delimited format: "ADDRESS BYTES MNEMONIC DEST SRC IMM" Intel syntax uses dest, src ordering and displays the instruction in tab-and-comma delimited format: "MNEMONIC DEST, SRC, IMM" AT&T syntax uses src, destordering and displays the instruction in tab-and-comma delimited format: "MNEMONIC SRC, DEST, IMM" Raw syntax displays all details of the instruction in pipe-delimited format: "ADDRESS|OFFSET|SIZE|BYTES|PREFIX|PREFIX_STRING| XML syntax displays all details of the instruction in XML format: GROUP|TYPE|NOTES|MNEMONIC|CPU|ISA|FLAGS_SET| FLAGS_TESTED|STACK_MOD|STACK_MOD_VAL" [|OP_TYPE|OP_DATATYPE|OP_ACCESS|OP_FLAGS|OP]*" "<x86_insn> <address rva= offset= size= bytes=/> <prefix type= string=/> <mnemonic group= type= string= cpu= isa= note= /> <flags type=set> <flag name=> </flags> <stack_mod val= > <flags type=tested> <flag name=> </flags> <operand name=> <register name= type= size=/> <immediate type= value=/> <relative_offset value=/> <absolute_address value=> <segment value=/> </absolute_address> <address_expression> <segment value=/> <base> <register name= type= size=/> </base> <index> <register name= type= size=/> </index> <scale> <immediate value=/> </scale> <displacement> <immediate value=/> <address value=/> </displacement> </address_expression> <segment_offset> <address value=/> </segment_offset> </operand> </x86_insn>" EXAMPLES
The following will print insn in Intel syntax: void att_print( x86_insn_t *insn ) { char line[256]; x86_format_insn(insn, line, 256, intel_syntax); printf( "%s ", line); } The following routine formats an instruction manually using AT&T syntax: void manual_print( x86_insn_t *insn, void *arg ) { char buf[128]; int i; printf("%08lX", insn->addr ); for ( i = 0; i < 10; i++ ) { if ( i < insn->size ) { printf(" %02X", insn->bytes[i]); } else { printf(" "); } } x86_format_mnemonic( insn, buf, 128, att_syntax ); printf( " %s ", buf ); if ( insn->operands[op_src].type != op_unused ) { x86_format_operand( &insn->operands[op_src], insn, buf, 128, att_syntax ); /* if src is present, so is dest */ printf("%s, ", buf); } if ( insn->operands[op_dest].type != op_unused ) { x86_format_operand( &insn->operands[op_dest], insn, buf, 128, att_syntax ); printf("%s", buf); } if ( insn->operands[op_imm].type != op_unused ) { x86_format_operand( &insn->operands[op_imm], insn, buf, 128, att_syntax ); /* if src is present, so is dest */ printf(", %s", buf); } printf(" "); } SEE ALSO
libdisasm(7), x86_disasm(3), x86_init(3), x86dis(1) mammon_ 0.21 x86_format_insn(3)
All times are GMT -4. The time now is 11:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy