User Tools

Site Tools


user:jkendal6:start

Differences

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

Link to this comparison view

Next revision
Previous revision
user:jkendal6:start [2017/08/30 20:49] – created jkendal6user:jkendal6:start [2017/10/26 17:57] (current) jkendal6
Line 1: Line 1:
-Basic commands to move around in UNIX.+__Basic commands to move around in UNIX.__
  
 Move a File: mv filename directorypath Move a File: mv filename directorypath
Line 7: Line 7:
 rename a file: mv filename newfilename rename a file: mv filename newfilename
  
 +--------------------------------------------------------------------------
  
 +
 +__compression notes :__
 +
 +to do a zip extract: “unzip filename.zip” (files within should come out exported to the current directory.)
 +
 +Tar is an archive format that can do .tar, .tar.gz, .tar.bz2, and .tar.xz
 +
 +Extract .tar: tar -xvf file.tar
 +
 +Extract .tar.gz: tar -xzvf file.tar.gz
 +
 +Extract .tar.bz2: tar -xjvf file.tar.bz2
 +
 +Extract .tar.xz: tar -xJvf file.tar.xz (Doing a J instead of j will signal its a .xz end.)
 +
 +To create any .tar file compression: tar -cvf file.tar(add .gz, .bz2, .xz) /file directory to encapsulate
 +
 +What the letters mean in before the file export.
 +
 +- x means to extract a tar file
 +
 +- v means show progress while extracting
 +
 +- f means specify an archive/file
 +
 +- j extract a .bz2 file
 +
 +- J extract a .xz file
 +
 +- decompress files of a .gz extension
 +
 +--------------------------------------------------------------------------
 +
 +__Variables__
 +
 +Set the variable: t=“what” (so it saves)
 +
 +Execute and see it: echo “$t” (should say what t was set to)
 +
 +--------------------------------------------------------------------------
 +
 +__Text Manipulation__
 +
 +Rev command (Reverses text in a file): rev filename > exportedfile
 +
 +Tac Command (flips the text from up to down. Usually helps if your document looks upside down)
 +
 +tac: tac filename > exportfilename
 +
 +
 +--------------------------------------------------------------------------
 +__Wild Cards__
 +
 +Symbols that represent different symbols.
 +
 +__Wild card symbols__
 +
 +- * - Kleene Star; match 0 or more symbols.
 +
 +- ? - Match 1 of any symbol
 +
 +- [] - Character class; match 1 of any of enclosed symbols.
 +
 +- [^]- Inverted character class; do not match 1 of any of enclosed symbols.
 +
 +--------------------------------------------------------------------------
 +
 +
 +__Cut Command__
 +
 +If you wanted a specific row to cut out of a text document.
 +
 +cut -c x (x meaning how many bits) filename > export filename
 +
 +-------------------------------------------------------------------------
 +
 +__Head Command__
 +
 +This is to show parts of the document from the top end.
 +
 +head -n x (x meaning how many rows to show from the top) filename > export.
 +
 +-------------------------------------------------------------------------
 +
 +__Tail Command__
 +
 +To show text or data in a document to show from bottom of the document to the specified row height.
 +
 +tail -n x (x meaning how many rows to show from the bottom) filename >export
 +
 +------------------------------------------------------------------------
 +
 +__get any conversions to a different base.__
 +
 +For base 2. (binary)
 +
 +command : echo “obase=2;[number]” | bc
 +
 +For base 8. (octal)
 +
 +command : echo “obase=8;[number]” | bc
 +
 +For base 10. (decimal)
 +
 +command : echo “obase=10;[number]” | bc
 +
 +For base 16. (hexidecimal)
 +
 +command : echo “obase=16;[number]” | bc
 +
 +---------------------------------------------------------------------
 +
 +__chmod utilities__
 +
 +__MAKE A FILE AN EXECUTABLE__
 +
 +command : chmod 0700 filename
 +
 +__Make a file readable__
 +
 +command : chmod 0600 filename
 +
 +-----------------------------------------------------------------------
  
  
user/jkendal6/start.1504126186.txt.gz · Last modified: 2017/08/30 20:49 by jkendal6