LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
LinkBack Search this Thread
Old 07-06-2005, 12:17 PM   #1
jdupre
Member
 
Registered: Sep 2003
Distribution: LFS6.1, FC3, RH9
Posts: 32

Rep: Reputation: 15
How to compare directories (inc. attributes)?


Is there a linux command to compare directories, including attributes like ownership, permissions, and links? The 'diff -r' command appears to only compare filename and contents, while following links and ignoring comparison of file dates, permissions and ownership.

Thanks,

- J
 
Old 07-06-2005, 11:36 PM   #2
Dommy
Member
 
Registered: Jul 2004
Location: Canberra
Distribution: Mint 7
Posts: 204

Rep: Reputation: 30
Simple, ls -LR <dir1> > dir1list
ls -LR <dir2> > dir2list
then diff dir1list dir2list | more


I think there is a GUI based diff program but I could be wrong
 
Old 07-07-2005, 12:39 AM   #3
camlinux
Member
 
Registered: Feb 2003
Location: north dakota
Distribution: Gentoo, Debian
Posts: 90

Rep: Reputation: 15
Couldn't you use pipes instead of creating files? More of a curiosity on my part than anything.
 
Old 07-07-2005, 01:16 AM   #4
Dommy
Member
 
Registered: Jul 2004
Location: Canberra
Distribution: Mint 7
Posts: 204

Rep: Reputation: 30
There are 2 seperate pipe streams involved which would then have to be supplied to diff , while you could have one diff go out STDOUT and the other STDERR , I don't believe diff could input from two pipes at once. You could try it and prove me wrong
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kdesktop attributes rogere Linux - Software 0 12-15-2004 08:10 PM
thread attributes iftiuk Programming 2 07-29-2004 01:41 PM
How do I compare md5sums of directories (and of course everything in it)? natalinasmpf General 1 12-08-2003 07:03 PM
Name the attributes alaios General 5 10-29-2003 06:50 PM
file attributes binky22 Linux - Newbie 2 09-26-2003 04:17 PM


All times are GMT -5. The time now is 05:36 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration