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 [2013/11/09 11:03] – external edit 127.0.0.1server: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 ===== ===== Disabling power button under FreeBSD =====
   
Line 10: Line 16:
  
  
 +=====Search for text in file===== 
 +  grep --after-context=5 --before-context=10 'Nov 12 2012' yourfile.log
  
  
Line 50: Line 57:
 ===== search and remove files from directories ===== ===== search and remove files from directories =====
   find . -type f -name "AlbumAr*" -exec rm -f {} \;   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.1383994981.txt.gz · Last modified: (external edit)