LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-29-2010, 08:00 AM   #1
ccee
LQ Newbie
 
Registered: Jan 2007
Posts: 10
Blog Entries: 1

Rep: Reputation: 0
copying directories - strange


Hello
I've been trying to backup things to an external ext3 usb disk. In an effort to control the integrity I do a "du -s source_dir destination_dir" and in certain directories the size always comes out different. There always seems to be a difference of 4 bytes. Even if I do an individual md5sum on every file and the directories prove to be identical (at least file wise) the result of the du command seems to suggest otherwise. There are no .hidden files. Does anyone have any idea what this could be?
Thanks Chris
 
Old 01-29-2010, 08:52 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

One possible reason can be a difference in blocksize on the HD and the usb disk.

du shows disk usage as blocksize. I'm not sure what it uses by default (a fix number or the blocksize of the disk, I assume the latter). Try adding a fixed blocksize to the du command you use with the -B <number> option (du -sB 1024 <file/dir>).

Hope this helps.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying files and sub-directories of a directory except the directories named ".abc" sri1025 Linux - General 2 08-24-2010 08:53 AM
Copying Directories using cp -r astrollama Linux - Software 2 10-20-2006 01:15 AM
copying directories johnvillegas Slackware 4 03-11-2006 06:49 AM
Copying directories NetScripter Linux - Newbie 3 05-25-2002 12:48 AM
copying directories jonfa Linux - General 2 11-08-2001 10:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:03 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