The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Re: link to a program and include switches
Author: halber_mensch 
Date:   15-11-05 21:01

What you're looking for is not a symlink. symlinks are file system structures, and don't affect the vm machinery at all.

What I believe you are trying to do is introduce a script or an alias to run this command for you.

you could make a file named mountcd;
----------------------------------------------
#!/bin/sh
mount -t cd9660 /dev/acd0 /cdrom
----------------------------------------------

chmod a+x mountcd

then throw it in /usr/local/bin or something.

More appropriately, you could make an alias:

#alias mountcd mount -t cd9660 /dev/acd0 /cdrom

you can also place that command in your .profile or .login

But the most correct way is to use /etc/fstab.
Insert the following line to /etc/fstab:
/dev/acd0 /cdrom cd9660 ro,noauto 0 0

From then on, you can do

#mount /cdrom

to mount your cdrom.

As a point of interest, non-root users by default cannot mount file systems.

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 link to a program and include switches   new
cetae 05-11-05 18:00 
 Re: link to a program and include switches   new
halber_mensch 15-11-05 21:01 
 Re: link to a program and include switches   new
cetae 16-11-05 00:42 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org