User Tools

Site Tools


lx103:notes

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lx103:notes [2024/04/28 10:09]
114.119.155.78 old revision restored (2023/11/15 14:08)
lx103:notes [2024/05/15 22:22] (current)
114.119.138.183 old revision restored (2023/11/13 21:10)
Line 215: Line 215:
   *apt-get install //apache2// - install apache2 + deps from repos.   *apt-get install //apache2// - install apache2 + deps from repos.
   *apt-get upgrade -- upgrades out of date packages.   *apt-get upgrade -- upgrades out of date packages.
 +  *apt-get clean -- cleans up local pkg files, temp files, etc. 
 +  *apt-get autoclean -- only cleans out packages that are no longer avail in our source repo. These can no longer be downloaded and are largely useless files.
 ======top====== ======top======
 ---- ----
Line 457: Line 458:
   *CMD MODE   *CMD MODE
     * hjkl, move L R U D     * hjkl, move L R U D
 +    * 0, SHIFT+0 - move to beginning or END of line.
     * L - Move to last line of TERMINAL, not DOC     * L - Move to last line of TERMINAL, not DOC
     * H - move me to top of term.     * H - move me to top of term.
Line 475: Line 477:
     * ? - search     * ? - search
     * cc = del line + goto insert mode     * cc = del line + goto insert mode
 +    * cw = change word, deletes word and puts you in INSERT mode! Awesome!
 +    * 
 +    * EX MODE
 +    * :%s/HostKey/wahoo - will change first ocurrence of HostKey with wahoo on each line.
 +    * %s/test/wahoo
 +    * %s/test/wahoo/g - change ALLLLL occurrences (thanks /g!)
 +    * :q! - quit
 +    * :wq - write quit
 +    * :w - write
 +    * :r path/to/file - loads contents of that file INTO curr file.
 +    * :!shellCMDhere
 +
 +
 +====== sed Stream Editor ======
 +
 +  *change first occurrence of parttime to promotion.
 +    * sed '0,/parttime/s/parttime/promotion' employees.txt
 +  * change first occur of parttime to fulltime
 +    * sed 's/parttime/fulltime' employees.txt
 +  * change ALL occurrences of parttime to fulltime
 +    * sed 's/parttime/fulltime/g' employees.txt
 +Can move all space to dots, slashes to spaces, etc etc, powerful stuff.
 +RESUME ME, LINUX ACAD VIDEO @4:30m - LEcture, sed Stream Editor!
lx103/notes.1714298972.txt.gz · Last modified: 2024/04/28 10:09 by 114.119.155.78