LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   built-in scripts in Slackware (http://www.linuxquestions.org/questions/linux-newbie-8/built-in-scripts-in-slackware-202595/)

Gary_Menegon 07-08-2004 09:49 AM

built-in scripts in Slackware
 
I know that there are built-in scripts in Slackware such as /usr/bin/adduser and /usr/bin/passwd. Are there other scripts, a complete listing, in existance? Or a way I can look and find them all?


My second question is where is a good place to add aliases in Slackware? Should I create new files?

Thankyou,

Gary

david_ross 07-08-2004 01:23 PM

To see a list of commands that are in your path hit the tab key twice.

To create an alias you can use alias:
alias pw="passwd"

slakmagik 07-08-2004 08:03 PM

Just to add to that...

For shell scripts specifically, this'll find most of them - add paths where appropriate, I guess:

file /bin/* /sbin/* /usr/bin/* /usr/sbin/* | grep shell | less

To preserve aliases, store them in a shell config file. If you're going to be executing them 'through' things, so to speak, you might want to write little scriptlets that do the job, as not everything will pay attention to your aliases, being internal to the shell, sort of.

Gary_Menegon 07-12-2004 08:09 AM

Quote:

Originally posted by david_ross
To see a list of commands that are in your path hit the tab key twice.

To create an alias you can use alias:
alias pw="passwd"

David,

Tab twice is great but that gives 3291 commands! Is there a short list of popular commands, such as netconfig, comes to mind ? Possibly 20 to 30 popular commands. I am not referring to normal commands like ls, pwd, rm, etc.

Also adding an alias does not keep it after I end a session. Where in Slackware can I store aliases possibly along with the system aliases?

Thanks,

Gary

Jose Muņiz 07-12-2004 10:19 AM

I think you're looking for the contents of /sbin and /usr/sbin. As for a list of popular ones, I don't know ... I'll have a look in my books.

But you can always do a ls /sbin and find out :)

ppuru 07-12-2004 10:27 PM

you can place the new created aliases either in

/etc/profile // if you want to share it with other users . You will need root perms to edit this file
.profile or .bash_profile on your home directory.

These files are read and loaded when you log in.

Gary_Menegon 07-13-2004 07:48 AM

Quote:

Originally posted by Jose Muņiz
I think you're looking for the contents of /sbin and /usr/sbin. As for a list of popular ones, I don't know ... I'll have a look in my books.

But you can always do a ls /sbin and find out :)


Thanks, I'll try that.

Gary

Gary_Menegon 07-13-2004 07:49 AM

Quote:

Originally posted by ppuru
you can place the new created aliases either in

/etc/profile // if you want to share it with other users . You will need root perms to edit this file
.profile or .bash_profile on your home directory.

These files are read and loaded when you log in.

Thanks, I'll try that.

Gary


All times are GMT -5. The time now is 08:43 PM.