LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-04-2010, 02:38 PM   #1
notsamot57
LQ Newbie
 
Registered: Feb 2010
Distribution: ubuntu
Posts: 2

Rep: Reputation: 0
Smile Folder name comparison utility


Does anyone know a good program to use for comparing folder names from 2 different directories?

The reason being that at work we have a shared area with 2 folders one named REC (records) the other named WIP (work in progress) within these 2 folders there are 100s of subfolders. The folder names in wip and rec both need to mirror each other but the files are different within the folders. The problem we're having at the moment is people are creating new folders with out letting me know which means the folder names are no longer mirroring each other.

I need to know if there is a utilty available to compare just folder names so that we can get a list of folders which have been created without our knowledge and we can ask the originators to remove them.

any help would be most appreciated
 
Old 02-04-2010, 03:10 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
diff?

ls /REC > txt1
ls /WIP > txt2

diff txt1 txt2
 
Old 02-04-2010, 03:10 PM   #3
slacker_et
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 138

Rep: Reputation: 27
I'd investigate writing a script using the find command and it's '-type d' argument.

Example:
Code:
find /some_directory -type d -print
--ET
 
Old 02-04-2010, 03:31 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Combining the techniques in the previous two posts
Code:
cd <REC and WIP parent directory>
find REC -type d > REC.dirlist
find WIP -type d > WIP.dirlist
diff REC.dirlist WIP.dirlist
 
Old 02-04-2010, 03:46 PM   #5
notsamot57
LQ Newbie
 
Registered: Feb 2010
Distribution: ubuntu
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the relies this going to be really useful
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparison to "Program Files" Folder in Linux? Ascendancy5 Linux - Newbie 11 01-15-2009 06:45 AM
Utility Needed - list folder tree and files in text file Optiker Linux - Software 21 11-17-2006 02:46 PM
Directory/folder mirroring utility? paulsh2k4 Linux - Software 2 09-14-2004 02:44 PM
utility - folder machiner Linux - General 11 08-20-2004 09:27 AM
Good File Comparison Utility Witch-King Linux - Software 4 01-01-2003 10:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration