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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I've been using my Ubuntu Linux (11.4?) computer to recover files from a hard drive. At this point, I've recovered so many files that I have no available space on the hard drive, and Ubuntu won't boot normally. I can boot in recovery mode, so I'm deleting files from the root terminal, using the rm -r command. I then type df to see how much space I've freed, and I notice that the Used blocks number goes down, but the Available blocks number is still zero. How do I make these blocks available?
I'm typing this on another computer, so I can only summarize the results. I'll start with the df command. For filesystem /dev/sda1, I have 19150120 blocks, 18229792 used and 0 available. 100% use, mounted on /
There are four other filesystems named "none". These filesystems all have less than 1000 blocks used and about 250000 available. (Note, I have a thumbdrive and a camera plugged into USB ports. I also have the drive I am trying to recover files from. I probably should have removed them.)
The results of the du command mostly scrolled off the screen. One of the lines that didn't scroll off shows a directory containing recovered files:
I deleted recup_dir.1 through recup_dir.161 using commands such as rm -r recup_dir.1? .
Here are some more lines:
One of the options from the recovery menu is to run fsck. Should I give that a try?
re: "There are four other filesystems named "none". These filesystems all have less than 1000 blocks used and about 250000 available." -- these are usually RAM disks for (mostly) system cache type use. (compare to RAM size in your machine and swap file size)
re: "The results of the du command mostly scrolled off the screen." -- either output to a file (e.g. du * > du-results) or simplify output (e.g. du -shc *)
on the df results, if you reserve 5% from 19,150,120, you get 18,192,614 which is still a bit below the 18,229,792 you have in use. That is why the 0 bytes available as you are into the 'reserve only' space on the file system. (see the note about tune2fs to manage this)
There shouldn't be any problem running fsck but I don't think it is really needed. If it's an ext4 drive, at least it shouldn't take any time.
When you get that 18,229,792 you have in use down below 18,192,614, you should start to see some free space available.
I also wouldn't worry too much about the camera or thumbdrive except that it means a bit more care to make sure you know which device you are looking at and doing things to.
Thank you very much, bryanl and 16pide. I deleted another 40 recup_dir directories and available blocks are showing up. I guess I'll just delete the rest of them and try to come up with another scheme for recovering files. I'll also take a look at tune2fs. It seems like I asked this same basic question a few years ago and got the same answer. I searched for similar posts, too. Oh well!