[HLUG] cd command unknown in my system!...sorted

Graham Cole g at gcole.uklinux.net
Sun Jan 15 09:59:53 GMT 2006


Thanks for all those hints. The strange use of cd without sudo was
exactly what I needed to know. Now I must sort out some muddle which
happened when I had two versions of djview installed and a lack of
correct linking. I may get that sorted this w/e

Thanks again 
Graham


On Sat, 2006-01-14 at 19:02 +0000, Andrew Hodgson wrote:
> Hi,
> 
> Yes, when in Ubuntu I tried to do everything on one line:
> 
> You can use:
> 
> Sudo ln -s /path/to/original/file /path/to/directory/filename
> 
> Andrew.
> 
> -----Original Message-----
> From: herefordshire-bounces at mailman.lug.org.uk
> [mailto:herefordshire-bounces at mailman.lug.org.uk] On Behalf Of DavidReid
> Sent: 14 January 2006 18:27
> To: Herefordshire Linux Users Group.
> Subject: Re: [HLUG] cd command unknown in my system!
> 
>  From memory I think 'ln' will take a couple of parameters so you might 
> get away with the single command 'ln -s directory linkname' in the sudo 
> without having to cd.
> 
> John Hedges wrote:
> 
> >On Fri, Jan 13, 2006 at 11:41:50PM +0000, Julian Robbins wrote:
> >  
> >
> >>Graham Cole wrote:
> >>
> >>    
> >>
> >>>Hi John
> >>>I'm trying to put in a link to get my djview (an essential viewer for
> >>>the 1837online website) working as a plugin after upgrading my
> Mozilla
> >>>browser. I have two commands to use for doing this, firstly
> >>>$ sudo cd /usr/lib/mozilla-firefox/plugins
> >>>That resulted in this error line: 
> >>>sudo: cd: command not found
> >>>
> >>>
> >>>      
> >>>
> >>I found something similar on Ubuntu. If you cd to a location owned by 
> >>root, you can do thsi without sudo. When using sudo with cd makes
> Ubuntu 
> >>complain.
> >>
> >>I found it a bit strange too !!
> >>
> >>Julian
> >>
> >>
> >>    
> >>
> >>>Using that echo command gave:
> >>>gc1 at localhost:~ $ echo $SHELL
> >>>/bin/bash
> >>>
> >>>I'm puzzled.
> >>>
> >>>Thanks,
> >>>Graham
> >>>      
> >>>
> >
> >Hi Graham
> >
> >I guess sudo doesn't invoke a shell. Perhaps 
> >
> >$sudo -s cd /usr/lib/mozilla-firefox/plugins
> >
> >but this would sudo, change directory and quit without doning anything
> >useful - root's current dir would be reset afterwards - ie would not be
> >/usr/lib/mozilla-firefox/plugins for the next sudo (I think).
> >
> >$ sudo -s 'cd ... && ln -s ...'
> >
> >might do the job. However I'd just use su to log in as root, do
> >root stuff and then log out again eg:
> >
> >$ su
> >Password: *********
> ># cd /usr/lib/mozilla-firefox/plugins
> ># ln -s /wherever/the/plugin/lives
> ># quit
> >$
> >
> >Cheers
> >
> >John
> >
> >

> 




More information about the Herefordshire mailing list