Skip to content

Small things that make big difference

Spring Ep edited this page Oct 13, 2020 · 7 revisions

Copying files

cp -p will perserve permissions, timestamps, ownership
cp -a will recursively perserve** permissions, timestamps, ownership **and it will also perserve extended attributes - such as SELinux context B-)

Comment out multiple lines in vi

Press v to enter the visual mode, select the lines that you want to comment out, then type :s/^/# which means substitute the beginning of each selected line with #.

Clone this wiki locally