LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 07-07-2003, 02:36 PM   #1
Lampei
LQ Newbie
 
Registered: Mar 2003
Distribution: Trying to use Mandrake
Posts: 9

Rep: Reputation: 0
Question Available Hard Drive Space?


How can you tell how much hard drive space you have left/in total? I tried "free" in a terminal window, but that seemed to give memory available.
 
Old 07-07-2003, 02:41 PM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Handy bash commands for finding out stuff in Linux:
# Find CPU specifications
cat /proc/cpuinfo

# What pci cards are installed and what irq/port is used
cat /proc/pci

# Memory and swap information
free
An article: Tips for Optimizing Linux Memory

# How is the hard drive partitioned
fdisk -l

# How much free drive space
df -ah

# Show disk usage by current directory and all subdirectories
du | less

# What takes up so much space on your box
# Run from the directory in question and the largest chunk shows up last
find $1 -type d | xargs du -sm | sort -g

# Find running kernel version
uname -r

# Find X server version
X -showconfig

# What compiler version do I have installed
gcc -v
gcc --version

# What is the distribution
cat /etc/.product
cat /etc/.issue
cat /etc/issue
cat /etc/issue.net
sysinfo

# For finding or locating files
find
locate
which
whereis

# Use dmesg to view the kernel ring buffer (error messages)
dmesg | less

# Watch error messages as they happen (sysklog needed)
as root, tail -f /var/log/messages (shows last 10 lines, use a number in front of f for more lines)

# What processes are running
ps -A

# Find a process by name
ps -ef | grep -i <plain text>
For example, XCDroast
ps -ef xcdroast

# See current environment list, or pipe to file
env | more
env > environmentvariablelist.txt

# Show current userid and assigned groups
id

# See all command aliases for the current user
alias

# See rpms installed on current system
rpmquery --all | more
rpmquery --all > <filename>
rpmquery --all | grep -i <plaintext>

# What directory am I using
pwd

# Get ls colors in less
ls --color=always | less -R

Look at man <command> or info <command> for the flags I used and for other options you can use for bash commands.

Last edited by fancypiper; 07-07-2003 at 03:06 PM.
 
Old 07-07-2003, 02:41 PM   #3
KptnKrill
Member
 
Registered: Apr 2003
Location: US, MA
Distribution: Nandu-0.ab, Arch 0.7.2
Posts: 229

Rep: Reputation: 30
try this.
df (the harddrive/partition, e.g. /dev/hdb3) -h
 
Old 07-07-2003, 02:41 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
I use:
df -h
 
Old 07-07-2003, 02:42 PM   #5
KptnKrill
Member
 
Registered: Apr 2003
Location: US, MA
Distribution: Nandu-0.ab, Arch 0.7.2
Posts: 229

Rep: Reputation: 30
that's quite a post fancypiper
 
Old 07-07-2003, 03:05 PM   #6
Lampei
LQ Newbie
 
Registered: Mar 2003
Distribution: Trying to use Mandrake
Posts: 9

Original Poster
Rep: Reputation: 0
Awesome! Thanks for everyone's help. And great list fancypiper.
 
Old 07-07-2003, 03:08 PM   #7
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Oops! I forgot the Mandrake stuff;

# Mandrake links
Mandrake home page
Mandrake Users website
Easy urpmi config for Mandrake
urpmi mini-HOWTO
Easy software management: Red Carpet
Maximum RPM
rpmfind
You didn't install the developmental packages? As root, command:
urpmi gcc
An Introduction to the Midnight Commander. You can install it by commanding:
urpmi mc
Midnight Commander home page
 
  


Reply



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
40 Gb hard drive--How much space for XP? oomfoofoo Linux - Laptop and Netbook 6 08-10-2005 01:59 PM
out of Hard drive space it-s Linux - General 4 06-28-2005 03:03 PM
Available hard drive space totalrockage Linux - Newbie 3 04-08-2005 06:53 PM
Hard drive space token2004 Linux - Hardware 9 04-06-2005 10:31 AM
Hard Drive space doralsoral Linux - Software 1 11-08-2003 04:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:08 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
Open Source Consulting | Domain Registration