PDA

View Full Version : What is the operator " ./. . . "



royeo
3rd September 2006, 11:27 PM
I often see and use this ( ./. . . ) but I don't know what it is. Can somebody please explain exactly what its called, what it is and what it does.

Thanks,

royeo

Wayne
3rd September 2006, 11:35 PM
I often see and use this ( ./. . . ) but I don't know what it is. Can somebody please explain exactly what its called, what it is and what it does.

Thanks,

royeo

You're telling the system to search the current directory for an executable (to use the executable in the current directory) Linux doesn't do this by default.

$ install.sh <------- Will throw up an error.
$ ./install.sh <----- Will launch the install script if it is in the directory.

BTW. You posted the same message twice, can you delete the other

Wayne

u-noneinc-s
4th September 2006, 12:51 AM
Hope not to confuse you here, but i see there is a difference in your 2 posts, one being "./..." and the other being *./...*. If you thought there might be a difference between the 2, there is. * is a wildcard in that if you do
ls /usr/bin/at* or
ls /*/bin/at* or
ls /usr/*/at* it will return
at atktopbm atlantik atlantikdesigner atq atrm attr. It will not work for */at*, You can also do (from any directory)
/*/bin/./atlantik or
/usr/*/./atlantikor
/*/*/./atlantikand it will execute (start) the game atlantik. In all cases the leading / is needed. */*/./atlantik or */bin/./[CODE] will not work. Also if atlantik was the only instance of at in /usr/bin, /*/*/./at* would also work.

EDIT: Actually, for each/*, it will produce all instances of at* in /*number of dirs. ie: ls /*/at* will return any single top-level dir instance of at (in this case, /etc/at.deny /sbin/ata_id, and
ls /*/*/at* will return many instances of at * as in /usr/bin/at* and /usr/include/at* and /etc/webmin/at* and so on...