server:linux_scripts
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| server:linux_scripts [2012/10/21 08:02] – ashley | server:linux_scripts [2024/05/02 10:36] (current) – [search and remove files from directories] ashley | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Linux Scripts ====== | ====== Linux Scripts ====== | ||
| + | |||
| + | ====Keypair==== | ||
| + | ssh-keygen -t rsa | ||
| + | Enter to save file with default empty password | ||
| + | ssh-copy-id user@123.45.56.78 | ||
| + | |||
| + | https:// | ||
| + | ===== Disabling power button under FreeBSD ===== | ||
| + | |||
| + | / | ||
| + | |||
| ===== Backup with rsync ===== | ===== Backup with rsync ===== | ||
| rsync -rcpogt / | rsync -rcpogt / | ||
| + | |||
| + | |||
| + | =====Search for text in file===== | ||
| + | grep --after-context=5 --before-context=10 'Nov 12 2012' yourfile.log | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | =====Backup across machines===== | ||
| + | rsync -avpotW / | ||
| + | |||
| + | rsync -avpotW / | ||
| + | |||
| + | rsync -avpotW / | ||
| + | |||
| + | rsync -avpotW / | ||
| + | |||
| + | rsync -avpotW / | ||
| + | |||
| + | rsync -avpotW / | ||
| + | |||
| + | rsync -avpotW / | ||
| + | |||
| + | rsync -avpotW / | ||
| + | |||
| + | |||
| + | =====Copy with scp===== | ||
| + | Copy files from a local computer to a remote computer | ||
| + | |||
| + | scp somefile username@server:/ | ||
| + | |||
| + | Copy files from a remote server to your local computer | ||
| + | |||
| + | scp username@server:/ | ||
| ===== CentOS minimal install ===== | ===== CentOS minimal install ===== | ||
| - | chkconfig --list |grep " | + | |
| + | |||
| + | ===== VBoxManage Commands ===== | ||
| + | VBoxManage snapshot endian take first_boot --pause | ||
| + | |||
| + | ===== search and remove files from directories ===== | ||
| + | find . -type f -name " | ||
| + | ===== Find and replace text in files in a folder===== | ||
| + | sudo find RTPOP* -type f -exec sed -i ' | ||
server/linux_scripts.1350806579.txt.gz · Last modified: (external edit)
