RE: shell commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 28 Jan 2004, cheryl tan wrote:

> Hi again.. I would like to get the free disk space of the current
> working directory only (partition where Redhat Linux is installed). I
> have tried $ df -h but it shows the free disk space of all available
> partitions.
>
> Thank you very much..

Cheryl,

four lifetimes ago it seems now I had been proud that I knew everything
there was to know about my Commodore Pet 32K b but was confronted with a
new and daunting system, the PDP-11 running RSX and/or RSTS. I quickly
realized that the key wasn't to know everything as that was impossible.
The key was to know where to find everything...

Asking your buddies is a fine thing at times but it's tiresome for them,
and you may get your question answered, but you'll usually not get
anything more and you won't, ultimately, learn much. You need to strike
out on your own with the primary sources. In this case, I don't mean
source code... Now, you would be absolutely correct if you criticized
Linux, and all Unix clones, for having an absolutely awful online help
utility, however, you do need to become famillar with what's available as
such resources will help you answer questions as you have asked all on
your own.

The first thing to realize is that there are an awesome number of programs
and that, generally speaking, they are all found in your PATH. Try this:

echo $PATH

Take a look: it consists of colon-delimited directory paths. Check out
each path with 'ls', one at a time. Those are all the programs that can
run if you type in their name at the system prompt. By convention, each
one will give you help if you either run it with no arguments or if you
run it with  -h as an argument - or sometimes --help. You can usually get
a lot more information if you type "man" and pass it the name of the
command/utility as an argument. For example, try:

man df

"But how do I know which commands and utilities to check out?", you may
ask. Great question, glad you asked. The answer is rather pathetic from an
ideal sort of perspective, but it's all we've got and it's not so bad:
apropos. For example, try:

apropos disk

You'll find a lot of great information. ...In the modern era, the next
step is to try a web search. Lots of people use Google, but I also really
like mamma.com as a search engine - there are lots of others. These
resources can help you find what you want very quickly if only you learn
to ask questions well.

After trying these things would be the time to call in the big guns, not
before, as otherwise people get tired of being your dictionary and doing
your homework for you. Keep in mind, we were all novices once - you just
want to get out of novice mode as quickly as reasonable! ...On the other
hand, if you don't _want_ to advance beyond being a novice, you will
quickly find your "friends" will loose patience with your unending
questions. Either way, the odd stray simple question usually doesn't raise
anyones ire, that's OK, but doing your homework first helps build respect.

I hope this helps,
Richard

-- 
Richard Troy, Chief Scientist
Science Tools Corporation
rtroy@xxxxxxxxxxxxxxxx, 510-567-9957, http://ScienceTools.com/


_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux