1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need some code fore HD loss on centos 6x 7 when deleting files

Discussion in 'General Programming Chat' started by colorfull, Oct 27, 2015.

  1. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    Hello once you delete a file or folder its giga value is not available as a free space on centos 6x or 7 ,the hd that should be released as free space is lost,do you know why?
     
  2. mantic0re

    mantic0re Junior Member

    Joined:
    May 29, 2015
    Messages:
    118
    Likes Received:
    9
    Are those files tied to any running service? IF they are, you may have to restart that service before the space becomes available.
     
  3. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    You mean service restart cpanel

    no they was simply brought by other disk and deleted as a desktop computer,any clues?,ur support is really appreciated
     
  4. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    Why my disc hd shrinks while deleting files on centos?????????????????????
     
  5. kahuna74

    kahuna74 Regular Member

    Joined:
    Aug 19, 2014
    Messages:
    270
    Likes Received:
    102
    Gender:
    Male
    Occupation:
    Software Developer
    Location:
    Grand Rapids, MI
    I think mantic0re was spot on with his answer if I'm understanding you correctly. Unfortunately I don't think we are, there seems to be a language barrier.
     
  6. McPatrick

    McPatrick Regular Member

    Joined:
    Feb 1, 2015
    Messages:
    244
    Likes Received:
    103
    Gender:
    Male
    Occupation:
    Problem-solver
    Location:
    London
    Home Page:
    Run
    Code:
    sudo /usr/sbin/lsof | grep deleted
    from the terminal.
    You will see the files that are queued for deletion but are being hold open by one of the processes. Once the process shuts down, deletion will be completed.
     
  7. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    The racist of lazy language comment never lacks.

    Yes MCPatrick I was reading also about that and it seems its a matter of processes that are still opened and once closed the hd is released ,but is a little bit hazy if it wasnt from a program you used but a simple folder with files inside that you deleted and that afterwards the space was gone to the numb.

    Isnt there a way to close all processes at once without harming any program so all files that are deleted release their space back?

    Thank you for ur code Im testing
     
  8. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    Would this acomplish what I just told you?
    sudo /root/sbin/lsof | grep deleted
     
  9. McPatrick

    McPatrick Regular Member

    Joined:
    Feb 1, 2015
    Messages:
    244
    Likes Received:
    103
    Gender:
    Male
    Occupation:
    Problem-solver
    Location:
    London
    Home Page:
    tbh man, you should go to StackOverflow. Without more details and info on packages you have installed it is a blind game.
    Also better chance to spot a Centos guy, I am Ubuntu folk ;)
     
  10. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    thank you thank you
     
  11. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    What made you decide to use UBUNTU mcpatrick?
     
  12. McPatrick

    McPatrick Regular Member

    Joined:
    Feb 1, 2015
    Messages:
    244
    Likes Received:
    103
    Gender:
    Male
    Occupation:
    Problem-solver
    Location:
    London
    Home Page:
    Well documented, trusted and it seems like majority of big users on DO and Vultr use it - I was on Centos before but I have seen Ubuntu had more docs and it was basically the same - just some commands different and Ubuntu seems to be much more often compatible with scripts and more Python friendly.
    But yeah, its personal choice as I like to work on popular platforms for documentation. Makes life easier.