Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Deleted file while still opened

  1. #1

    Default Deleted file while still opened

    I had a comic packed in rar format and opened it with comix.

    For some reason I decided I no longer needed it and deleted the file permanently, along with comix directories inside .config and .local/share. But I late realized that I had never closed comix program!!

    Not again, another **** mistake!? Though I noticed the only file reapearing was oen named recently-used.xbel inside .local/share...

    Any harm to comix program or OS itself?

  2. #2
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Deleted file while still opened

    Quote Originally Posted by F_style View Post
    I had a comic packed in rar format and opened it with comix.

    For some reason I decided I no longer needed it and deleted the file permanently, along with comix directories inside .config and .local/share. But I late realized that I had never closed comix program!!

    Not again, another **** mistake!? Though I noticed the only file reapearing was oen named recently-used.xbel inside .local/share...

    Any harm to comix program or OS itself?
    nope nothing I can think off

  3. #3

    Default Re: Deleted file while still opened

    Thanks.

    But just in case, any other more elaborate point of view by chance? Thanks.
    I already rebooted Leap several times, fearing I'd have to reinstall...

  4. #4

    Default Re: Deleted file while still opened

    On 11/10/2017 11:36 AM, F style wrote:
    >
    > Thanks.
    >
    > But just in case, any other more elaborate point of view by chance?
    > Thanks.
    > I already rebooted Leap several times, fearing I'd have to reinstall...
    >
    >


    The only thing you have to fear is yourself for being overly paranoid.
    In other words nothing is broken.

    --
    Ken
    linux since 1984
    S.u.S.E./openSUSE since 1996

  5. #5

    Default Re: Deleted file while still opened

    What if there's some certain "dead" amount of used storage still remaining that cannot be purged, or the like, as a consequence?
    Or some invalid soft/hard link somewhere?

    Or there's nothing like that?

    I have been using openSUSE for some few years already, but I'm still a complete noob

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,667
    Blog Entries
    1

    Default Re: Deleted file while still opened

    This is what I've personally found over the years...

    If you do a file operation in a console using command line, there is an extremely high certainty that there are no orphaned files or pointers.
    When you do some operation at a higher level like what you seem to have done, yes you can have orphaned files and pointers.

    Generally speaking, the best you can do is to research the file integrity checks specific to the file system installed (BTRFS? EXT4? XFS?) and run whatever scans and possible repairs might be possible. You can also try running forensic apps like photorec, but I wouldn't generally recommend that... File operations on inodes with weird names have a much higher chance of an irrecoverable error.

    IMO,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7

    Default Re: Deleted file while still opened

    Wait, what the heck?

  8. #8
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Deleted file while still opened

    Quote Originally Posted by F_style View Post
    Wait, what the heck?
    the answer to your question about deleting comix config files while comix is still opened is no nothing bad can happen to your OS or comix
    worst case scenario as comix is still open it will recreate it's config files when it's closed so the file you deleted will be restored
    I don't get the rest of your questions there are very few if any hard links used in config files in your home ~
    if you'd like to cleanup your profile folder a safe-ish way to do so is with BleachBit afaik it does not clean comix settings but it will clean your browser cache and history as well as desktop history it usually recovers a giga byte of data when I run it (that recovered space gets refilled as most of it is browser cache)
    Code:
    zypper in bleachbit
    https://software.opensuse.org/package/bleachbit
    maybe be more precise about what you want to know

  9. #9
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,046
    Blog Entries
    3

    Default Re: Deleted file while still opened

    Quote Originally Posted by F_style View Post
    I had a comic packed in rar format and opened it with comix.

    For some reason I decided I no longer needed it and deleted the file permanently, along with comix directories inside .config and .local/share. But I late realized that I had never closed comix program!!
    That's completely harmless.

    Some programs deliberately do that. They create a temporary file, and then delete while keeping the file open.

    You need to remember that, in unix (and linux), deleting a file only deletes the directory entry. It does not delete the disk space allocated to the file.

    A file is identified by an inode (meta-data on disk). The directory entry gives the inode for the file.

    Deleting a file deletes the directory entry.

    The kernel frees the disk space, when there is no longer an accessible inode referencing it. An inode is accessible if it is in a directory entry or if is in the kernel list of active inodes.

    The effect: You delete a file that is still open. The file cannot be accessed via the directory. A program that has the file open can still read and/or write to it (depending on open mode). Once the program terminates, the disk space is freed and the inode is zeroed. If more than one program had the file open, then it is when the last such program terminates of closes that open file, that the disk space if freed and the inode is cleared.

    (more than you ever wanted to know about unix file handling).
    openSUSE Leap 15.1; KDE Plasma 5;

  10. #10
    Join Date
    Jun 2015
    Location
    Toulouse
    Posts
    129

    Default Re: Deleted file while still opened

    Le 13/11/2017 à 03:46, nrickert a écrit :

    > than one program had the file open, then it is when the last such
    > program terminates of closes that open file, that the disk space if
    > freed and the inode is cleared.


    and it's a trap :-(

    say you open an openSUSE dvd iso in a virtual machine, then forget it

    you may "remove" the disk, still not freeing any space because the dvd
    is still opened

    I once spent most of a day trying to free space :-(

    jdd.


Page 1 of 2 12 LastLast

Posting Permissions

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