Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 10 of 10

This is a discussion on Directory compare with Leech FTP in the Open Discussion & Chit-chat forum
Hi- When I ran a directory comparison with my Leech FTP, I found that some of my file sizes are different locally vs remotely. The ...

  1. #1
    JPC Member
    Join Date
    Jan 2002
    Posts
    22

    Directory compare with Leech FTP

    Hi-
    When I ran a directory comparison with my Leech FTP, I found that some of my file sizes are different locally vs remotely. The same HTML file which appears as 6,200 bytes locally can show up as 5,900 bytes remotely-this is only happening to txt based files - ie image files not affected. This makes it hard to auto detect differences in files.

    Has anyone experienced this and would you have any tips to remedy?

    THanks!

  2. #2
    JPC Member
    Join Date
    Sep 2002
    Posts
    29
    Could this have something to do with the difference in CR/LF on Windows and LF on Unix? This is the reason we use ASCII to upload.

  3. #3
    JPC Member
    Join Date
    Jan 2002
    Posts
    22
    Ummmm I dunno. What is CR/LF? I use auto select of binary vs ASCII when FTPing. I know that sometimes when I get a file from the server it has extra line breaks everywhere that I search and replace (search for 2 breaks and replace with 1)

  4. #4
    JPC Member
    Join Date
    Sep 2002
    Posts
    29
    Windows treats linebreaks different to Linux. This is why you need to upload files in ASCII format - this translates the codes to avoid errors (such as those reported in Perl when uploading in the wrong format).

  5. #5
    Old Hillbilly Connie's Avatar
    Join Date
    Sep 2001
    Location
    Hills of Missouri
    Posts
    2,646
    This is something I have always wandered about. New Pages I upload almost always have a bigger file size, than what they end
    up being on the server. This includes graphics. Even when I
    make changes to a page, which should make the file size
    smaller, it normally shows up as a larger file size, than what
    is on the server when I upload the new page.

    Personally, I don't think this is a problem. I would like to know the Technical reason, from some one who actually knows the reason, but in the meantime, I'm not going to worry about it.

    Forum Moderators - Jag Staff

    Spam Whackers Blog - Dedicated to fighting Spam and providing General SEO Tips
    Organize your Kitchen or purchase Kitchen Accessories at Condells
    Ihelpyou Forum - Dedicated to "Best Practices" SEO

  6. #6
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    I believe it is the line break issue. On Windows/DOS files there are two invisible characters at the end of each line that tell the OS that it is the end of the line (CR/LF-cariage return/line feed). On Unix systems there is only one character (just the LF). So, basically, you'll reduce the file syste by 1 byte per line.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  7. #7
    JPC Member
    Join Date
    Sep 2002
    Posts
    29
    Hi Jason,

    This is the case for ASCII files and the difference in file sizes in Windows and Linux based machines.

    I wonder why there is a difference in binary files on both platforms.

    Cheers,

    Gary

  8. #8
    JPC Member
    Join Date
    Jan 2002
    Posts
    22
    Can anyone then reccomend a Directory Compare tool that can recognize which files are indeed different since they can all potentially have different file sizes (and dates based on time stamp of server)?

    Thanks

  9. #9
    JPC Member
    Join Date
    Jan 2002
    Posts
    22
    I heard of rsynch that is a unix command that works real well. Does anyone know if we can run this command on Jaguar and if there is any good documentation for a non technical person?
    thx

  10. #10
    Programmer... And more... megmond's Avatar
    Join Date
    Aug 2002
    Location
    Netherlands
    Posts
    365
    Binary files are the same in unix and dos (windows), since the server does not know what's inside, so it can't (shouldn't) mess with it.

    So if the file differences affect binary files (as clssam seems to indicate?), then your FTP program is most likely transferring the binary files *as if* they were ascii. This is bad and generally results in files that are not useable (i.e. pictures that don't show up).

    Most FTP programs are set to autodetect whether a file is binary or ascii. They often use the file extensions to determine this (e.g. txt, htm, html, log, asc is ascii, all others are binary), or some may check the contents of the file and see if there are any non-ascii characters in it.

    A directory compare tool that works as you would like, would have to download all files from the server, as you can't tell if the files are similar or different by looking at date, time and/or filesize. I'm sure some tools exist to do this (I built my own for my website).

    In a command prompt in windows you should be able to use the FC command (usually with the /b option is best) to compare two files. Potentially you can use that, but if you do a websearch there are some good utilities out there.
    Curious? Check out my main activities at http://www.elmerproductions.com/igor

Bookmarks

Posting Permissions

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