How do I add a path entry?

Posted on 2004-10-15
Last Modified: 2010-04-20

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.

Question by:hankknight
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Accepted Solution

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
LVL 16

Author Comment

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!)


Expert Comment

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 $

LVL 16

Author Comment

ID: 12322477

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

Expert Comment

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


Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

734 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