Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i tried googling how to create a link in /usr/local/bin for a shell script in another directory. the ultimate goal of this is to make a proper manpage that exaplains the output of a quote check. my google search didnt' yeild anything. furthermore, i don't know how to use quota or how to understand the manpage either. i'm supposed to set a soft quota of 8 files and a hard quota of 10 files on a directory owned by a certain group, i understand what the soft and hard quotas mean but i don't know how to set # of file limits on a directory.
(1) Let's suppose your script is /home/user/bin/myscript.sh You could do this:
Code:
ln -s /home/user/bin/myscript.sh /usr/local/bin/
(2) Basically quota can be set at the file system level, not at the directory level. So you should set up a partition with a specific file system including only one directory in it. If you do not want to repartition your hard disk to do that you can use this trick proposed by Colucix which mount a virtual file system on an empty directory.
Last edited by Didier Spaier; 10-22-2012 at 04:35 PM.
Reason: As requested by unSpawn who told me that my initial post was unwarranted, inefficient and less than respectful.
(1) Let's suppose your script is /home/user/bin/myscript.sh You could do this:
Code:
ln -s /home/user/bin/myscript.sh /usr/local/bin/
That will create a link, and the link will be in /usr/local/bin, but it will not point to the script in question. A better way is to run ln -s while the current working directory is the directory in which you want the link to exist.
Code:
cd /usr/local/bin
ln -s /home/user/bin/myscript.sh [optional_link_name]
Now, if /usr/local/bin is in $PATH (and it usually is), it can be executed by simply typing
That will create a link, and the link will be in /usr/local/bin, but it will not point to the script in question.
It will, I just tried again. Only caveat: /usr/local/bin should be an existing directory, otherwise the command will create a link called "bin" in /usr/local.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.