User Tools

Site Tools


notes:unix

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
notes:unix [2019/02/13 15:46]
bmurphy7 [Notes]
notes:unix [2019/04/14 18:16] (current)
rbintlif [Projects]
Line 6: Line 6:
  
 ======Projects====== ======Projects======
 +**Pct0** ​
 +Letter Division. This project takes elite level concentration and basic knowledge of long division.
 +If you need to review long division this link helps quite a bit: (http://​www.mathdoesntsuck.com/​downloadable/​longdivisionreview.pdf)
 +This project is probably the most frustrating of all.
  
-======URLs======+Here are some tips to help cope: 
 +  * Hydrate! Water is crucial for your brain to operate at peak performance. You will also dehydrate yourself from the tears you shed. 
 +  * Find a healthy way to release stress. You don't want to end up taking out your frustration on others. Try doing some push-ups or screaming into a pillow. 
 +  * Take frequent breaks. This is super important. The more you stare the puzzle the more frustrated you will get. Step away from it, take a walk, take a nap, (if you started early enough) take your time. 
 +  * Drink green tea. The combination of caffeine and l-theanine gives you a nice clear mental boost. 
 +  * Stay calm. It'll be OK.
  
 +======URLs======
 +Helpful for webpage project.
 +[[https://​www.simplehtmlguide.com/​cheatsheet.php]]
 ======Notes====== ======Notes======
  
Line 32: Line 44:
   * cp "name of file you wish to copy" "where you are copying it" - copies the file and put it somewhere if combined with a -R you copy a directory   * cp "name of file you wish to copy" "where you are copying it" - copies the file and put it somewhere if combined with a -R you copy a directory
   * mv "name of file you wish to move" "where to move/new name" - allows you to move a file to a different directory. If in the second argument the name is not a directory it will rename the file to what was imputed."​   * mv "name of file you wish to move" "where to move/new name" - allows you to move a file to a different directory. If in the second argument the name is not a directory it will rename the file to what was imputed."​
 +  * rm "name of file to delete"​- deletes a the file you named if combined with a -rf will delete everything in a directory
 +  * rmdir "​directory to delete"​ - accidentally made directory that you didn't want well here you go you can now delete empty directories
 +  * touch "name of new file" - creates an empty file but you could just...
 +  * vi "name of file you wish to edit/​make"​ - text editor that if given a name of a file that doesn'​t exist will create a new file of name. **NOTE:** this was originally nano, but now we have the best text editor in the world soooooo.....
 +  * cat "name of the file" - prints the contents of the file to standard output. So can be redirected for shenanigans ​
 +  * head/tail "name of file - shows the top/bottom part of file. **NOTE:** if you want to specify the amount of lines from the top/bottom that it shows but a --lines="​number"​ before the name of the file
 +  * less "name of the file" - allows you to scroll up and down through the file. Handy for large text files.
 +  * more "name of the file" - like less, allows you to scroll through a text document but once you hit next page you cannot go back.
 +  * file "name of file" - tells you what kind a file the file is
 +  * man "name of manual page" - handy tool for figuring out how commands work
 +  * rev "name of the file" - to be able to reverse all the text in a file you use 
 +  * wc - gives you the line/​word/​character count
 +  * > - use this change the standard output of a command
 +  * >> - use this to append a file to another file.
 +  * apropos "​command/​relation to a command"​ - used to find a command or something similar to what was typed in
 +  * tr "​character 1" "​character 2" - translates character one into character 2
 +  * sort "file to sort" - sorts a file numerically/​alphabetically
 +  * grep "​text"​ "​file"​ - grabs text you asked for from the file
  
 +Control (Ctrl or ^) Commands:\\
 +  * ^a - sends cursor to the start of the line
 +  * ^e - sends cursor to the end of the line
 +  * ^f - moves cursor forward once
 +  * ^b - moves cursor backwards once
 +  * ^k - delete everything in front of the cursor
 +  * ^u - delete everything behind the cursor
 +  * ^q turn the transmit ability of the terminal back on.
 +
 +
 +__//​**VI**//​__\\
 +//(the greatest text editor known to man...)//\\
 +//​(apparently)//​\\
 +
 +-'vi (filename)' ​ starts editing\\
 +-'vi (line number) (filename)'​ this will open the file on that line\\
 +
 +
 +Vi is a moded editing system, invented before the mouse and when keyboards had less keys.\\
 +
 +
 +**Modes**\\
 +
 +__Command mode__\\
 +- This is the starting mode\\
 +- All other modes are accessed from here\\
 +- Escape usually brings you here\\
 +- Nearly every key stands for a command\\
 +- (see below for commands)\\
 +
 +__Insert mode__\\
 +Typing of text happens in this mode\\
 +These are some ways to start insert mode from command mode:\\
 +-'​i'​ starts insert mode (starts before the current cursor position)\\
 +-'​I'​ starts insert mode (starts the cursor at the beginning of the line)\\
 +-'​a'​ starts insert mode (starts after where the cursor is)\\
 +-'​A'​ starts insert mode (starts the cursor at the end of a line)\\
 +-'​o'​ starts insert mode (starts by creating a new line under the cursor line)\\
 +-'​O'​ starts insert mode (starts by creating a new line above the cursor line)\\
 +
 +
 +__Other Commands__\\
 +-'​v'​ for visual mode (for selecting large portions visually)\\
 +-'/'​ starts a search (like a man page)\\
 +-'​h'​ moves cursor left\\
 +-'​j'​ moves down\\
 +-'​k'​ moves up\\
 +-'​l'​ move right\\
 +-'​w'​ moves right one word (w counts . : and the like, but W only spaces) [e does the same but to the end of the word]\\
 +-'​b'​ moves back a word (b, B like w and W)\\
 +-'​{'​ and '​}'​ navigates by paragraph\\
 +-'​(number)G'​ goes to that line number\\
 +-'​~'​ toggles the case where the cursor is\\
 +
 +-'​yy'​ yank line (copy, there are multiple buffers use "​(letter) to select)\\
 +-'​dd'​ cut line\\
 +-'​cc'​ change line\\
 +-'​p' ​ is paste (P like o and w)\\
 +-'​x' ​ deletes by character\\
 +'​y',​ '​c'​ and '​d'​ can be used to do by any amount (word line etc)\\
 +i.e. #yl yanks # of characters to the right\\
 +-'​.'​ repeats the last command\\
 +-':​wq'​ saves and exits\\
 +-':​q!'​ exits without saving\\
 +
 +You can prefix many of these commands (i.e. with numbers for repitition)\\
 +
 +=====EXTRA=====
 +
 +https://​til.hashrocket.com/​posts/​2fdb6afb66-difference-between-wq-and-x
 +
 +Difference Between :wq and :x
 +
 +The :wq command is used in Vim to write and quit. The contents of the buffer are written to disk for the associated file and then the Vim session is terminated. So, what is the difference between this and the :x command. The Vim help files give the following description of the :x command:
 +
 +    Like “:wq”, but write only when changes have been made.
 +
 +So, :wq writes the buffer to disk either way, whereas :x just exits if the buffer hasn’t changed. Either way the contents of the resulting file are going to be the same. So what’s the difference?
 +
 +Modification time.
 +
 +If you :x a buffer that hasn’t changed, the modification time will be untouched because the file isn’t re-saved. The :wq command will alter the modification time no matter what.
 +
 +This matters if the modification time is used by anything. For instance, a background process that monitors a directory for changed files based on modification times will get some false positives if you use :wq too liberally.
 +
 +=====HTML Tips and Tricks=====
 +
 +If in html and trying to make a webpage then use f12 or pages already made and you can see code already done. This can give examples very quickly of what you can do in an html page or how to do something in an html page.
  
 ======Login Problems====== ======Login Problems======
Line 63: Line 181:
 =====DokuWiki wrap plugin===== =====DokuWiki wrap plugin=====
 http://​www.dokuwiki.org/​_media/​plugin:​wrap_plugin_example2.png http://​www.dokuwiki.org/​_media/​plugin:​wrap_plugin_example2.png
 +
 +<WRAP important>​ The Link above provides fun ways to jazz up a Wiki page. </​WRAP>​
notes/unix.1550090816.txt.gz · Last modified: 2019/02/13 15:46 by bmurphy7