Sponsored Content
Top Forums Shell Programming and Scripting Best way to diff two huge directory trees Post 302224287 by Ikon on Tuesday 12th of August 2008 07:03:37 PM
Old 08-12-2008
What about just compairing the output of

Code:
# cd /path/to/directory
# du
16      ./somedir
7200    ./somedir/1
1200    ./somedir/2
80      ./someotherdir
14512   .

This wont check the files as far as being exact copies but would verify the size of the files in the directories.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to look in directory for files with diff date

What kind of command can i use to search a directory and subdirectories for all files that do not have the same date? i want to find any files that do not match a date of Sep 13, 2002? Or that have a different owner or group? Any help appreciated! (2 Replies)
Discussion started by: kymberm
2 Replies

2. Programming

what is diff b/w near ,far and huge pointers

helo, can u tell me what is exact difference among near,far and huge pointer Amit (1 Reply)
Discussion started by: amitpansuria
1 Replies

3. UNIX for Advanced & Expert Users

How to rsync or tar directory trees, with hidden directory, but without files?

I want to backup all the directory tress, including hidden directories, without copying any files. find . -type d gives the perfect list. When I tried tar, it won't work for me because it tars all the files. find . -type d | xargs tar -cvf a.tar So i tried rsync. On my own test box, the... (4 Replies)
Discussion started by: fld2007
4 Replies

4. Shell Programming and Scripting

Diff - filename and directory name are same

Hi, I have in the one folder file and directory that have same name. I need make diff from first directory where exists file in folder FOLDER/filename and second file where not exist folder, but FOLDER is filename. I use -N switch for create new file. Scripts report: Not a directory Sample:... (2 Replies)
Discussion started by: tomix
2 Replies

5. Shell Programming and Scripting

Fine Tune - Huge files/directory - Purging

Hi Expert's, I need your assitance in tunning one script. I have a mount point where almost 4848008 files and 864739 directories are present. The script search for specific pattern files and specfic period then delete them to free up space. The script is designed to run daily and its taking around... (19 Replies)
Discussion started by: senthil.ak
19 Replies

6. Shell Programming and Scripting

Checking whether the file exists under a directory and doing a diff

Hi Everyone, I am writing a shell script for the below needs and would like your suggestions and advices. I have a lot of scripting files(Shell Scripts) under the directory: /home/risk_dev/dev I have another directory which has a lot of shell scripts under the directory: ... (2 Replies)
Discussion started by: filter
2 Replies

7. Shell Programming and Scripting

How to copy very large directory trees

I have constant trouble with XCOPY/s for multi-gigabyte transfers. I need a utility like XCOPY/S that remembers where it left off if I reboot. Is there such a utility? How about a free utility (free as in free beer)? How about an md5sum sanity check too? I posted the above query in another... (3 Replies)
Discussion started by: siegfried
3 Replies

8. Shell Programming and Scripting

ksh - Checking directory trees containing wild cards

