Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: jpeters on July 19, 2009, 02:03:41 PM

Title: "which"
Post by: jpeters on July 19, 2009, 02:03:41 PM
..doesn't show links to /tmp/tcloop  that are in PATH, like for OSS commands in /usr/sbin. I'm not sure why, since it shows other links. 
Title: Re: "which"
Post by: roberts on July 19, 2009, 03:30:42 PM
'which' does not report on files that you do not have the proper permission.

If you look at the files in /tmp/tcloop/OSS/usr/sbin you will find:

-rwx------    1 root     root        10688 Dec 31  1969 ossdetect
-rwx------    1 root     root        11000 Dec 31  1969 ossdevlinks
-rwx------    1 root     root         9908 Dec 31  1969 ossvermagic
-rwx------    1 root     root        10456 Dec 31  1969 savemixer
-rwx------    1 root     root         1244 Dec 31  1969 soundoff
-rwx------    1 root     root         7464 Dec 31  1969 soundon
-rwx------    1 root     root         5756 Dec 31  1969 vmixctl

As a regular user, you do not have persmission to use and thus 'which' does not report.

Using sudo which soundon will report /usr/sbin/soundon
Title: Re: "which"
Post by: jpeters on July 19, 2009, 04:01:29 PM
I had thought of that,   and changed the permission for the link, which still doesn't work.  (there's no way to change the permission for the linked file in /tmp/tcloop).  

edit: Oh...."sudo which" works  :)

Think I'll create an alias....