User privileges is one of the important feature. You can change the user privileges of files and directories as follows.
Here CHMOD stands for "change mode". Here is the full wiki page.
To change from normal file to executable file, use:
chmod u+x fileName
To change back to normal file, use:
chmod a-x fileName
To change the permission
chmod -R <permission> <dirname>
Once, I wanted to delete the directory recursively (!!!Warning: be careful here, once you delete, you can not recover it). To do this,
chmod -R 777 <dirname> (then rmdir <dirname>)
Another useful onliner is the following.
Consider a situation where you mistakenly converted some files to executable files.
To covert an executable file to normal file, use:
chmod -x <filename>
To convert multiple files, use:
chmod -x <foo*.txt>
Here is the list of posts that may be useful if you work in HPC, quantum chemistry, computational materials science, etc.
Here CHMOD stands for "change mode". Here is the full wiki page.
To change from normal file to executable file, use:
chmod u+x fileName
To change back to normal file, use:
chmod a-x fileName
To change the permission
chmod -R <permission> <dirname>
Once, I wanted to delete the directory recursively (!!!Warning: be careful here, once you delete, you can not recover it). To do this,
chmod -R 777 <dirname> (then rmdir <dirname>)
Another useful onliner is the following.
Consider a situation where you mistakenly converted some files to executable files.
To covert an executable file to normal file, use:
chmod -x <filename>
To convert multiple files, use:
chmod -x <foo*.txt>
Here is the list of posts that may be useful if you work in HPC, quantum chemistry, computational materials science, etc.