Sponsored Content
Top Forums Shell Programming and Scripting getting rid of duplicate files Post 92324 by moxxx68 on Friday 9th of December 2005 09:59:47 AM
Old 12-09-2005
getting rid of duplicate files

i have a bad problem with multiple occurances of the same file in
different directories.. how this happened i am not sure! but I know
that i can use awk to scan multiple directory trees to find an
occurance of the same file... some of these files differ somwhat
but that does not matter! the name of the files are the same and
the context is basically the same....
i have seen an awk script that can be run on the command line using
a syntax where var=file:r and dup=var++ and var < 1 or to the
extent of this but can not remember exactly how this works.......
using the C shell;
i need to find occurances of var and if they are greater than one
and remove them leaving one occurance .. .
any examples or clues as to how to piece this together would be
appreciated since i don't use awk that often.
moxxx68
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Renaming multiple files, to get rid of extension

I have a good script to rename multiple files, but what's the best way I can remove some text from multiple filenames? Say I have a directory with 35 files with a .XLS at the end, how can I rename them to remove the .XLS but keep everything the same, without having to mv manually. Thanks. (6 Replies)
Discussion started by: nj78
6 Replies

2. UNIX for Dummies Questions & Answers

Getting rid of files with no ownership

I am in the process of learning how to do system administration (just on my own Linux machine) and have been working with the find command. One of the things I tried was find / -nouser -o -nogroup I redirected the output of my find query into a text file, and when I did a wc -l on it, it... (1 Reply)
Discussion started by: kermit
1 Replies

3. Shell Programming and Scripting

Finding Duplicate files

How do you delete and and find duplicate files? (1 Reply)
Discussion started by: Jicom4
1 Replies

4. Shell Programming and Scripting

Getting Rid of Having to Write to Flat Files

Ok, so i've been having to write to flat files lately and then making my script read information from the flat file and then work off of that. i dont want to keep doing that because i believe it creates a mess. i like to keep my work all to one script instead of having that one script... (7 Replies)
Discussion started by: SkySmart
7 Replies

5. Shell Programming and Scripting

Find duplicate files

What utility do you recommend for simply finding all duplicate files among all files? (4 Replies)
Discussion started by: kiasas
4 Replies

6. UNIX for Dummies Questions & Answers

how to get rid of last _ in the files name?

ex: I have list of files in a folder. abc_def_geh_.txt abc_.txt abc_def_geh_12345_.txt ab134c_d345345ef_444geh_12345_.txt i need to rename all files to get rid of the _ before .txt result should look like this: abc_def_geh.txt abc.txt abc_def_geh_12345.txt... (2 Replies)
Discussion started by: lv99
2 Replies

7. Shell Programming and Scripting

Remove duplicate files

Hi, In a directory, e.g. ~/corpus is a lot of files and subdirectories. Some of the files are named: 12345___PP___0902___AA.txt 12346___PP___0902___AA. txt 12347___PP___0902___AA. txt The amount of files varies. I need to keep the highest (12347___PP___0902___AA. txt) and remove... (5 Replies)
Discussion started by: corfuitl
5 Replies

8. Shell Programming and Scripting

Duplicate files

Hi Gents, I have 1 files as seen below. 44571009 100 42381900 101 23482389 102 44571009 103 28849007 104 28765648 105 25689908 106 28765648 107 42381900 108 44571009 109 17298799 110 44571009 111 I would like to get something like it 44571009 100 103 109 111 (3 Replies)
Discussion started by: jiam912
3 Replies

9. Shell Programming and Scripting

Trying to get rid of a duplicate output line...

Hi folks, I'm trying to work on a script that will grab a router interface report and generate the numbers of "in use" and "un-used" ports per device. Right now, I've got a cut down of the report as follows: sing /usr/apps/siteName/etc/DCAFT-9K.cmds for send text Connecting using... (11 Replies)
Discussion started by: Marc G
11 Replies

10. Shell Programming and Scripting

Finds all duplicate files

Hi, How would you write bash script that given a directory as an argument and finds all duplicate files (with same contents - by using bytewise comparison) there and prints their names? (6 Replies)
Discussion started by: elior
6 Replies
TTF2UFM_X2GS(1) 					      TTF2UFM Font Converter						   TTF2UFM_X2GS(1)

NAME
ttf2ufm_x2gs - font installer for Ghostscript SYNOPSIS
ttf2ufm_x2gs [config-file] DESCRIPTION
The fonts generated with ttf2ufm work fine with Ghostscript by themselves. The script `x2gs' (or `ttf2ufm_x2gs' when installed into a public directory, to avoid name conflicts with other programs) links the font files from the X11 direcotry into the Ghostscript directory and automatically creates the description file ("Fontmap") in Ghostscript format. If the configuration file is not specified as an argument then the file `"convert.cfg"' in the current directory is used, just like the `"convert"' script does. Indeed, this configuration file is used for both scripts. The Ghostscript-related parameters in the configuration file are: "DSTDIR" - the X11 font directory used by `"x2gs"' as the source of the fonts. This parameter is common with the X11 configuration. "GSDIR" - the base directory of Ghostsript. If this parameter is set to an empty string then `"convert"' won't call `"x2gs"'. So if you want to get only the X11 fonts installed then set this parameter to an empty string. This directory may vary on various system, so please check your system and set this value accordingly before running the script. "GSFONTDIR" - the font directory of Ghostscript. In the standard Ghostscript installation it's a subdirectory of "GSDIR" but some systems may use completely different directories. "GSCONFDIR" - the configuration subdirectory of Ghostscript that contains the "Fontmap" file. "INSTALLFONTMAP" - if the value is set to "YES" then install the entries for the new fonts right into the main "Fontmap" file. Otherwise just leave the file "Fontmap.ttf" in the Ghostscript configuration directory. After preparing the configuration file run the script. It symbolicaly links all the font files and creates the description file "Fontmap.ttf" in "GSCONDFIR". After that there are two choices. If the option "INSTALLFONTMAP" was set to "YES" then the font descriptions are also automatically installed into the master "Fontmap" file. The script is clever enough to detect if it was run multiple times with the same directories and if so it replaces the old "Fontmap" entries with the new ones instead of just accumulating all of them. You may also run it multiple times for multiple X11 directories and all the results will be properly collected in the "Fontmap". But it's your responsibility to watch that the names of the font files don't overlap. If the X11 font directory gets renamed then you have to remove its font entries from the "Fontmap" and only after that re-run `"x2gs"' for the new directory. On the other hand if the option "INSTALLFONTMAP" was set to "NO" then go to the "GSCONFDIR" directory and insert the contents of "Fontmap.ttf" into the "Fontmap" file manually. This step may be left manual to make the installation a little bit more safe. After that you may also want to redefine some of the aliases in "Fontmap" to refer to the newly installed fonts. But the redefinition of the aliases may be dangerous if the width of characters in the new font will be different from the old font. Alas, there is no visible solution of this problem yet. FILES
o TTF2UFM_SHAREDIR/scripts/convert.cfg.sample o TTF2UFM_SHAREDIR/scripts/* o TTF2UFM_SHAREDIR/README o TTF2UFM_SHAREDIR/FONTS o TTF2UFM_SHAREDIR/* o TTF2UFM_BINDIR/ttf2ufm SEE ALSO
o ttf2ufm(1) o ttf2ufm_convert(1) o t1asm(1) version 3.4.4 December 31, 2003 TTF2UFM_X2GS(1)
All times are GMT -4. The time now is 05:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy