LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 08-03-2005, 03:38 AM   #1
fisayo
Member
 
Registered: Apr 2005
Distribution: Suse 9.3 | Mandrake 10.0 - 10.1
Posts: 39

Rep: Reputation: 15
how to change df (diskfree) output


Hi! I need help on how to change the output of df on my MDK10 machine. It's something like this:
Filesystem Size Used Avail Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part5
1.8G 1.4G 338M 81% /
/dev/ide/host0/bus1/target0/lun0/part1
201M 161M 40M 81% /mnt/win_c

I will prefer it to be something like this:
Filesystem Size Used Avail Use% Mounted on
/dev/hda6 8.7G 5.7G 3.0G 66% /
/dev/hda1 9.8G 8.0G 1.9G 82% /mnt/windows
/dev/hdc1 19G 14G 5.6G 70% /mnt/hdc1
/dev/sda1 246M 244M 1.3M 100% /mnt/removable

In other words, I would like to have understandable device names.
Thanks
 
Old 08-03-2005, 04:58 AM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
what command are you currently using?

i usually use df -h. i presume you want to suppress the file system field. i dont understand why it's not spaced out. are you using a small terminal window??

Last edited by satinet; 08-03-2005 at 05:01 AM.
 
Old 08-03-2005, 08:10 AM   #3
fisayo
Member
 
Registered: Apr 2005
Distribution: Suse 9.3 | Mandrake 10.0 - 10.1
Posts: 39

Original Poster
Rep: Reputation: 15
It shows normally on my terminal. What I'm bothered about actually is the device name as in the:
/dev/ide/host0/bus0/target0/lun0/part5
when it can show
/dev/hda5

I have a script that utilizes the naming convention of latter statement that why I'm so bothered. Thanks for your concern.

Still searching for answers...
 
Old 08-04-2005, 09:19 PM   #4
AngryLlama
Member
 
Registered: Sep 2004
Location: /dev/urandom
Distribution: Gentoo
Posts: 171

Rep: Reputation: 31
Looks like it could be a devfs issue... I'm not sure why. I know devfs resolves the "only hda-hdz and sda-sdz are supported" problem by creating that huge path as seen in your df output.

Are you (or is the computer in question) using devfs? I use udev, so that may be why I don't suffer from this issue. Why must your script use the /dev/hd_ notation; it should be able to handle the new naming scheme too.. they stand for the same thing.

Last edited by AngryLlama; 08-04-2005 at 09:22 PM.
 
Old 08-08-2005, 08:40 AM   #5
fisayo
Member
 
Registered: Apr 2005
Distribution: Suse 9.3 | Mandrake 10.0 - 10.1
Posts: 39

Original Poster
Rep: Reputation: 15
I really don't know how to tweak the script to use the other naming convention. By the way, I use MDK 10.0. I sincerely don't think that it uses UDEV (starts with 10.1). I guess I'm still on my own.
 
Old 08-09-2005, 03:59 PM   #6
mhearne
Member
 
Registered: Nov 2004
Location: Amarillo, TX
Distribution: Mandriva
Posts: 91

Rep: Reputation: 15
I'm using udevd and my output is nice and readable:

$ df
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 31G 8.0G 21G 29% /
/dev/hda2 27G 1.4G 25G 6% /home
/dev/hda3 17G 1.9G 14G 13% /var
/dev/hdc2 19G 12G 6.1G 65% /var/backup
/dev/hdc1 19G 11G 7.1G 60% /var/ftp

It may be as simple as going to mcc > system > services and turning devfs off and udev on (if it is installed).

Michael
 
Old 08-18-2005, 07:15 AM   #7
fisayo
Member
 
Registered: Apr 2005
Distribution: Suse 9.3 | Mandrake 10.0 - 10.1
Posts: 39

Original Poster
Rep: Reputation: 15
Thanks! That's just what I needed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
acidrip, change default output directory shanenin Linux - Software 3 11-15-2010 11:42 PM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 07:17 PM
Problem understanding df (diskfree) output for ext2fs wirawan0 Linux - General 1 10-15-2003 08:32 PM
Is it possible to make a "file" that can change its output when accessed? oot Linux - General 5 05-11-2003 08:30 PM
Log output change Stephanie_new Linux - General 6 06-18-2002 02:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 05:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration