Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18
i am wondering if there is a useful tool (note useful... not just existing) for hard disk cleanup... it seems that i have a ludicrous amount of unneeded files... (from ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Oct 2005
    Location
    Twin Cities, MN
    Posts
    136

    cleanup


    i am wondering if there is a useful tool (note useful... not just existing) for hard disk cleanup... it seems that i have a ludicrous amount of unneeded files... (from everything i have been doing and not paying much attention too...)

    thanks
    Old Skewl - AMD Athlon XP 1600+ / 512mb / 160gb / nVidia GeForce 4 4800ti 128mb / openSUSE 10.0 / 2.6.13-15 / (puter geek . linux noob)

  2. #2
    Linux Newbie
    Join Date
    Oct 2005
    Location
    Twin Cities, MN
    Posts
    136
    oh please answer my question!!
    Old Skewl - AMD Athlon XP 1600+ / 512mb / 160gb / nVidia GeForce 4 4800ti 128mb / openSUSE 10.0 / 2.6.13-15 / (puter geek . linux noob)

  3. #3
    Linux Newbie
    Join Date
    Mar 2003
    Location
    Istanbul/Türkiye
    Posts
    246
    For my personal opinion, there is not so effecient tool as you mentioned. Find every unnecessary file in your disk and clean them, huh.
    Just a Newbie....Looking 4 Info....

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Oct 2005
    Location
    Twin Cities, MN
    Posts
    136
    ahh linux ... why use a program when you can do it yourself god help me if i delete the wrong thing!!!
    Old Skewl - AMD Athlon XP 1600+ / 512mb / 160gb / nVidia GeForce 4 4800ti 128mb / openSUSE 10.0 / 2.6.13-15 / (puter geek . linux noob)

  6. #5
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    Odessa, FL
    Posts
    586
    well, what do you want to delete? temp files, browser cache,....?

    you can probably write a program for your specific machine that deletes everything. afaik, you'll just place all your commands to delete these files (as if it was in a terminal) into a text document and make it executable. that would make it a script that you can run and it should, if written correctly, do what you want

    the reason i said "your specific machine" is because, if a program like this was written, it would have to be tailored to a certain distro...since not all distros have the files in the same locations

  7. #6
    Linux Newbie
    Join Date
    Oct 2005
    Location
    Twin Cities, MN
    Posts
    136
    i could do that ... but i would prolly screw it up pretty bad!!! lol

    anyone know what this is?

    Code:
    fyrephlie@linux:/955904818a1166150c1948018a28> dir
    total 4
    -rwxr-xr-x  1 root root 788 2005-10-24 19:38 $shtdwn$.req
    fyrephlie@linux:/955904818a1166150c1948018a28>
    it appeared in / about a week ago (24 Oct according to this) and i am not sure what it is ...

    the flie is binary
    Old Skewl - AMD Athlon XP 1600+ / 512mb / 160gb / nVidia GeForce 4 4800ti 128mb / openSUSE 10.0 / 2.6.13-15 / (puter geek . linux noob)

  8. #7
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    The Hot Humid South
    Posts
    602
    1. Make a copy of it;
    2. Delete it;
    3. If nothing happens, you're good.

    Easy!

  9. #8
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    Odessa, FL
    Posts
    586
    well, i found out how to delete everything within a directory: "rm -r /path/to/files/*"

    anything within the folder "files" in this case will be deleted. i have a question now....is it safe to delete everything within the tmp folder?

    this sounds like an interesting idea and i'm writing a program up right now....i plan on only deleting things out of the tmp folder and the browser cache. would it be safe to do?



    EDIT: i deleted everything within my tmp folder using that command and restarted without any ill effects. only big change is that i saved 2.6GB by doing so

  10. #9
    Linux Newbie
    Join Date
    Mar 2003
    Location
    Istanbul/Türkiye
    Posts
    246
    Its name is tmp
    Just a Newbie....Looking 4 Info....

  11. #10
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    Odessa, FL
    Posts
    586
    Quote Originally Posted by heartsmagic
    Its name is tmp
    oh well...that makes it simple

    for anyone who's interested, this is the program that i wrote up (to delete tmp files):
    Code:
    rm -r /tmp/*
    rm -r /usr/tmp/*
    this will work in Gentoo, but i'm not sure where the tmp folders are in other distros (might still be in the same area??)

    to make this an executable script:
    su into root
    Code:
    su
    (enter root password)
    use your favorite text editor...i use nano (i also placed this in /sbin/ so that i can just run it without typing the path...and i named it "cleanup"):
    Code:
    nano -w /sbin/cleanup
    copy the code above into the text editor and save:
    Code:
    rm -r /tmp/*
    rm -r /usr/tmp/*
    to save in nano....CTRL+X, then Y, and ENTER

    to make it executable:
    Code:
    chmod a=r+w+x /sbin/cleanup


    now you should be able to delete your temporary files by simply typing "cleanup" in a command line as root. this also assumes that you used the correct directories (as written, i know it'll work with Gentoo). you can place the script anywhere you want (such as your /home/user directory) instead if you feel more comfortable with that. if it was in this directory you would type "/home/user/cleanup" to run it.

    hope this helps

Page 1 of 2 1 2 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
  •