script to search all the directories


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting script to search all the directories
# 1  
Old 07-09-2002
Computer script to search all the directories

Hi there,

Is there any command or script to search all the directories for duplicated files?
Thanks,

Abrahim
# 2  
Old 07-09-2002
Write your own script. See man pages on 'diff', 'cmp', ... In the script, compare each file with every other. If they match, ACTION1, else, CONTINUE.
# 3  
Old 07-09-2002
There is no command to do this... but as 'lucifer' here as suggested you can write a script. Keep in mind in this script that you may be dealing with both flat files and binary files..... they will use different commands for comparisons.
# 4  
Old 07-10-2002
For larger files that cannot be handled by diff you can use bdiff.
For more details, use man bdiff.

-Nisha
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to use a grep search to search for a specific string within multiple directories?

Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried: grep -lr "this string" * but I do not... (3 Replies)
Discussion started by: Circuits
3 Replies

2. Shell Programming and Scripting

Search for file extensions in the given directories

Hey guys, I'm lost... I need to make a script that will work in this way: ./script.sh -e sh /usr/bin /home/student this script will result in this output: amuFormat.sh /usr/bin gettext.sh /urs/bin perfect.sh /home/student the parameter -e <ext> gives you which... (2 Replies)
Discussion started by: Miki1579
2 Replies

3. UNIX for Advanced & Expert Users

Search file in all directories.

Hi colleagues, I need to search one file in all dierctories, i have O.S. AIX 5.3, my file began with cc, the others caracters i unknow. Then i can to search one string in file in all dierctories. Thank you for advanced. (8 Replies)
Discussion started by: systemoper
8 Replies

4. Shell Programming and Scripting

Script to Search Logs Several Directories Pulling out Only Current Date

Hi All.. I'm seeking assistance with editing a script to search log files in several directories. I'm close to what I'm seeking, but need additional guidance. The log files are always listed by current date; however, inside the log file includes dates that go back to 2011. What I'm... (6 Replies)
Discussion started by: lenaf7
6 Replies

5. UNIX and Linux Applications

Perl Script to read an excel file into an array and search in the UNIX directories

Hi, I want the Perl script with versions 5.8.2 and 5.8.5 starting with #!/usr/bin/perl The Perl program should read the excel file or text file line by line and taking into an array and search in the UNIX directories for reference file of .jsp or .js or .xsl with path .The Object names... (2 Replies)
Discussion started by: pasam
2 Replies

6. Shell Programming and Scripting

find restricted search to some directories

Hi, I would like to look for files in certain sub-directories in order to avoid looking into possibly big ones. The subdirectories to search are created monthly following the convention YYYYMM. I've tried this: find . \( ! -name 2 -prune \) -o -type f -print expecting to retrieve only Y... (15 Replies)
Discussion started by: m69w
15 Replies

7. Shell Programming and Scripting

How to search through directories and sub dir

Im working on a project that basically imitates the find and whereis commands. The program will take in a file name or regular expression and, starting with the current directory search downwards and match any files with that pattern and prints the path name. I don't understand how to do this... (5 Replies)
Discussion started by: new2C
5 Replies

8. Shell Programming and Scripting

Script for parsing directories one level and finding directories older than n days

Hello all, Here's the deal...I have one directory with many subdirs and files. What I want to find out is who is keeping old files and directories...say files and dirs that they didn't use since a number of n days, only one level under the initial dir. Output to a file. A script for... (5 Replies)
Discussion started by: ejianu
5 Replies

9. Shell Programming and Scripting

how to search directories

Hello everybody, i'm dummy for unix but i want to learn something. i want to search the working directory and its subdirectories( all ) to find the files which are more than 1024 bytes. So which commands must i learn? Thanks to all. (13 Replies)
Discussion started by: redbeard_06
13 Replies

10. UNIX for Dummies Questions & Answers

Search for files in multiple directories

I want to search for a file pattern in more than one directory. How I need to do that? Here is the scenario: I am having a directory structure like the following: /log ...../20051001 ..........ftp_server_20051001.log ..........ftp_down_server.log ..........ftp_up_server.log... (7 Replies)
Discussion started by: ravikirankethe
7 Replies
Login or Register to Ask a Question