[HLUG] cd command unknown in my system!

DavidReid david at sagecrest.freeserve.co.uk
Sat Jan 14 18:47:20 GMT 2006


 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
>
>
>_______________________________________________
>Herefordshire mailing list
>Herefordshire at mailman.lug.org.uk
>http://mailman.lug.org.uk/mailman/listinfo/herefordshire
>
>
>
>  
>




More information about the Herefordshire mailing list