Solved

How do I add a path entry?

Posted on 2004-10-15
5
432 Views
Last Modified: 2010-04-20
Hello.

Right now, to resize an image, I have to use the following:

         /home/tools/gm-1.1.3/bin/gm convert bigpic.jpg  -resize 100x50 +profile "*" thumbnail.jpg

I don't want to have to include the full path.  Instead, I would like to use the following:

         gm convert bigpic.jpg  -resize 100x50 +profile "*" thumbnail.jpg

This needs to work for all users, including nobody.

Thanks!
0
Comment
Question by:hankknight
  • 3
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
mmartha earned 500 total points
ID: 12321835
copy the /home/tools/gm-1.1.3/bin contents to /usr/bin

or you can make a soft link like this:

# ln -s /home/tools/gm-1.1.3/bin/gm /usr/bin/gm

either way should work
0
 
LVL 16

Author Comment

by:hankknight
ID: 12322246
So, I should log in with root access and type in the following command?

           ln -s /home/tools/gm-1.1.3/bin/gm /usr/bin/gm

Is that right (I don't want to mess anything up!)

Thanks!
0
 
LVL 2

Expert Comment

by:mmartha
ID: 12322353
You don't have to logout from your normal user session. You can do:

$ su -
Password: (input root pasword here)

This will give you root access :D (will switch you in the console to the root account actually... su means switch user)

# ln -s /home/tools/gm-1.1.3/bin/gm /usr/bin/gm

and then you can exit from the root account with "exit" as follows:

root@localhost # exit
user@localhost $

:D
0
 
LVL 16

Author Comment

by:hankknight
ID: 12322477
Thanks.

Now, how can I undo this in the future when I no longer need the graphics tool?
0
 
LVL 2

Expert Comment

by:mmartha
ID: 12323225
to remove the link the following command must be issued:

# rm /usr/bin/gm

If you copied the directory contents, you must remove them from the /usr/bin directory with the rm command. If you did this, I recommend to undo it now, and create the link, because is easier to manage the link than the binary contents of the file.

Be happy :D

MMartha
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
LINUX, CPANEL & WHM 5 44
Automating a script for user accounts LINUX 14 70
Sendmail STARTTLS error 37 84
Anything Suspicious in this Report Email on Linux Server 4 39
In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now