Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Net::FTP direcory size question

by Marshall (Canon)
on Feb 02, 2017 at 07:50 UTC ( [id://1180827]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Net::FTP direcory size question
in thread Net::FTP direcory size question

The doc's for Net::FTP say that ftp ls and ftp dir are not the same. This is not the normal command line.

From Net::FTP:

  • ls ( DIR )
    Get a directory listing of DIR , or the current directory.
    In an array context, returns a list of lines returned from the server. In a scalar context, returns a reference to a list.
  • dir ( DIR )
    Get a directory listing of DIR , or the current directory in long format.
    In an array context, returns a list of lines returned from the server. In a scalar context, returns a reference to a list.
Also note that du stats are not the same as ls stats. "du" is the size actually used on the disk. That will be at least equal to but, probably greater than the actual size of the file. That is because the file system writes to the disk in a quantum size of bytes, often 4096 bytes. Could be that the last byte of the file takes up one byte of this 4096 bytes. Other minimum "block" sizes to write to the disk are possible and there are a variety of names for what the file system calls this "minimum file system block size" on the disk.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1180827]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-04-18 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found