Find the answer to your Linux question:
Results 1 to 3 of 3
HI, I need help on Bash script. I need to create a program which Find duplicate files, rename it, and delete other duplicates by using cmp program. this program takes ...
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    1

    Red face Find duplicate files

    HI, I need help on Bash script.
    I need to create a program which Find duplicate files, rename it,
    and delete other duplicates by using cmp program.
    this program takes one argument which is a directory.
    I have to go through each file in directory
    but i have no idea how to access each file.
    could you guys give me some help? Thanks

  2. #2
    Just Joined!
    Join Date
    Jan 2009
    Location
    Kansas City
    Posts
    3
    Do you have anything so for?

    Is this a specific directory?

    You could try using a loop in your script, then an if then statement that will either rename the file or delete it. This seems common enough though that I bet someone has already written it. Have you tried googling it to see if someone has already written a script to do this?

  3. #3
    Just Joined! sathiya's Avatar
    Join Date
    Feb 2008
    Location
    Bangalore, India
    Posts
    97
    duplicate files in the sense ?

    duplicate files by content or duplicate files by name ???

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...