Add Execute Permissions To A File In Linux With A Script Or Function
Page 1 of 1
Add Execute Permissions To A File In Linux With A Script Or Function
Script:
- Code:
#!/bin/bash
# (c) J_Net 2018
#
# jnet.forumotion.com/t1640-add-execute-permissions-to-a-file-in-linux-with-a-script-or-function#2525
#
# Example: ./exec.sh file.sh
#
sudo chmod +x "$1"
echo "$1 Has Been Made Executable"
Function: (For .bashrc file).
- Code:
function x(){
sudo chmod +x "$1"
echo "$1 Has Been Made Executable"
}
Now you can just type
- Code:
x *.sh
Similar topics
» file permissions chroot and chmod in linux
» Countdown Timer Using A File On Linux Bash Script Example
» Make linux bash dot sh file executable shell script
» Raspberry Pi 3 Set File Permissions
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
» Countdown Timer Using A File On Linux Bash Script Example
» Make linux bash dot sh file executable shell script
» Raspberry Pi 3 Set File Permissions
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum