checkign filesystems of current path
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > checkign filesystems of current path




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    checkign filesystems of current path  
yls177


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 09:53 PM

example, i am in prompt myserver#/var/adm]

i wanted to find out which filesystem the current path is so i wanted
to do something like df -kt 'echo $pwd'. but it doesnt work. there are
alternatives like df -kt "type in the current path" or df -kt | grep
"current path". basically, i think i need to know how to parse a
builtin command so that it can be passed to another command as input.





[ Post a follow-up to this message ]



    Re: checkign filesystems of current path  
Chris F.A. Johnson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 09:53 PM

On Thu, 13 Nov 2003 at 07:17 GMT, yls177 wrote:
quote:
> example, i am in prompt myserver#/var/adm] > > i wanted to find out which filesystem the current path is so i wanted > to do something like df -kt 'echo $pwd'. but it doesnt work. there are > alternatives like df -kt "type in the current path" or df -kt | grep > "current path". basically, i think i need to know how to parse a > builtin command so that it can be passed to another command as input.
What shell are you using? Some shells have a variable, $PWD, that contains the current directory, in which case you can do: df -kt "$PWD" If not, there is a standard command, pwd, which will give you the information. You can use the output of pwd as an argument to df by using command substitution: df -kt "`pwd`" -- Chris F.A. Johnson http://cfaj.freeshell.org ======================================== =========================== My code (if any) in this post is copyright 2003, Chris F.A. Johnson and may be copied under the terms of the GNU General Public License




[ Post a follow-up to this message ]



    Re: checkign filesystems of current path  
Michael Vilain


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 09:53 PM

In article <bovbt0$1hk4bm$1@ID-210011.news.uni-berlin.de>,
"Chris F.A. Johnson" <c.fa.johnson@rogers.com> wrote:
quote:
> On Thu, 13 Nov 2003 at 07:17 GMT, yls177 wrote: > > What shell are you using? > > Some shells have a variable, $PWD, that contains the current > directory, in which case you can do: > > df -kt "$PWD" > > If not, there is a standard command, pwd, which will give you the > information. You can use the output of pwd as an argument to df by > using command substitution: > > df -kt "`pwd`"
what's wrong with df -kt . -- DeeDee, don't press that button! DeeDee! NO! Dee...




[ Post a follow-up to this message ]



    Re: checkign filesystems of current path  
Chris F.A. Johnson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 09:53 PM

On Thu, 13 Nov 2003 at 08:22 GMT, "Michael Vilain <vilain@spamcop.net>" wrote:
quote:
> In article <bovbt0$1hk4bm$1@ID-210011.news.uni-berlin.de>, > "Chris F.A. Johnson" <c.fa.johnson@rogers.com> wrote: > > > what's wrong with > > df -kt .
Mostly that it doesn't work on any system I've tried it on. But neither do the solutions I posted. man df: -t type Report on filesystems of a given type (for example, nfs or 4.2). Leave out the -t option and yours is the best way (says I, slapping myself on the forehead and saying, "It's bedtime!") -- Chris F.A. Johnson http://cfaj.freeshell.org ======================================== =========================== My code (if any) in this post is copyright 2003, Chris F.A. Johnson and may be copied under the terms of the GNU General Public License




[ Post a follow-up to this message ]



    Re: checkign filesystems of current path  
yls177


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 09:53 PM

"Chris F.A. Johnson" <c.fa.johnson@rogers.com> wrote in message news:<bovhah$1ij3jc$1@ID-210011.ne
ws.uni-berlin.de>...
quote:
> On Thu, 13 Nov 2003 at 08:22 GMT, "Michael Vilain <vilain@spamcop.net>" wr ote: > > Mostly that it doesn't work on any system I've tried it on. > > But neither do the solutions I posted. > > man df: > > -t type > Report on filesystems of a given type (for example, nfs > or 4.2). > > Leave out the -t option and yours is the best way (says I, > slapping myself on the forehead and saying, "It's bedtime!")
thanks for posting.. your commands do work.. mine too :D df -kt `pwd` ! in `pwd` , this `` is used to parse the command? also, i have this alias bkbin which changes to /my/bin/ now in my /my/bin, i have a subdirectory myhome, so that makes up /my/bin/my home/ now i am in /tmp, i can do a 1) bkbin 2) cd myhome however, i wanted to do this bkbin/myhome, but fails.... any comments?




[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:15 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register