User Tools

Site Tools


make_a_file_executable

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
make_a_file_executable [2016/07/25 18:50] walkeradminmake_a_file_executable [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Make a file Executable ====== ====== Make a file Executable ======
 +<color darkorange>2016</color>
 +
 +----
 +
 \\  \\ 
 Unlike Windows, Linux does not have files that are executable, all files can have this attribute. So for example, I have a python file that is just a text file, and I will to be able to run this from the command line, If I look at the file using ls -al: Unlike Windows, Linux does not have files that are executable, all files can have this attribute. So for example, I have a python file that is just a text file, and I will to be able to run this from the command line, If I look at the file using ls -al:
Line 7: Line 11:
 I will see something like this: I will see something like this:
 \\  \\ 
-    -rw-r--r-- 1 pi pi 4452 Jul 25 17:46 40x2_LCD.py+    "-rw-r--r-- 1 pi pi 4452 Jul 25 17:46 40x2_LCD.py"
 \\ \\
 The permissions for this file are: The permissions for this file are:
 \\  \\ 
-    -rw-r--r--+    "-rw-r--r--"
 \\  \\ 
 This file has three sets of permissions: This file has three sets of permissions:
 \\  \\ 
     User -rw  |  Group -r-  |  Others r--     User -rw  |  Group -r-  |  Others r--
 +    
 +    where r is read - w is write - x is execute
 \\  \\ 
- 
- 
- 
-To edit the dhcpcd.conf file, enter: 
 \\  \\ 
-        sudo /etc/dhcpcd.conf+I will cover permissions in another section, to give this file 'everything' use the following:
 \\  \\ 
-At the end of the file add the following lines (with your own IP Address values)+    chmod 777 40x2_LCD.ph 
 +\\ 
 +If we look at the permissions now by using:
 \\  \\ 
 +    ls -al
 \\  \\ 
-    eth0+We will see: 
 +\\  
 +    "-rwxrwxrwx" 
 +\\  
 +Now we can execute this file (assuming it contains something valid that is executable) 
 +\\  
 +    ./40x2_LCD.ph 
 +\\  
 +The file will now be executed. 
 +\\  
 +\\  
make_a_file_executable.1469469033.txt.gz · Last modified: 2023/03/09 22:35 (external edit)