I want to create a bash to turn off swap space permanently so I need to go to /etc/fstab and find the line (/swapfile) and put a # before it.
CodePudding user response:
For example:
sed -i -e 's/^\(.*my_line_pattern\)/#\1/g' /etc/fstab
I want to create a bash to turn off swap space permanently so I need to go to /etc/fstab and find the line (/swapfile) and put a # before it.
CodePudding user response:
For example:
sed -i -e 's/^\(.*my_line_pattern\)/#\1/g' /etc/fstab