Find the answer to your Linux question:
Results 1 to 4 of 4
A co-worker (I work in IT at an answering service) decided to play a little prank on me and placed a big file (named BIG_FILE ironically) in my home directory. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Location
    Baton Rouge, LA
    Posts
    37

    [SOLVED] Help Removing a file


    A co-worker (I work in IT at an answering service) decided to play a little prank on me and placed a big file (named BIG_FILE ironically) in my home directory. The file is 1TB in size even though the HDD on the computer is only 200GB. I cannot rm the file as myself or as root. root is not able to do anything to the file such as chown, etc. Any suggestions would be very helpful.

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Welcome to the forums!

    Don't know what's up with it.

    Maybe you can su to root and try deleting it like this:

    Code:
    rm -f /path/to/BIG_FILE
    If that doesn't work, try downloading the PartedMagic LiveCD, boot with it, then navigate to the file and try deleting it that way.

    Let us know how it goes.
    oz

  3. #3
    Linux Newbie
    Join Date
    Jan 2008
    Location
    UK
    Posts
    211
    Hi,
    So are you saying that the file is not as it seems - if it is 1TB it cannot be on the HDD. So is it a corupted file or a link, can you re-name it and then delete it. Or can you unlink to it or even link to it and then delete it? What are the default permissions?

    wowbag1

  4. #4
    Just Joined!
    Join Date
    Oct 2008
    Location
    Baton Rouge, LA
    Posts
    37
    well i figured it out... it was a sparse file which is why it was saying it was larger than the entire hard drive..
    Code:
    dd if=/dev/zero of=BIG_FILE bs=1 count=1 seek=1024G
    that will give you a seemingly 1 terabyte file named BIG_FILE.. and i could not move it, rename it, anything.. thats because it was immutable.. even root can't delete it or anything until the attributes are changed
    Code:
    chattr -i BIG_FILE
    makes it able to be deleted, etc.. quite interesting i think lol
    but from what i understand, the immutable attribute only works on ext2 filesystems

Posting Permissions

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