LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-14-2009, 06:26 AM   #1
geekpie
LQ Newbie
 
Registered: Oct 2006
Posts: 24

Rep: Reputation: 0
test exam question from the LPI site: does it make sense?


HI
from exam sample questions (LPI101) on the LPI site:

Which command will show how much free disk space is available in the current directory?
Answers
A) df .
B) df
C) du /
D) du .
E) df /

Do they mean "current filesystem"?
 
Old 05-14-2009, 06:36 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
The question is worded correctly.

First, the correct command is A (disk free [space] plus the dot).

Second using the dot as the argument means the current working directory. However, since df shows the free space on a partition (file system) it will show the information about the file system in which the current working directory resides.

You could have tried each command to see what happens rather than post a question. Then if you didn't understand the results you could have asked about what you found.

Last edited by stress_junkie; 05-14-2009 at 06:39 AM.
 
Old 05-14-2009, 07:19 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Tricky question....I totally understand why you would think they meant "filesystem". Perhaps the way to think of it is: "how much disk space is available to the current directory?".....the point being that directories do not have size limitations---only the partitions (filesystems) that are mounted to them.

On my system, "df ." and "df /" give the same answer---but only because they live on the same partition.
 
Old 05-14-2009, 09:15 AM   #4
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
pixellany:

I'm sure there are places on 99.9999999999999999% of unix-like systems where . and / are not on the same partition including yours . Also, on 100% of computer systems there is a place where . and / are on the same partition.

Well, it was early in CA when you posted that. Perhaps more coffee?

As far as the LPI exam (at least when I was involved with the project early on), the intent was to get a bunch of questions and put the good quality ones on the exam and the ones that weren't worded well on the practice tests with the idea that the really bad ones would be replaced over time. Basically in this example, you can expect to have questions pertaining to df and du on the exam, but you should also expect them to be a little more clear in what they are asking.

Forrest
 
Old 05-14-2009, 09:46 AM   #5
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 15.0
Posts: 8,233
Blog Entries: 61

Rep: Reputation: Disabled
Quote:
Originally Posted by forrestt View Post
I'm sure there are places on 99.9999999999999999% of unix-like systems where . and / are not on the same partition including yours . Also, on 100% of computer systems there is a place where . and / are on the same partition.
I'm trying hard to work that one out, and it's giving me an headache.
 
Old 05-14-2009, 10:04 AM   #6
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
brianL:

cd to /

. and / are the same thing

mount a cdrom/floppy/usbstick/any_other_filesystem_containing_hardware and cd to it's mount point

. and / are NOT the same thing.

HTH

Forrest

Last edited by forrestt; 05-14-2009 at 10:06 AM.
 
Old 05-14-2009, 10:10 AM   #7
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
Ok, I feel like wasting time...

The question is open to interpretations. One way of looking at it is...

"Which command will show how much free disk space is available (for you/root/userX) in the current directory?"

Now, "df ." is not fully correct if you consider the current scenario

1. "." can be your home directory
2. Root user might have turned on quota on your system
3. Now, if you interpret the question as "... is available for you...", then the answer is not "df ."
(. need not be home, but could be any place on a partition where root/admin has turned on quota for userX )
 
Old 05-14-2009, 10:29 AM   #8
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
For that reason and others, the question is poorly written. Since it is poorly written, it won't be on the test, but it is "good enough" to be on the practice test.

HTH

Forrest
 
Old 05-14-2009, 10:51 AM   #9
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 15.0
Posts: 8,233
Blog Entries: 61

Rep: Reputation: Disabled
Thanks for the explanation, forrestt, my headache's gone.
 
Old 05-14-2009, 11:05 AM   #10
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Well, it was early in CA when you posted that. Perhaps more coffee?
More coffee will not help this thread......
I'm pretty sure that you are chiding me because I said something that should be obvious---not because I made a mistake.........I absolutely HATE making mistakes--which is why I do it so rarely....

PS:
As I think about it, it's pretty rare for "." and "/" to be the same thing. In fact, if they are, it means you are living on the edge. Anytime that I DO go to /, I leave immediately.

Last edited by pixellany; 05-14-2009 at 11:08 AM. Reason: Thought of something else clever to say....;)
 
Old 05-14-2009, 11:12 AM   #11
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
I would certainly not attempt to insinuate that you made a mistake .

Just pointing out that in most systems you can get "df ." and "df /" to give the same answer and also different answers.

Forrest
 
Old 05-14-2009, 11:14 AM   #12
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
we're in violent agreement!!
 
Old 05-14-2009, 11:47 AM   #13
geekpie
LQ Newbie
 
Registered: Oct 2006
Posts: 24

Original Poster
Rep: Reputation: 0
Quote:
The question is worded correctly.
I don't think it is. I think it should be
Which command will show how much free disk space is available to the current directory
not
Which command will show how much free disk space is available in the current directory

but that aside, I see what they're getting at, which I didn't before.
 
  


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
LPI Exam Prep Question nic2 Linux - General 1 05-02-2006 10:30 PM
LPI Exam 102 - Apache question. Thakowbbery Linux - Certification 2 11-13-2005 07:37 AM
crontab question for lpi 102 exam Red Wagon Linux - Newbie 2 10-12-2005 02:39 PM
Changes on LPI Exam 101 Thakowbbery Linux - Certification 3 09-22-2005 10:55 PM
Exam Fee for Lpi dark_light Linux - General 1 05-02-2002 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:44 PM.

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