I am mounting a directory /dev/xyz to folder /abc using command
mount --bind /dev/xyz
/abc
How could I use this command using shell script?
I am mounting a directory /dev/xyz to folder /abc using command
mount --bind /dev/xyz
/abc
How could I use this command using shell script?
echo "mount --bind /dev/xyz /abc" >mount.sh && chmod 755 mount.sh && ./mount.sh
Almost the same way. Just create a bash script:
vi mount.sh
Insert or i is responsible for inserting. Right button of the mouse for pasting. Esc for exiting the insert mode, Then all you have to do after Esc is to type :x to save and exit the bash script file edition mode.
Add a shebang check what shebang is at Wikipedia
Add a command to the file below the shebang.
mount --bind /dev/xyz /abc
Make bash script executable using
chmod +x mount.sh