If you want to find the executables, try ls -l (you may be able to use ll). The output looks like this.
total 156
drwxr-xr-x 5 root root 4096 Oct 7 18:52 buttons
drwxr-xr-x 2 root root 4096 Oct 7 18:52 help
drwxr-xr-x 2 root root 4096 Oct 7 18:52 images
-rw-r--r-- 1 root root 592 May 15 2001 opera_16x16.png
-rw-r--r-- 1 root root 825 May 15 2001 opera_22x22.png
-rw-r--r-- 1 root root 1139 May 15 2001 opera_32x32.png
-rw-r--r-- 1 root root 1648 May 15 2001 opera_48x48.png
-rw-r--r-- 1 root root 108263 May 15 2001 opera.adr
-rw-r--r-- 1 root root 101 May 15 2001 opera.desktop
-rw-r--r-- 1 root root 152 May 15 2001 opera.wmconfig
-rw-r--r-- 1 root root 1322 May 15 2001 opera.xpm
drwxr-xr-x 2 root root 4096 Oct 7 18:52 styles
The ones marked drwxr-xr-x are directories (thus, the d).
[matt@linux opera]$ ll /usr/bin/op*
-rwxr-xr-x 1 root root 7132 Feb 23 2001 /usr/bin/open
-rwxr-xr-x 1 root root 771448 Mar 13 2001 /usr/bin/openjade
-rwxr-xr-x 1 root root 278988 Mar 14 2001 /usr/bin/openssl
-rwxr-xr-x 1 root root 10272 Mar 12 2001 /usr/bin/openvt
-rwxr-xr-x 1 root root 6397088 May 15 2001 /usr/bin/opera
[matt@linux opera]$
You'll usually find your executables in bin directories (/bin, /usr/bin, /usr/local/bin, etc). In this case, my Opera directory is in /usr/share but the executable is in /usr/bin - note the -rwxr-xr-x.
Your file listing may have a color scheme also. I use Red Hat 7.1 and by default, directories were listed in blue, executables in green.
As explained above, whether a file is executable depends on the permissions (r = read, w =write, x = executable).
You can find files with the 'x' flag set on by doing :
cd wherever
find . -perm -111
That 'find' searches recursively from the start directory using the permissions flag and finds files / directories where the 'x' is set on for any of owner, group, other.
Linux (outside of X mime types) does not have an association between a file extension and an application either. For example files ending in .pl could be anything and not necessarily perl files. The system sneak reads the first line of an executable file to get the path to the associated application - this is called the shebang - something like this :
I'm getting the source code itself as output & unable to run the file. The server starter without any problem. I do not know how to proceed. Can u help me to solve this problem
PHP files are not executable code, they are interpreted, so unless you view them through a webserver that has been configured to handle them, you will only see the code, not the output of the code...
you need to access the code through something like
have you checked the /usr/local/apache-whatever-directory/conf/httpd.conf already? if not u need to add/edit some lines there in order for the server to parse/interpret php scripts...
1. uncomment/change the ff. lines:
<IfModule mod_dir.c>
DirectoryIndex index.html index.php index.php3 index.phtml
</IfModule>
2. #And for PHP4.x, use:
#
AddType application/x-httpd-php .html .php .php3 .phtml
AddType application/x-httpd-php-source .phps
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.