Re: Transferring current path in nautilus, file browser to command line ??



Hi;

It was over a year ago when I last used it --- FC4 I think.

On Sat, 2006-11-25 at 19:31 +0100, Stefano Sabatini wrote:
> On date Saturday 2006-11-25 12:30:53 -0500, William Case, wrote:
> > Hi;
> > 
> > I know there is a way or a command or something, which can be used to
> > insert the current path into a terminal command.  But, I forget and
> > can't find it again.
> > 
> > e.g.  Using the file browser I find a file I am looking for,
> > say /usr/applicationfile/foo.  Now in the gterminal (open at the same
> > time)  I want to $ cat 'foundfile/foo'.  How do I automatically
> > insert /usr/applicationfile/foo
> > 
> > Remind me how, please ??
> 
> Not sure about what you want.
> 

As I remember, if I had gone to a directory or file using nautilus file
browser and decided to do something at a command line, I could open a
terminal and insert the current *nautilus* working director into the
bash command.  If I remember I had a script (which I have lost) bound to
a key that would do the insertion for me.  An alias also worked.

I.E.  I believe there was an environmental constant something like
NAUTILUS_CURRENT_WORKING_DIRECTORY that was used.  In any case, I am
half way there with the right click 'Open Terminal'.  If I have selected
a directory in nautilus and then right click 'Open Terminal' the
terminal opens with [user at machine 'nautilus selected directory]$ so
the command line is finding the path for the
NAUTILUS_CURRENT_WORKING_DIRECTORY somewhere.  I just can't find it.

> You may check the $PWD environment variable (Print Working Directory),
> or the pwd corresponding command, that return the current path.
> 
> E.g.:
> $ cd ~/foo
> $ pwd
> /home/username/foo
> $ basename $PWD
> foo
> 
> HTH
> Cheers
-- 
Regards Bill




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