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 17:16]
114.119.149.71 old revision restored (2023/10/18 09:06)
lx103:notes [2024/05/15 08:26] (current)
114.119.141.71 old revision restored (2023/10/12 20:39)
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. +
-  *apt-get install -s php5 -- -s says simulate install php5. useful! +
-  *apt-get install -y php5 -- will auto input YES on prompts. +
-  *apt-get install -y -q php5 -- -q omits some terminal output. +
-  *apt-get source php5 -- this will download the source files php5 and not the PACKAGE php5.+
 ======top====== ======top======
 ---- ----
Line 447: Line 442:
 ---- ----
   *Xorg -configure  -- Runs xorg config to generate generic xorg conf to get X running again!   *Xorg -configure  -- Runs xorg config to generate generic xorg conf to get X running again!
- 
-====== Find and Locate ====== 
-Both used to search for files. //locate// uses a database of information to search and is updated via a syscron or manual updatedb. //find// will search the disk in specified locations for files and objects. 
- 
-  *locate motd 
-    * searches for motd. 
-    * may not be installed by default: apt-get install locate, yum install mlocate  
-  * find /etc -name motd 
-    * search in /etc for files containing motd. 
- 
-====== VIM / VI Text Editor ====== 
-Light, installed on most machines. 
- 
-  *CMD MODE 
-    * 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 
-    * H - move me to top of term. 
-    * G - move to last line in file 
-    * 1G - moves to first line of file. 
-    * 40G - goto line 40 
-    * :40 - also goto line 40 
-    * yy - yank/cp line 
-    * p - paste 
-    * P - paste on line before the cursor  
-    * u - undo 
-    * 5yy - yank 5 lines 
-    * / - search for text 
-    * n - continue forward in search 
-    * N - go backwards in search 
-    * dd - cut line 
-    * 5dd - cut 5 lines 
-    * ? - search 
-    * 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.1714324595.txt.gz · Last modified: 2024/04/28 17:16 by 114.119.149.71 · Currently locked by: 114.119.149.71,10.179.80.158