Linux Adviser Using the carapace
| |
22 September 09:31
; For advice about a command, try man which will accompany up the chiral for it. Agenda that some command are body in your carapace and do not accept a man page, use your analyst centralized command (should be advice ).
Copy agenda options:
$cp -frvp /source /destination
^ ^^^^ ^ ^
| |||| | ----------- Aisle from basis is best
| |||| -------------------- Aisle to archetype from basis best
| ||||
| |||| Advantage FLAGS----------------
| |||------------------------- Accumulate permissions
| ||-------------------------- Verbose
| |--------------------------- Recursive files and folders
| ---------------------------- Force
| ----------------------------
-------------------------------- Archetype command
cp assay test
-copy book called assay to agenda called test
cp assay .
-copy book called assay to accepted agenda (note aeon at end of command line)
cp prod/p -copy all files alpha with p to letters directory
-can about-face p
Copy img to floppy:
dd bs=2x80x18b if=/dev/fd0 of=/tmp/floppy.img
Copy antecedent to create img:
dd if=/dev/cdrom of=filename.iso
^------^_________ alter with book name
Abolish directory:
$rm -frv /dir
^ ^^^ ^
| ||| ---------------------- Abolish directory
| |||
| ||| OPTIONS--------------------
| ||-------------------------- Verbose
| |--------------------------- Recursively through all dir
| ---------------------------- Force
| ---------------------------
|
-------------------------------- Abolish command
rm rm -r <- Annul agenda and contents
Command options for permissions
r = read
w = write
x = execute
X = assassinate alone if user already has execute
s = set user or accumulation id on execution
t = adhesive +
u = permission accepted to user who owns file
g = permissions accepted to accumulation members
o = permissions accepted to users additional than u or g
format:
drwxrwxrwx
^^^^^^^^^^
||||||||||
|||||||\----------- additional users
|||||||
||||\-------------- group
||||
|\----------------- owner
|
-------------------- agenda = d (possible: -, b, c, q)
Octal Method: chmod
permissions
4 = apprehend examples: 7 = 4+2+1 will appearance rwx
2 = address 6 = 4+2 will appearance rw-
1 = assassinate 5 = 4+1 will appearance r-x
Usage: chmod 755 FileName <--- change book permissions
Usage: chmod -R 755 DirectoryName <--- change agenda permissions recursively
will appearance permissions -rwxr-xr-x
Note: first appearance in permissions appearance what affectionate of file
- = file
d = directory
b, c, or q = accessory files
Usage format:
chmod -R ugoa =+- rwx filename
^ ^^^^ ^^^ ^^^ ^
| |||| ||| ||| |
| |||| ||| ||| ---------- book or directory
| |||| ||| ||| -----------------------------------
| |||| ||| ||---------------- Execute
| |||| ||| |----------------- Write
| |||| ||| ------------------ Read
| |||| ||| -----------------------------------
| |||| ||-------------------- Remove
| |||| |--------------------- Add
| |||| ---------------------- assign
| |||| -----------------------------------
| |||------------------------ All s = adhesive bit
| ||------------------------- Others (set usr/grp on execution)
| |-------------------------- Group
| --------------------------- User
| -----------------------------------
----------------------------- Recursively through all directories
-----------------------------------
Usage: chmod g+w filename
VI/M uses 2 modes in which to action text. To action the assorted commands available
use the key. To admit argument artlessly blazon i to acknowledgment to argument admit mode.
For Starters/Basics------------------------
Alpha Vi >vi
Admit approach i
Command approach
Save doc :w
Abdicate app :q
Usage: :wq
Navigation------------------------------
Appropriate l
Larboard h
up k
Down j
----------------------------------------
Sort all
:1,$ !sort
Replace text
:1,$s /and/AND/g
^^^^^ ^ ^ ^
||||| | | |
||||| | | ----------- Globally
||||| | -------------- Alter with
||||| ------------------ Find
|||||
||||---------------------- acting for text
|||----------------------- To endure line
||------------------------ separator
|------------------------- From band 1
-------------------------- : abettor to alpha command processing
Advantageous tid bit to abolish EOL characters from DOS book
:%s/^M$//
Baddest Ranges
:1,$ = All curve in file
:1,. = All curve from alpha of book to accepted (included)
:.,$ = All curve from accepted to end of book (inclusive)
:.-2 = Individual band 2 curve afore accepted line
:10,20 w abc = Address curve 10,20 to new book abc
:r abc = Reads capacity of book abc into alive file
:10,20d = Annul block curve 10 ~ 20
See Band Numbers
:set amount to attenuate :set nonumber
Write curve to new file
:1,10w abc
Change alive book from accepted to book abc
:e abc
Read abc book into alive book afterwards cursor
:r abc
Execute command from prompt
:!cmd
Archetype -> :r !date
Enable syntax advantage for programming antecedent argument highlighting
:syntax accredit To attenuate = :syntax off
VI Aeronautics
0 = Move to alpha of line
G = Go to end of file
5G = Move to alpha of 5th line
u = Undo
. = Echo endure command
x = Annul character
dd = Annul line
dw = Annul word
d$ = Annul from cursor to end of line
$ then J = Join/append afterward band with current
$ then a = Adjoin ascribe at end of line
A = Adjoin ascribe at end of band
i = Admit argument at cursor
/ = Basal of awning blazon seek cord and will move
cursor to first occurance
Work from Back-bite Prompt:
lpr -P //PrintServer/PrinterName book name
Additional options:
-# Amount of copies
-c Create archetype afore print
lpq -P PrinterName : Displays printer cachet report
lprm 4 : Removes job #4 from printer
pr : Formats, paginates, prints header
OPTIONS
-d : armament bifold spacing
-h : Adapt header
-l : Change amount of curve per page | default=66
example: pr barter | lpr book book customers>
example: lprm 1006
lpstat -s
ex: lp -n 2 all files
ex: lp -n 3 all files -d a3printer
ex: lpstat -d a3printer
See also: CUPS
; Deejay amplitude usage: du -h : lists an appraisal of absolute amplitude acceptance for anniversary subdirectory begin in and the estimated admirable absolute deejay amplitude used
; book Arrangement (mounted) Disks amplitude usage: df : lists all army disks and blocks total, used, free, and analytic deejay name
;df . : lists alone accepted alive army disk, announcement total, used, chargeless in blocks.
;df -h : lists all army disks total, used, free, and analytic deejay name in animal agreement (KB,MB,GB,TB).
;df -kh : lists all army disks total, used, chargeless and analytic deejay name in animal agreement (KB, MB, GB, TB) and amplitude acclimated in % (percentages) option.
; Account partitions: fdisk -l : account all partitions on a harder drive e.g. fdisk -l /dev/hda
; For advice about a command, try man
Copy agenda options:
$cp -frvp /source /destination
^ ^^^^ ^ ^
| |||| | ----------- Aisle from basis is best
| |||| -------------------- Aisle to archetype from basis best
| ||||
| |||| Advantage FLAGS----------------
| |||------------------------- Accumulate permissions
| ||-------------------------- Verbose
| |--------------------------- Recursive files and folders
| ---------------------------- Force
| ----------------------------
-------------------------------- Archetype command
cp assay test
-copy book called assay to agenda called test
cp assay .
-copy book called assay to accepted agenda (note aeon at end of command line)
cp prod/p -copy all files alpha with p to letters directory
-can about-face p
Copy img to floppy:
dd bs=2x80x18b if=/dev/fd0 of=/tmp/floppy.img
Copy antecedent to create img:
dd if=/dev/cdrom of=filename.iso
^------^_________ alter with book name
Abolish directory:
$rm -frv /dir
^ ^^^ ^
| ||| ---------------------- Abolish directory
| |||
| ||| OPTIONS--------------------
| ||-------------------------- Verbose
| |--------------------------- Recursively through all dir
| ---------------------------- Force
| ---------------------------
|
-------------------------------- Abolish command
rm rm -r <- Annul agenda and contents
Command options for permissions
r = read
w = write
x = execute
X = assassinate alone if user already has execute
s = set user or accumulation id on execution
t = adhesive +
u = permission accepted to user who owns file
g = permissions accepted to accumulation members
o = permissions accepted to users additional than u or g
format:
drwxrwxrwx
^^^^^^^^^^
||||||||||
|||||||\----------- additional users
|||||||
||||\-------------- group
||||
|\----------------- owner
|
-------------------- agenda = d (possible: -, b, c, q)
Octal Method: chmod
permissions
4 = apprehend examples: 7 = 4+2+1 will appearance rwx
2 = address 6 = 4+2 will appearance rw-
1 = assassinate 5 = 4+1 will appearance r-x
Usage: chmod 755 FileName <--- change book permissions
Usage: chmod -R 755 DirectoryName <--- change agenda permissions recursively
will appearance permissions -rwxr-xr-x
Note: first appearance in permissions appearance what affectionate of file
- = file
d = directory
b, c, or q = accessory files
Usage format:
chmod -R ugoa =+- rwx filename
^ ^^^^ ^^^ ^^^ ^
| |||| ||| ||| |
| |||| ||| ||| ---------- book or directory
| |||| ||| ||| -----------------------------------
| |||| ||| ||---------------- Execute
| |||| ||| |----------------- Write
| |||| ||| ------------------ Read
| |||| ||| -----------------------------------
| |||| ||-------------------- Remove
| |||| |--------------------- Add
| |||| ---------------------- assign
| |||| -----------------------------------
| |||------------------------ All s = adhesive bit
| ||------------------------- Others (set usr/grp on execution)
| |-------------------------- Group
| --------------------------- User
| -----------------------------------
----------------------------- Recursively through all directories
-----------------------------------
Usage: chmod g+w filename
VI/M uses 2 modes in which to action text. To action the assorted commands available
use the
For Starters/Basics------------------------
Alpha Vi >vi
Admit approach i
Command approach
Save doc :w
Abdicate app :q
Usage: :wq
Navigation------------------------------
Appropriate l
Larboard h
up k
Down j
----------------------------------------
Sort all
:1,$ !sort
Replace text
:1,$s /and/AND/g
^^^^^ ^ ^ ^
||||| | | |
||||| | | ----------- Globally
||||| | -------------- Alter with
||||| ------------------ Find
|||||
||||---------------------- acting for text
|||----------------------- To endure line
||------------------------ separator
|------------------------- From band 1
-------------------------- : abettor to alpha command processing
Advantageous tid bit to abolish EOL characters from DOS book
:%s/^M$//
Baddest Ranges
:1,$ = All curve in file
:1,. = All curve from alpha of book to accepted (included)
:.,$ = All curve from accepted to end of book (inclusive)
:.-2 = Individual band 2 curve afore accepted line
:10,20 w abc
:r abc
:10,20d
See Band Numbers
:set amount to attenuate :set nonumber
Write curve to new file
:1,10w abc
Change alive book from accepted to book abc
:e abc
Read abc book into alive book afterwards cursor
:r abc
Execute command from prompt
:!cmd
Archetype -> :r !date
Enable syntax advantage for programming antecedent argument highlighting
:syntax accredit To attenuate = :syntax off
VI Aeronautics
0 = Move to alpha of line
G = Go to end of file
5G = Move to alpha of 5th line
u = Undo
. = Echo endure command
x = Annul character
dd = Annul line
dw = Annul word
d$ = Annul from cursor to end of line
$ then J = Join/append afterward band with current
$ then a = Adjoin ascribe at end of line
A = Adjoin ascribe at end of band
i = Admit argument at cursor
/ = Basal of awning blazon seek cord and
cursor to first occurance
Work from Back-bite Prompt:
lpr -P //PrintServer/PrinterName book name
Additional options:
-# Amount of copies
-c Create archetype afore print
lpq -P PrinterName : Displays printer cachet report
lprm 4 : Removes job #4 from printer
pr : Formats, paginates, prints header
OPTIONS
-d : armament bifold spacing
-h : Adapt header
-l : Change amount of curve per page | default=66
example: pr barter | lpr
example: lprm 1006
lpstat -s
ex: lp -n 2 all files
ex: lp -n 3 all files -d a3printer
ex: lpstat -d a3printer
See also: CUPS
; Deejay amplitude usage: du -h
; book Arrangement (mounted) Disks amplitude usage: df : lists all army disks and blocks total, used, free, and analytic deejay name
;df . : lists alone accepted alive army disk, announcement total, used, chargeless in blocks.
;df -h : lists all army disks total, used, free, and analytic deejay name in animal agreement (KB,MB,GB,TB).
;df -kh : lists all army disks total, used, chargeless and analytic deejay name in animal agreement (KB, MB, GB, TB) and amplitude acclimated in % (percentages) option.
; Account partitions: fdisk -l
|
command, directory, remove, named, shell, , file named exam, linux guide using, |
Also see ...
Linux Adviser Booting
When a computer is angry on, it commonly begins the action of booting by account software from the systems harder deejay (or additional [http://en.wikipedia.org/wiki/Non volatile_storage non volatile storage] medium), and loading into it anamnesis and then active it. In this action the atom is l
When a computer is angry on, it commonly begins the action of booting by account software from the systems harder deejay (or additional [http://en.wikipedia.org/wiki/Non volatile_storage non volatile storage] medium), and loading into it anamnesis and then active it. In this action the atom is l
Linux Adviser Freezes
This page describes how to get out of problems if programs go wrong. The alotof accepted way is by killing the process: that is acclimation it to stop. If you annihilate a process, youll apparently lose any unsaved data on the process, and on any processes it has spawnedThis page aswell describe
This page describes how to get out of problems if programs go wrong. The alotof accepted way is by killing the process: that is acclimation it to stop. If you annihilate a process, youll apparently lose any unsaved data on the process, and on any processes it has spawnedThis page aswell describe