Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ok, I'm hoping somebody can help me out with this. Its kind of a strange issue:
My server started acting flaky this weekend and my Webmin interface was throwing strange errors. I finally tracked it down to the fact that I was out of inodes on my primary partition. I'm fairly certain that the /tmp folder has an outrageous number of files in it. I can't do an ls on the directory because the console just sits there forever after I issue the command. I also tried to do an rm -rf on the /tmp directory and it did the same thing. Any suggestions on how I can clear out this directory?
Also, if your using ext3 then the file system has problems over 32,000 files.
Therefore you might have to delete in small sections
e.g rm /tmp/a*
rm /tmp/b*
etc
df -i shows u your inode usage, the only way to increase inodes is to re-create a file system
mkfs -N is what you need or also look at -T option.
I booted from the install disc with the rescue option but I'm still having trouble. I tried deleting with rm -r [a-m]* while in the tmp directory that it mounted from my filesystem but after accessing the hard drive for about a half hour it didn't find any files to delete. I can't do an rm -r * on the directory because it gives me an error about having too many arguments (which I believe means there are too many files for it to delete). How else can I break up this delete process so there aren't too many files at a time? Keep in mind that I can't do an ls so I don't know the names or dates on the files.
Ok so the problem is file system limits booting to a rescue disk is not going to help you here.
Even rm -r [a-m]* might be too large a number, try rm -r a* (you could of course script this to do each letter)
Usually when the request matches too many files it gives me the "too many arguments" error but when I tried rm -r [a-m]* it gave me a "no such file or directory error" leading me to believe that there aren't any files in that directory that start with a through m. I'm going to take chrism01's advice and see if it matches any numbers.
Your expansion syntax is wrong; the first and last letters are separated by two dots, not a hyphen. You might try curly brackets instead, eg rm -r {a..m}*
Your expansion syntax is wrong; the first and last letters are separated by two dots, not a hyphen. You might try curly brackets instead, eg rm -r {a..m}*
That was worth a try; this is what I got though:
Code:
rm: cannot remove `/tmp/a*': No such file or directory
rm: cannot remove `/tmp/b*': No such file or directory
rm: cannot remove `/tmp/c*': No such file or directory
rm: cannot remove `/tmp/d*': No such file or directory
rm: cannot remove `/tmp/e*': No such file or directory
rm: cannot remove `/tmp/f*': No such file or directory
rm: cannot remove `/tmp/g*': No such file or directory
rm: cannot remove `/tmp/h*': No such file or directory
rm: cannot remove `/tmp/i*': No such file or directory
rm: cannot remove `/tmp/j*': No such file or directory
rm: cannot remove `/tmp/k*': No such file or directory
rm: cannot remove `/tmp/l*': No such file or directory
rm: cannot remove `/tmp/m*': No such file or directory
I proceeded through all numbers and letters and got the same results! How is this possible? I know there's something in the directory because it's using 78M.
Did you check UPPERCASE as well; *nix is case sensitive.
Also, it could be that the partition that /tmp is on is full; might not be that dir specifically.
OK, I let an ls run all night and all day while I was at work and finally got a directory listing. It turns out that I had thousands of CURLCOOKIE files in /tmp and those used up all my inodes. These must have been generated by my webcrawler script that was using CURL and would generate a cookie file for each site it connected to. I've been systematically deleting them using "rm CURLCOOKIE{a..e}*". Looks good so far. Thanks for your help!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.