Re: hi masters of linux, surely you know some tricks...
On Thu, Jun 28, 2001 at 10:59:03PM +0200, thomas anderson wrote:
> Hi masters of the linux community surely you know some tricks to this...,
>
> I want to try to put a perl script in the /usr/lib/perl directory however I
> don't have permission access...I tried symlinking it but it still won't work.
> is there I way to do this without becoming root or sudo?
as others have said, "don't do that."
if it's just for you, make your own lib directory in your $HOME
directory:
mkdir ~/lib <- put your perl modules there, then
perl -I$HOME/lib yourscripts.pl
for executables, do
mkdir ~/bin <- put programs here
export PATH="$HOME/bin:$PATH"
--
here's the philosophy --
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
every portion between ":" is a path that's searched when you ask
for a command (and you don't specify the full path yourself).
most of the stuff you run will be from /usr/bin, such as
apropos find pager tracepath ...&c...
cvs locate passwd uptime
diff make tail vi
any of these can be overridden by putting a similarly-named
executable in the /usr/local/bin directory -- which is part of
the reason it's there at the beginning of your $PATH.
similarly, for perl's @INC:
$ perl -e 'print join "\n",@INC'
/usr/lib/perl5/5.005/i386-linux
/usr/lib/perl5/5.005
/usr/local/lib/site_perl/i386-linux
/usr/local/lib/site_perl
/usr/lib/perl5
.
put your own modules into /usr/local/lib/site_perl and leave the
system stuff alone.
the system utilities (apt-get, dpkg) will take care of the
system directories for you; you can munge the /usr/local/ stuff
to your heart's content. also makes it easier to back up changes
you make to your own system.
--
DEBIAN NEWBIE TIP #59 from Will Trillich <will@serensoft.com>
:
Wanting to SYNCHRONIZE YOUR SYSTEM CLOCK periodically? If you
think your system clock gathers or loses a few extra seconds
each day, you're probably looking for "ntpdate" which queries
several "network time protocol" servers, and sets your system
clock accordingly.
apt-get install ntpdate ntp-doc
then browse /usr/share/doc/ntp-doc/html for info.
Also see http://newbieDoc.sourceForge.net/ ...
Reply to: