Тут нада чота умное напейсать! Шоб сказал, как отрезал! Но чота ничо не приходит вголову, сцуко (( :D
читать дальшеproc/interrupts
proc/ioports
proc/dma
proc/usb
proc/pci
lsmod
modprobe
lscpu
lspci
lsscsi (packet lsscsi)
lsdev (packet procinfo)
lsraid --
lsusb
lsblk
LD_LIBRARY_PATH
ld.so линкер
ldconfig строит /etc/ld.so.cache - бинарь с описанием библиотек
dpkg --info инфа о неустановленном пакете (типы файлов, сколько их и т.д.)
dpkg -i --install установка
dpkg -r --remove удаление с сохранением конфигов
dpkg -P --purge удаление вместе с конфигами
dpkg --force-reinstreq удаление сломанного пакета, который требует реинсталляции
dpkg --install --force-depends превращает сообщения об ошибка в warnings, таким образом пакет может быть установлен
dpkg --force-remove-essential
dpkg --install pkgname --force-conflicts
dpkg -l --list выдаёт список установленных пакетов по шаблону или инфу об установленном пакете
dpkg -s --status как в инфо, токо сокращённый вывод
dpkg -L --listfiles список файлов пакета
dpkg -S --search file ищет какому пакету принадлежит файл
dpkg-reconfigure pkgname повторно выполняет пост-инсталляционные настройки, если они были
apt-get install
/etc/apt/sources.list
/etc/apt/sources.list.d
apt-get update обновить кэш
apt-cache search term ищет пакеты, совпадающие с категорией
apt-cache show pkgname показывает инфу о пакете, включая описание и зависимости
apt-cache showpkg pkgname более развёрнуто, чем предыдущее
apt-get upgrade
apt-get upgrade --only-upgrage
apt-get dist-upgrade обновляет все пакеты, может удалять some minor packages при апгрейде, чтобы устранить проблемы с зависимостями, в то время как upgrade в этом случае пишет fail
apt-get remove
apt-get purge
graphical managets: aptitude (in text-mode) & synaptic
/var/lib/rpm
rpm --rebuilddb
rpm -i --install
rpm --replacefiles
rpm --force
rpm -q --query pkgname
rpm -qi pkgname = query with more info
rpm -ql pkgname = query list of files
rpm -qil for installed packages
rpm -qilp for uninstalled packages
rpm -q --changelog pkgname
rpm -qc pkgname query conf files
rpm -R --requires = show dependencies
rpm -qRp pkgname
rpm -qf file = package from which the file
rpm -a --all
rpm -K --checksig
rpm -V --verify
rpm -U --upgrade = update latest version, remove all the other versions
rpm -F =freshening
rpm -e --erase --allmatches
rpm -e --nodeps rpm -i --nodeps
yum install
yum -y install
yum install --downloadonly
yumdownloader --source
yumdownloader --urls
yumdownloader --resolve
yumdownloader --destdir
yum check-update
yum update pkgname
yum update - updates all
yum list pkgname = searches pkg if you know pkgname
yum search "template" = searches pkg by part of name
/etc/yum.conf
/etc/yum/repos.d
yum --enablerepo reponame
source sсript = . sсript
/etc/profile then ~/.bash_profile or ~/.bash_login or ~/.profile then ~/.bashrc
~/.bash_logout
bash_profile = variables code & settings
bashrc = ?
-f filename option shouldn't be separated
HISTFILE HISTCMD HISTCONTROL=ignorespace | ignoredups HISTSIZE
shopt=set
set -o option=on set +o = off
Bash options emacs | vi history hashall monitor noclobber noexec notify verbose
/root & /home optional
/opt not sharable /usr sharable
\ls ignore any aliases
type ls = types aliases
which -a file shows all the files not only first match
tar (ctx) v (zj) f filename
find . "*" | cpio -o > archive.cpio
subsitution: `command` or $(command)
tee
xargs
sort sort +1 -n -r
nl nl -ba
wc -l -w -c
expand
cut -c -d -f
paste
join
uniq -u -d -D
head -n
tail -n -f
split -a# -b# -c# -l# #=b k m
tac
od -a -o -d -x -f
reset
strings
pr
fmt
tr from to [^x] ^... ...$ ^...$=3 characters [abc]
ps
pstree
free -h --lohi
/proc/meminfo
uptime
ctrl+c=sigint=2
ctrl+z=sigtstp=20
sigstop=19
sigkill=9
sighup=1 reload conf -hup
kill default 15 =sigterm
killall procname
pkill
pgrep
ctrl+z suspend
ctrl+\ sigquit
ctrl+p=previous command (uparrow)
nice (def 10) -n 10
renice
top d1 i space h k n r R; top -o -b=batch -s = subject
/etc/toprc .toprc
nohup
screen ctrl+a
vi + option
j down k up h left l right
:1G begin :G end
Ctrl+f fp Ctrl+b bp Ctrl+d fhp Ctrl+u bhp
Ctrl+G show info
undo u :e!
quit ZZ :x :wq :wq! :q :q!
cw change word
c$ change until eol
r replace 1 sym
R replace text on current line
:X sym berore cur :x sym after cur
:dd current line
:dw word
" src="static.diary.ru/picture/1131.gif"> from cur to eol
:dL from cur to the end of screen
:dG from cur to eof
:d^ from cur to begin
:yy line
:yw word
p paste after cur
P paste before cur
"ayy copy to a-buffer
"Ayy append to a-buffer
search / forw ? backw
/etc/vimrc ~/.vimrc
:set options
:se number? :se nonumber :se number
/\c modifier
:! run :!ls -l
J joining second line
:split :vsplit :ctrl+w + arrow
:close or :only
:vimdiff file1 file2
vim -o file1 file2 =
vim -O file1 file2 ||
fdisk p n d
gdisk
sfdisk
parted
83 8300 Linux
82 8200 Swap
8e 8e00 LVM
stat file
debugfs
df -i ls -i
mkfs.fstype = mkisofs mke2fs mknod mkraid mkswap mkfs.(ext2,3,4 vfat fat msdos ntfs xfs cramfs btrfs minix hfsplus ext4dev)
dumpe2fs -h /dev/ ? open features stats ls pwd undelete logdump quit
fsck = e2fsck etc
fsck -A =through /etc/fstab -C=progress bar -N=dru run -V=verbose -a=quietly -f even if clean
pass1 inodes, blocks, sizez
pass2 directory structure
pass3 directory connectivity
pass4 reference counts
pass5 group summary information
tune2fs -e error checking -g group to root
mkfs -t xfs log option
xfs_info
xfs_check xfs_repair xfs_metadump
xfs_growfs
xfs_fsr = defrag
blkid
/etc/fstab
/etc/mtab
/proc/mounts
mount -a=all from fstab -f fakes -r read-only -w write mode -n without updating mtab -L mount by label -o remount
umount
fuser -m /dev/fs = search files opened at fs
du -h human -s summ -x local fs only
df=filesystems -h human -l local fs -k kb -m mb -i inodes
quotaon quotaoff quotacheck -avugc
edquota = edit quota amounts edquota -u user -t grace period
quota =used by users to watch their quota
aquota.user aquota.group binary files
usrquota, grpquota =/etc/fstab options
soft limit can be exceeded for grace period
Hard limit can't be exceeded
repquota -a =report about all users
10 289
11 311
12 339
13 365
14 397
15 419
proc/ioports
proc/dma
proc/usb
proc/pci
lsmod
modprobe
lscpu
lspci
lsscsi (packet lsscsi)
lsdev (packet procinfo)
lsraid --
lsusb
lsblk
LD_LIBRARY_PATH
ld.so линкер
ldconfig строит /etc/ld.so.cache - бинарь с описанием библиотек
dpkg --info инфа о неустановленном пакете (типы файлов, сколько их и т.д.)
dpkg -i --install установка
dpkg -r --remove удаление с сохранением конфигов
dpkg -P --purge удаление вместе с конфигами
dpkg --force-reinstreq удаление сломанного пакета, который требует реинсталляции
dpkg --install --force-depends превращает сообщения об ошибка в warnings, таким образом пакет может быть установлен
dpkg --force-remove-essential
dpkg --install pkgname --force-conflicts
dpkg -l --list выдаёт список установленных пакетов по шаблону или инфу об установленном пакете
dpkg -s --status как в инфо, токо сокращённый вывод
dpkg -L --listfiles список файлов пакета
dpkg -S --search file ищет какому пакету принадлежит файл
dpkg-reconfigure pkgname повторно выполняет пост-инсталляционные настройки, если они были
apt-get install
/etc/apt/sources.list
/etc/apt/sources.list.d
apt-get update обновить кэш
apt-cache search term ищет пакеты, совпадающие с категорией
apt-cache show pkgname показывает инфу о пакете, включая описание и зависимости
apt-cache showpkg pkgname более развёрнуто, чем предыдущее
apt-get upgrade
apt-get upgrade --only-upgrage
apt-get dist-upgrade обновляет все пакеты, может удалять some minor packages при апгрейде, чтобы устранить проблемы с зависимостями, в то время как upgrade в этом случае пишет fail
apt-get remove
apt-get purge
graphical managets: aptitude (in text-mode) & synaptic
/var/lib/rpm
rpm --rebuilddb
rpm -i --install
rpm --replacefiles
rpm --force
rpm -q --query pkgname
rpm -qi pkgname = query with more info
rpm -ql pkgname = query list of files
rpm -qil for installed packages
rpm -qilp for uninstalled packages
rpm -q --changelog pkgname
rpm -qc pkgname query conf files
rpm -R --requires = show dependencies
rpm -qRp pkgname
rpm -qf file = package from which the file
rpm -a --all
rpm -K --checksig
rpm -V --verify
rpm -U --upgrade = update latest version, remove all the other versions
rpm -F =freshening
rpm -e --erase --allmatches
rpm -e --nodeps rpm -i --nodeps
yum install
yum -y install
yum install --downloadonly
yumdownloader --source
yumdownloader --urls
yumdownloader --resolve
yumdownloader --destdir
yum check-update
yum update pkgname
yum update - updates all
yum list pkgname = searches pkg if you know pkgname
yum search "template" = searches pkg by part of name
/etc/yum.conf
/etc/yum/repos.d
yum --enablerepo reponame
source sсript = . sсript
/etc/profile then ~/.bash_profile or ~/.bash_login or ~/.profile then ~/.bashrc
~/.bash_logout
bash_profile = variables code & settings
bashrc = ?
-f filename option shouldn't be separated
HISTFILE HISTCMD HISTCONTROL=ignorespace | ignoredups HISTSIZE
shopt=set
set -o option=on set +o = off
Bash options emacs | vi history hashall monitor noclobber noexec notify verbose
/root & /home optional
/opt not sharable /usr sharable
\ls ignore any aliases
type ls = types aliases
which -a file shows all the files not only first match
tar (ctx) v (zj) f filename
find . "*" | cpio -o > archive.cpio
subsitution: `command` or $(command)
tee
xargs
sort sort +1 -n -r
nl nl -ba
wc -l -w -c
expand
cut -c -d -f
paste
join
uniq -u -d -D
head -n
tail -n -f
split -a# -b# -c# -l# #=b k m
tac
od -a -o -d -x -f
reset
strings
pr
fmt
tr from to [^x] ^... ...$ ^...$=3 characters [abc]
ps
pstree
free -h --lohi
/proc/meminfo
uptime
ctrl+c=sigint=2
ctrl+z=sigtstp=20
sigstop=19
sigkill=9
sighup=1 reload conf -hup
kill default 15 =sigterm
killall procname
pkill
pgrep
ctrl+z suspend
ctrl+\ sigquit
ctrl+p=previous command (uparrow)
nice (def 10) -n 10
renice
top d1 i space h k n r R; top -o -b=batch -s = subject
/etc/toprc .toprc
nohup
screen ctrl+a
vi + option
j down k up h left l right
:1G begin :G end
Ctrl+f fp Ctrl+b bp Ctrl+d fhp Ctrl+u bhp
Ctrl+G show info
undo u :e!
quit ZZ :x :wq :wq! :q :q!
cw change word
c$ change until eol
r replace 1 sym
R replace text on current line
:X sym berore cur :x sym after cur
:dd current line
:dw word
:dL from cur to the end of screen
:dG from cur to eof
:d^ from cur to begin
:yy line
:yw word
p paste after cur
P paste before cur
"ayy copy to a-buffer
"Ayy append to a-buffer
search / forw ? backw
/etc/vimrc ~/.vimrc
:set options
:se number? :se nonumber :se number
/\c modifier
:! run :!ls -l
J joining second line
:split :vsplit :ctrl+w + arrow
:close or :only
:vimdiff file1 file2
vim -o file1 file2 =
vim -O file1 file2 ||
fdisk p n d
gdisk
sfdisk
parted
83 8300 Linux
82 8200 Swap
8e 8e00 LVM
stat file
debugfs
df -i ls -i
mkfs.fstype = mkisofs mke2fs mknod mkraid mkswap mkfs.(ext2,3,4 vfat fat msdos ntfs xfs cramfs btrfs minix hfsplus ext4dev)
dumpe2fs -h /dev/ ? open features stats ls pwd undelete logdump quit
fsck = e2fsck etc
fsck -A =through /etc/fstab -C=progress bar -N=dru run -V=verbose -a=quietly -f even if clean
pass1 inodes, blocks, sizez
pass2 directory structure
pass3 directory connectivity
pass4 reference counts
pass5 group summary information
tune2fs -e error checking -g group to root
mkfs -t xfs log option
xfs_info
xfs_check xfs_repair xfs_metadump
xfs_growfs
xfs_fsr = defrag
blkid
/etc/fstab
/etc/mtab
/proc/mounts
mount -a=all from fstab -f fakes -r read-only -w write mode -n without updating mtab -L mount by label -o remount
umount
fuser -m /dev/fs = search files opened at fs
du -h human -s summ -x local fs only
df=filesystems -h human -l local fs -k kb -m mb -i inodes
quotaon quotaoff quotacheck -avugc
edquota = edit quota amounts edquota -u user -t grace period
quota =used by users to watch their quota
aquota.user aquota.group binary files
usrquota, grpquota =/etc/fstab options
soft limit can be exceeded for grace period
Hard limit can't be exceeded
repquota -a =report about all users
10 289
11 311
12 339
13 365
14 397
15 419
@темы: Linux