Site Tools


server:linux_scripts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
server:linux_scripts [2012/11/30 16:47] – ashleyserver: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://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2
 +===== Disabling power button under FreeBSD =====
 +
 +  /sbin/sysctl hw.acpi.power_button_state=NONE
  
 ===== Backup with rsync ===== ===== Backup with rsync =====
Line 6: Line 16:
  
  
 +=====Search for text in file===== 
 +  grep --after-context=5 --before-context=10 'Nov 12 2012' yourfile.log
  
  
Line 43: Line 54:
 ===== VBoxManage Commands ===== ===== VBoxManage Commands =====
   VBoxManage snapshot endian take first_boot --pause   VBoxManage snapshot endian take first_boot --pause
 +
 +===== search and remove files from directories =====
 +  find . -type f -name "AlbumAr*" -exec rm -f {} \;
 +===== Find and replace text in files in a folder=====
 +  sudo find RTPOP* -type f -exec sed -i 's/239.216.142/239.216.146/g' {} +
  
  
server/linux_scripts.1354294064.txt.gz · Last modified: (external edit)