LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-22-2012, 02:42 PM   #1
jayfurrie
LQ Newbie
 
Registered: Oct 2012
Posts: 5

Rep: Reputation: Disabled
Some random linux questinos


hey guys,

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.
 
Old 10-22-2012, 02:59 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,056

Rep: Reputation: Disabled
(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 members found this post helpful.
Old 10-22-2012, 05:07 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Quote:
Originally Posted by Didier Spaier View Post
(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
Code:
myscript.sh
--- rod.
 
Old 10-22-2012, 05:33 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,056

Rep: Reputation: Disabled
Quote:
Originally Posted by theNbomr View Post
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.
 
Old 10-22-2012, 05:43 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Chap 7 here http://www.linuxtopia.org/online_boo...ion/index.html is a good run through on quotas and how to set them up.
 
Old 10-22-2012, 07:00 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Might not need the link, instead use direct paths in script if possible.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Box is attempting to scan and ssh into random machines using random usernames gianh Linux - Security 2 11-09-2008 05:42 PM
using /dev/random to output random numbers on a text file guguma Programming 4 04-02-2007 01:42 PM
KDE Random wallpaper or script to create symbolic links to random files cvelasquez Linux - Software 2 02-26-2007 06:48 PM
some questinos... mandrake 8.1 netdur Linux - Software 0 04-21-2003 06:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration