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
hier(7) 						 Miscellaneous Information Manual						   hier(7)

Name
       hier - file system hierarchy

Description
       The following is a brief description of the root file system.  The major directory hierarchy and representative files are listed.

       Symbolic links can be included in the files to provide backward compatibility. To display the links, type:
       % ls -l

       See the Guide to Disk Maintenance for more detailed information.

       /       Directory  for  root file system. This file system is separated into nonsharable data, (root (/)) and sharable data, (/usr).  These
	       two file systems are each divided into the following types: static data, variable data, and executable data.

       /bin    Directory for the single user executable data files.

       /bin/init
	       Parent of all processes,

       /bin/mount
	       Mount program,

       /dev    Directory for devices.
		  MAKEDEV Shell script to create special files
		  MAKEDEV.local
			  Site-specific part of MAKEDEV
		  console Main console,
		  rz	  SCSI disks,
		  rrz*	  Raw SCSI disks,
		  rmt*	  Tapes
		  mrmt*   Tapes
		  tty*	  Terminals,
		       .
		       .
		       .

       /etc    Directory for the machine-specific static data files and shell scripts for booting.
		  crontab   System clock daemon table,
		  disktab   Disk characteristics and partition tables,
		  fstab     File system configuration table,
		  group     Group file,
		  hosts     Host name-to-network address mapping file,
		  motd	    Message-of-the-day file,
		  networks  Network name-to-network number mapping file,
		  passwd    Password file,
		  protocols Name-to-number mapping file,
		  rc	    Shell script to bring the system to multiuser mode
		  rc.local  Site-dependent portion of rc
		  remote    Names and description of remote hosts for and
		  services  Network services definition file,
		  termcap   Description of terminal capabilities,
		  ttys	    Properties of terminals,
		       .
		       .
		       .

       /lib    Symbolic link to

       /lost+found
	       Directory for connecting detached files for

       /sys    Symbolic link, normally to

       /tmp    Directory for temporary files (see also
		  e*	 Used by
		  ctm*	 Used by
		       .
		       .
		       .

       /usr    General purpose directory, on which the file system is normally mounted (see description that follows).

       /var    Directory for variable length files, such as spool, administrative, and temporary files. These files can also be located in See the
	       Guide to Disk Maintenance.

       /vmunix Kernel image

       The  directory contains the sharable data. The following is a brief description of the file system.  The major directory hierarchy and rep-
       resentative files are listed.

       /usr	 Root directory for file system.

       /usr/adm  Directory for administrative information, which is now a symbolic link to
		    crash   Directory for crash dumps
		    vmcore.?,vmunix.?	Crash dump files
		    lpacct  Line printer accounting,
		    tracct  Phototypesetter accounting,
		    wtmp    Login history,
			 .
			 .
			 .

       /usr/bin  Directory for the shared executable data files, including utility programs and Shell scripts.
		    as	 assembler
		    cc	 C compiler executive (see also and
		    csh  C shell
			 .
			 .
			 .

       /usr/dict Directory for word lists.
		    spellhist History file,
		    words     Word list,
			 .
			 .
			 .

       /usr/doc  Directories containing files for the Vol.2 documentation.
		    as	 Assembler manual
		    c	 C manual
			 .
			 .
			 .

       /usr/etc  Directory for utility programs and shell scripts.

       /usr/etc/cron
		 Clock daemon,

       /usr/etc/dump
		 Dump program,

       /usr/examples
		 A directory where components of the base system and Digital's separately licensed products can locate code examples, scripts, and
		 demos for customers to use.  A typical use is to complement printed documentation.

       /usr/games
		 Directory for games.
		    hangman   Hangman game
		    lib       Library directory for games
			 .
			 .
			 .

       /usr/etc/getty
		 Part of login,

       /usr/include
		 Directory for standard #include files.
		    a.out.h  Object file layout,
		    math.h
		    stdio.h  Standard I/O,
		    sys      Symbolic link to (system generation #include files)
			 .
			 .
			 .

       /usr/lib  Directory for the shared static data files, such as object libraries.
		    atrun   System scheduler,
		    cpp     C preprocessor
		    libc.a  System calls and standard I/O (2,3,3S)
		    font    Directory for fonts
		    lint    Directory for utility files for
		    tmac    Directory for macros
		    units   Data file of conversion tables for
		    uucp    Directory for programs and data
			 .
			 .
			 .

       /usr/man  Directory for unformatted and preformatted reference (manual) pages.
		    cat1    Section 1 (preformatted)
		    cat2    Section 2 (preformatted)
		    cat3    Section 3 (preformatted)
			 .
			 .
			 .
		    man1    Section 1 (unformatted)
		    man2    Section 2 (unformatted)
		    man3    Section 3 (unformatted)
			 .
			 .
			 .

       /usr/mdec Directory for ULTRIX boot files.

       /usr/msgs Directory for messages,

       /usr/new  Directory for binaries of new versions of programs.

       /usr/preserve
		 Directory for editor files preserved after crashes or hangups.

       /usr/skel Directory for sample user startup files.
		    .cshrc   Startup file for
		    .login   Login startup file for
		    .mailrc  Startup file for
		    .profile Startup file for
		    .project Lists information used by

       /usr/spool
		 Directory for delayed execution files, which is now a symbolic link to
		    at	 Directory used by
		    lpd  Directory used by
			    lock Present when line printer is active
			    cf*  Copy of file to be printed, if necessary
			    df*  Daemon control file,
			    tf*  Transient control file (exists while is working)
		    mail  Mailboxes for
			    name	Mail file for user name
			    name.lock	Lock file (exists while name is receiving mail)
		    uucp  Work files and staging area for
			    LOGFILE	Summary log

       /usr/src  Generic sources.
		    usr.bin User sources
			      troff and sources
			      term  Directory of description files for new printers

       /usr/sys  Directory for system files.
		    b.mips    BINARY for MIPS
		    b.vax     BINARY for VAX
		    fs	      Filesystem SRC
		    net       Netword SRC
		    mips      MIPS-specific SRC
		    vax       VAX-specific SRC
		    data      System data files
		    conf/{mips,vax}
			      Configuration files
		    h	      #include files
		    SAS       Standalone system
		    sys       Machine independent SRC

       /usr/tmp  Symbolic link to

See Also
       apropos(1), find(1), finger(1), grep(1), ls(1), whatis(1), whereis(1), which(1), ncheck(8)
       Guide to Disk Maintenance

								       RISC								   hier(7)
All times are GMT -4. The time now is 04:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy