Hi
Vincent Bernat [bernat@xxxxxxx] wrote:
> Hi !
>
> [I have already posted this message this week-end, however, it seems
> that it has been lost]
>
> I compiled dosemu a few days ago and I have experienced some lockups
> on the creation of some files. I don't know if these lockups are due
> to XFS. But finaly, dosemu works fine.
>
> However, I have a file that I cannot delete, list or do anything on
> it.
>
> sh-2.03$ ls -l emufs.s.out
> ls: emufs.s.out: Value too large for defined data type
> sh-2.03$ du emufs.s.out
> du: emufs.s.out: Value too large for defined data type
> sh-2.03$ rm emufs.s.out
> rm: cannot remove `emufs.s.out': Value too large for defined data type
>
> I have an "old" glibc (2.1) which doesn't support large file. Is there
> a way (via a C program ?) to delete this file ? I think it is a sparse
> file (I have no room for a more than 2 GB file).
First you should check the filesystem (xfs_check or xfs_repair -n). Maybe
the lockups produced some filesystem corruption.
The trick is to truncate the file below 2GB. Then your rm should work.
Try ">emufs.s.out" on a shell. If this works, you have a 0 byte emufs.s.out.
If this doesnt work, you could try the attached c program. It truncates a file
to a given number of bytes:
trunc 0 emufs.s.out
Hope that helps.
utz
trunc.c
Description: Text document
|