Solved

How do I add a path entry?

Posted on 2004-10-15
5
431 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 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

16 Experts available now in Live!

Get 1:1 Help Now