Hi Can somebody please show me how to check from within a KSH script if a directory exists on that same host when parts of the directory tree are unknown? If these wildcard dirs were the only dirs at that level then ... RETCODE=$(ls -l /u01/app/oracle/local/*/* | grep target_dir) ... will... (4 Replies)
Discussion started by: user052009
4 Replies

9. UNIX for Beginners Questions & Answers

Need help with listing file name and modified date on a huge directory

hi, We have a huge directory that ha 5.1 Million files in it. We are trying to get the file name and modified timestamp of the most recent 3 years from this huge directory for a migration project. However, the ls command (background process) to list the file names and timestamp is running for... (2 Replies)
Discussion started by: subbu
2 Replies
V2CC.LIBS(5)							   File Formats 						      V2CC.LIBS(5)

NAME
v2cc.libs - VHDL library mapping file for the FreeHDL compiler/simulator. DESCRIPTION
FreeHDL is a compiler/simulator suite for the hardware description language VHDL. VHDL'93 as well as VHDL'87 standards are supported. FreeHDL translates the original VHDL source FILEs into C++. Then, the C++ source can be compiled and linked to the kernel to build the sim- ulation program. Starting the generated executable will simulate the corresponding VHDL model. The actual build process to generate the simulator from the VHDL source is a complex process which is handled by the gvhdl script. FreeHDL does not have a opaque notion of design libraries. VHDL files are not pre-analyzed and checked into some library data base as in other VHDL compiler/simulator systems. Instead, whenever a reference to a design unit needs to be made, FreeHDL parses the VHDL code of that design unit from fresh. Therefore, it needs to be able to find the source file of a design unit given the VHDL name of that unit. Thus, as far as FreeHDL is concerned, a design library is a mapping from VHDL identifiers to file names. There is also a mapping for get- ting library names from mapping files. Such a mapping is specified via a "mapping file". It contains a list of pattern rules that each transform a certain class of identifiers into file names. The syntax of a mapping file is: Lexical: litchar: 'a'..'z' | 'A'..'Z' | '0'..'9' | '_' | '/' | '-' | '.' escchar escchar: '' char whitespace: ' ' | ' ' | 'v' | ' ' | comment comment: '#' any_character* ' ' opchar: ':' | ',' | '(' | ')' specchar: every printable char except litchar, whitespace and opchar symchar: litchar | specchar symbol: symchar+ Grammar: mapping: version patternrule* version: "v2cc_mapfile" "0" patternrule: symbol [ ':' symbol ] Comments are ignored. A mapping files specifies a sequence of pattern rules. When transforming an identifier, each rule is tried in turn and the first one that matches is chosen. A rule looks like pattern: filename When the ": filename" part is omitted, it defaults to "patternEXT" where "EXT" is determined by the user of the mapping file. The "pattern" can contain the special character "<" which introduces a `wildcard'. The "<" must be followed by a ">", with arbitrary char- acters inbetween. These characters form the name of the wildcard. A wildcard matches any sequence of characters. There can be any number of wildcards in the pattern, but each must have a unique name. The "filename" can also contain the character "<", followed by a name, followed by ">". There, it introduces a `wildcard substitution'. It will be replaced with the characters that matched the wildcard with the same name in "pattern". When there is no wildcard in "pattern" with the right name, it will be replaced with nothing. While doing this replacement, the characters "#" and "/" are replaced as "##", and "#-" respectively. No other character translations are done, so if you have funny characters in your VHDL identifiers, you will have funny characters in your filenames. Before doing the comparison with the patterns, the VHDL identifier is brought into a canonical form: when it is not an abstract identifier, all its characters are down-cased. When the resulting filename is relative (does not begin with "/"), it is prefixed with the directory of the mapping file. A non-existent mapping file is equivalent to the single rule <> An empty mapping file is just that: an empty mapping. The mapping does not need to be reversible. It is OK when multiple identifiers map to a single filename. No special character besides "<" and ">" is valid in "pattern" or "filename". They are reserved for future extensions. The mapping files for going from design unit names to filenames are found by looking into directories specified by the `v2cc library path'. You can use the environment variable V2CC_LIBRARY_PATH and command line options to define the path. When the environment variable is not set, it defaults to a value that makes the standard libraries available that are distributed and installed with v2cc itself. When it is set, it completely overwrites this default value. The variable V2CC_LIBRARY_PATH consists of ":" separated filenames. The filename "*" is replaced with the default value mentioned above. In addition to the environment variable, you can use the "-L libdir" command line option with v2cc. The directories specified with "-L" are added in front of the ones specified by V2CC_LIBRARY_PATH. In the final library path, they appear in the same order as on the command line. Looking for a design unit named UNIT in a library named LIB is done like this: for each component of the library path, L if L is a regular file set LMAP to L else if L is a directory set LMAP to L/v2cc.libs else continue with next component translate LIB into FLIB using LMAP with EXT="" if FLIB.vhdl exists terminate with FLIB.vhdl as the result if FLIB.v2cc exists set UMAP to FLIB.v2cc else if FLIB is a directory set UMAP to FLIB/v2cc.units else continue with next component translate UNIT into FUNIT using UMAP with EXT=".vhdl" terminate with FUNIT as the result terminate unsuccessfully This mechanism is used for all design units that are referenced from within VHDL code (or via other means). There is a complication with architectures and package bodies, though, because they are not uniquely identified by a single identifier. For them, a artificial identi- fier is constructed. Architectures get names of the form <entity>(<architecture>) while package bodies become <package>(body) For example, "architecture struct of model" is turned into "model(struct)" and "package body misc" is turned into "misc(body)". When a design file contains multiple design units, they are all parsed, checked for correctness and remembered, but only the needed unit will be used for code generation. That is, when a design file contains both a package header and a package body and the package header is referenced from another design unit, no code will be generated for the package body. When one of the ignored units will be referenced later in the same invocation of v2cc, the design file will not be read again because all design units are retained in core. EXAMPLES
The simplest situation is when you have no mapping files at all. A design library is then a directory on your library path. The name of that directory is that of the library in VHDL. Each file in that directory with a ".vhdl" extension is used for a design unit with the same name as the file without the extension. Say you have this directory structure somedir/ std/ standard.vhdl textio.vhdl ieee/ numeric_bit.vhdl std_logic_1164.vhdl When you put "somedir" into your library path, you have access to the design units STD.STANDARD STD.TEXTIO IEEE.NUMERIC_BIT IEEE.STD_LOGIC_1164 In this situation, you have one file per design unit. When you have one file per design library, it would look like this somedir/ fmf.vhdl All references to design units in the FMF design library would be routed to "fmf.vhdl". As another example assume that all VHDL libraries are mapped into subdirs starting from root directory "/foo". Further, assume that there are VHDL libraries named "lib1" and "lib2". They shall be mapped to subdir "/foo/lib1_dir" and "/foo/lib2_dir". Hence, the file/directory structure is as follows: /foo <- library root directory /foo/v2cc.libs <- mapping control file /foo/lib1_dir <- library dir for VHDL library lib1 /foo/lib1_dir/comp1.vhdl <- file that contains VHDL model comp1 /foo/lib2_dir <- library dir for VHDL library lib2 /foo/lib2_dir/comp2.vhdl <- file that contains VHDL model comp2 Then, file "/foo/v2cc.libs" should contain: v2cc_mapfile 0 lib1 : lib1_dir lib2 : lib2_dir In order to compile a design named comp1 (stored in file comp1.vhdl) into VHDL library lib1 goto subdir "/foo/lib1_dir" and execute: gvhdl -c -L .. -l lib1 comp1.vhdl Note that option "-l lib1" forces the compiler to associate the model stored in "comp1.vhdl" with VHDL library lib1. Note further, that the compiler switch "-L .." specifies the path to the directory where "v2cc.libs" is stored. You may also specify an absolute path: gvhdl -c -L /foo -l lib1 comp1.vhdl Note that comp1 should reside in a file named "comp1.vhdl". If lib2 contains a design comp2 that makes use of comp1 from lib1 then goto "/foo/lib2_dir" and run the following command to create an exe- cutable for model comp2: gvhdl -L .. -l lib2 comp2.vhdl ../lib1_dir/comp1.o SEE ALSO
gvhdl(1), freehdl-v2cc(1), freehdl-config(1) AVAILABILITY
The latest version of FreeHDL can always be obtained from www.freehdl.seul.org REPORTING BUGS
Known bugs are documented within the BUGS file. If your report addresses a parser related topic then contact Marius Vollmer <mvo@zagadka.ping.de>. If it is related to the code generator or compiler then send an email to Edwin Naroska <edwin@ds.e-technik.uni- dortmund.de>. If your are not sure send it to Edwin. He will take care of forwarding your report to the appropriate recipient. COPYRIGHT
Edwin Naroska (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 <edwin@ds.e-technik.uni-dortmund.de> This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. AUTHORS
Written by Marius Vollmer <mvo@zagadka.ping.de> and Edwin Naroska <edwin@ds.e-technik.uni-dortmund.de>. Debian/GNU Linux December 2005 V2CC.LIBS(5)
All times are GMT -4. The time now is 01:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy