Wednesday, May 31, 2006

two handful commands

Do you want to make shortcut in your command ?Then run this command into your command line
command format: alias [shoutcut-command]=[command]
Do you want to revoke this alias? Run this command in to your coomand line
>unalias c

How to open CDROM with command line?
Run this comand
>eject /dev/cdrom or > eject /mnt/cdrom or just run > eject .Bash shell will take CDROM device as a default device.

how to close the CDROM Device with command line?
> eject -t /dev/cdrom or simply put >eject -t

1 comment:

Mohan said...

Two ioctls did the trick...

$ strace -o out eject
$ strace -o out-t eject -t

$ grep ioctl out*
out:ioctl(3, CDROMEJECT, 0x3) = 0
out-t:ioctl(3, CDROMCLOSETRAY, 0) = 0