Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The total storage on the system in question is 687GB. It's an ext3 filesystem. When I do an "ll", it shows many files as having a size around 481 GB, which is impossible. But when I do a "du", it shows that those files really only use 4K of disk space.
Can anyone tell me what's going on? The console output is below...
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Originally Posted by trewsfan
The total storage on the system in question is 687GB. It's an ext3 filesystem. When I do an "ll", it shows many files as having a size around 481 GB, which is impossible.
It is actually perfectly possible to create such files on filesystems supporting "sparse files", for which only blocks containing actual data are allocated.
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
Yes, but knowing it is a Borland C++Builder project copied from Windows or on Windows partition (did I guess?) or something similar, I suppose it's not good that there are sparse files..
-rwxrwxrwx 1 usersdata users 2964 Jun 23 12:51 Bungalow.~cp
-rwxrwxrwx 1 usersdata users 481042825342 Jun 23 12:51 Card.~cp
-rwxrwxrwx 1 usersdata users 481043677283 Jun 23 12:51 Card.cpp
-rwxrwxrwx 1 usersdata users 438093217918 Jun 23 12:51 Card.dfm
-rwxrwxrwx 1 usersdata users 468158120036 Jun 23 12:51 Global.h
-rwxrwxrwx 1 usersdata users 481042825342 Jun 23 12:51 Search.h
-rwxrwxrwx 1 usersdata users 455272956015 Jun 23 12:51 Yard.~df
You could delete the files with extensions starting with the tilde character. For "Card.cpp", "Global.h" and "Search.h", see if you can load them in an editor and resave them, since they are text files. I don't know if Card.dfm is a normal text file or a binary file. Maybe you could use cat to copy them to a backup before deleting the original. Of course run fsck to check the partition as well. I noticed that the timestamps are identical, so it looks like they were copied from another location, rather than produced during a build process.
You guys were right... they were copied from a Windows machine that allowed sparse files. I deleted the ~ files and used vi to open then save the others, which fixed this issue. Thanks.
PS: I'm still going to run fsck once I make a Live CD.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.