LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Disk space Queries (https://www.linuxquestions.org/questions/linux-newbie-8/disk-space-queries-617528/)

ashdharan 01-30-2008 08:48 PM

Disk space Queries
 
Hello...

My GUI display on Fedora 8 is down and am currently working on the virtual console.( Haven't received an answer, please look into the thread XServer Crash on Fedora 8 in Desktop section)

I wish to know:-
1) What is the command to find out disk usage by a particular file/directory?

2) How do I expand my / space? (I have 5 GB of unallocated space ready to be allotted, but the question is how do I do it from CLI)

3) How are quotas for users set?

waelaltaqi 01-30-2008 09:48 PM

i will try to answer couple of your questions however some other questions are big subjects and you need to do some extensive reading and others will help after words.

- to find the total usage of your drive:
Code:

df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              36G  24G  9.5G  72% /
varrun                378M  248K  378M  1% /var/run
varlock              378M    0  378M  0% /var/lock
udev                  378M  80K  378M  1% /dev
devshm                378M    0  378M  0% /dev/shm
lrm                  378M  34M  344M  9% /lib/modules/2.6.22-14-generic/volatile

to find the total usage of a certain directory or a file:

Code:

altaqi@altaqi-laptop:~$ du -ch /home/altaqi/Videos/
65M    /home/altaqi/Videos/
65M    total

there are other methods to achieve the same output also.
as far as expanding a disk space, i refuse to tell you one way expanding your disk space until you tell us with good examples what you are trying to achieve. Take a look at this link ... this might help
http://www.linuxhomenetworking.com/w..._Disk_Capacity

don't attempt to modify/expand your partition table without understanding what you're doing. Find a way to backup your data before you start. If needed pull the drive out and stick it into another machine and back it then try to expand it.

ashdharan 01-30-2008 11:09 PM

Re:
 
First of all, thanks a lot for replying.

The idea is not to add a new hard disk, but to claim a 5GB partition from the existing hard drive and increase space for my fedora OS. I use a dual boot(the other one being WindowsXP).

I created the 5GB partition(unallocated) from Windows(XServer in Fedora is down).

I remember once I tried tinkering around with the fdisk utility, I met with failure with all contents being wept out.;)

The article you posted indeed is informative for adding new hard drives.

I shall reframe the question again:

How to allot a 5GB partition(from the existing hard drive, already unallocated space) and increase space for my fedora OS by adding it to /?

Fred Caro 01-30-2008 11:30 PM

Quote:

Originally Posted by ashdharan (Post 3040654)
First of all, thanks a lot for replying.

The idea is not to add a new hard disk, but to claim a 5GB partition from the existing hard drive and increase space for my fedora OS. I use a dual boot(the other one being WindowsXP).

I created the 5GB partition(unallocated) from Windows(XServer in Fedora is down).

I remember once I tried tinkering around with the fdisk utility, I met with failure with all contents being wept out.;)

The article you posted indeed is informative for adding new hard drives.

I shall reframe the question again:

How to allot a 5GB partition(from the existing hard drive, already unallocated space) and increase space for my fedora OS by adding it to /?


Perhaps usinng Gparting or partition magic to make that blanck space and then expand your fedora space, just remmmember which denotation refers to which.

waelaltaqi 01-30-2008 11:43 PM

how about you use http://gparted.sourceforge.net/
look for liveCD and burn the ISO into a CD and boot from it then figure your way out. it should be pretty easy to manage. See the screenshots and read the documentation.
Gparted is the easiest way of doing it but there are other ways too.

Note that expanding a partition is not always safe because through the process, the file system of the linux partition is being altered so if something went wrong (say power outage or a memory clitch) you will end up with a corrupt file system and suffer from mostly unrecoverable loose. bottom line backup your sh***t before you do it.

delta48 01-31-2008 12:25 AM

system rescue cd
 
You can use system rescue cd it comes with gnu parted.


All times are GMT -5. The time now is 01:55 PM.