- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- differences using ls on like systems
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 11:00 AM
09-12-2003 11:00 AM
For example:
system 1
==================
drwxr-xr-x 2 hrprd psoft 2048 Sep 10 19:32 .
drwxr-xr-x 2 hrprd psoft 3072 Sep 10 19:32 .
Its not in every directory that its like this but a few.
Anyone know why?
Todd
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 11:04 AM
09-12-2003 11:04 AM
Re: differences using ls on like systems
I know this certainly used to be the case as I remember in the old days you had to make your own lost+found directories which had to be big enough to hold the entries they might need in the future. In order to do this you'd create a load of files in the directory and then remove them all again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 11:05 AM
09-12-2003 11:05 AM
Re: differences using ls on like systems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 11:06 AM
09-12-2003 11:06 AM
SolutionYou could potentially have an empty directory but the directory itself (.) could be 128000 if it had LOTS of files sometime in the past.
I would worry too much about the directory size itself not being the same as long as all the files in the directory are what you expect them to be.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 11:10 AM
09-12-2003 11:10 AM
Re: differences using ls on like systems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 11:20 AM
09-12-2003 11:20 AM
Re: differences using ls on like systems
I think Mark, Clay, and Patrick have it right. There were other files in these directories that might have made them grow and now Im doing a rsync and deleting the files off the destination server to sync up with the source server. I just thought an easy way of verifying directory size was with "du -sk". Obviously I cant trust that any more. :) Would there be something else I could use to make sure everything was syncing up as normal?
Todd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 11:29 AM
09-12-2003 11:29 AM
Re: differences using ls on like systems
and then do the same of the destination directory and create a destlist. You could then diff those files. Cksum does a CRC checksum for all the data in a file so it can take a while. After a few times with this, I think you will come to conclusion the rdist works quite well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 11:31 AM
09-12-2003 11:31 AM
Re: differences using ls on like systems
If you were able to start off by making an copy of the directpry system using "tar" or something then they would be the same. I don't know, however, if rsync would be able to handle synchronizing the two afterwards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 12:15 PM
09-12-2003 12:15 PM
Re: differences using ls on like systems
When you create a new directory, it has very few slots to hold names so it must be expanded to hold new names. If a directory is filled with hundreds or thousands of names, then most of the names are removed, the directory will be shown as having a large size (with ls -ld) but only a few files--the directory does not return the empty name slots. Thus, a copy of a directory will be significantly smaller because the unneeded slots are not created. But the copy is just fine even though the occupied amount of space is smaller.
On the other hand, copying files may result in a larger copy. This is due to sparse files. All Unix system can be directed to create a sparse file by writing an inital record, then, using lseek(2), writing record number 1 million. The files contains 2 records with a million imaginary spaces in between so the file is small on the disk.
But copy this file serially (it was never created serially) and all the missing (undefined) records are supplied as a stream of zeros, thus the copy is significantly larger. The most common sparse file is a core dump which can have empty spaces where gaps in the memory allocation exist. Now the file is identical to any program that reads the data whether it is the original or larger copy--they produce the same exact records when read by an application.
Note also that cksum is a good way to verify files and will produce the same result for sparse files and their copies.
Bill Hassell, sysadmin