Главная » soft, programming » Linux » Linux tips, commands and Mine lightweight utility choise

Linux tips, commands and Mine lightweight utility choise

=====

stjerm. I can’t find any lacks http://code.google.com/p/stjerm-terminal/ qtpanel. minimal universal default beauty. Lighter than tint2. Ability to move windows icons along panel. git clone git://gitorious.org/qtpanel/qtpanel.git cd qtpanel cmake . make Qtpanel is not friendly to xxkb: So I am using lxpanel. There is lxpanelx, but never install it yet. dwb — excellent very light browser. Better and more userfriendly than surf, uzbl and xxxterm, I think. pnmixer — it seems to be better than volti(and kmix). http://www.gentoo-wiki.info/TIP_install_programs_without_portage real time: sudo ntpdate pool.ntp.org ==================================================================== http://xtips.ru/?act=main&page=12 http://ru.wikibooks.org/wiki/%D0%9D%D0%B0%D1%81%D1%82%D0%BE%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D0%BA%D0%BD%D0%B8%D0%B3%D0%B0_%D0%BF%D0%BE_Linux

  • ~/.bashrc — Глобальная настройка и запуск программ при первичном входе, и при каждом открытии консоли
  • ~/.bash_profile — Применяется только при входе в систему, автозапуск пользовательских приложений
  • ~/.bash_logout — Выполнение сценариев при выходе
  • ~/.inputrc — Настройка хоткеев

============================================================== GENTOO use flags: cat /usr/portage/profiles/use.local.desc | grep useflag ============================================================== create make Linux LiveUSB sudo dd if=~/temp/regular-tde-20131016-i586.iso of=/dev/sdc oflag=direct bs=1048576
——————
sudo dd if=/dev/sdb | pv -s 2G | dd of=DriveCopy1.dd bs=4096
——————
pv /home/user/bigfile.iso | md5sum
——————
status=progress
—————
(pv -n /dev/sda | dd of=/dev/sdb bs=128M conv=notrunc,noerror) 2>&1 | dialog —gauge «Running dd command (cloning), please wait…» 10 70 0
================================================================================= sudo ddrescue - d -D --force ubuntu-mate-14.10-desktop-i386.iso /dev/sdx sudo ddrescue -d -D --force ubuntu-mate-14.10-desktop-amd64.iso /dev/sdx ============================================================== [root@localhost ~]# export DISPLAY=:0.0 [root@localhost ~]# xhost + ==================================================================== Format USB flash go to super mode by typing «su» followed by super mode password

fdisk -l

that will show all the volume in your pc or you can also use the

df

to see the usb flash drive suppose it may be /deb/sdb1

umount /dev/sdb1
that un mount the drive mkfs.vfat /dev/sdb1

==================================================================== reboot============= #shutdown -r -t 0 now ========================================================================================

Быстрая русификация консоли

Файл: /etc/rc.conf
unicode="YES"
Файл: /etc/conf.d/consolefont
consolefont="Cyr_a8x16"
consoletranslation="cp866_to_uni"
Файл: /etc/conf.d/keymaps
keymap="ru"
dumpkeys_charset=""

На заметку: Доступные раскладки клавиатуры:

ru - переключение Right-Ctrl
ru1 - переключение Right-Alt
ru3 -102 кнопочная клавиатура, переключение CapsLock
ru4 - 105 кнопочная клавиатура, переключение CapsLock
Файл: /etc/env.d/02locale
LANG="ru_RU.UTF-8"
LC_ALL=""

На заметку: Если вы в рабочей системе, выполните следующие команды, для вступления изменений в силу.

env-update && source /etc/profile
/etc/init.d/consolefont restart && /etc/init.d/keymaps restart

На заметку: Для локализации MC должен быть собран с флагом -ncurses

echo «app-misc/mc -ncurses» >> /etc/portage/package.use

На текущий момент (версия 4.6.2) флаг ncurses убран из MC

На заметку: Для локализации man страниц желательно установить пакет app-i18n/enca

emerge -av app-i18n/enca

и отредактировать файл конфигурации man страниц

Файл: /etc/man.conf
#NROFF      /usr/bin/nroff -mandoc
NROFF    /usr/bin/enconv -L ru -x KOI8-R | /usr/bin/nroff -mandoc -Tlatin1 -c | /usr/bin/enconv -L ru -x UTF-8

На заметку: Так же рекомендую оставить в системе русcкую и английскую локаль

cat /usr/share/i18n/SUPPORTED | grep -E 'ru_RU|en_US' >> /etc/locale.gen && locale-gen

На заметку: Ну и для автоматизации можно все превратить в скрипт:Замечу, что в последней версии (~x86/~amd64) был изменен синтаксис в конфигах, и большие буквы были изменены на маленькие!

#/bin/bash
sed -i -e 's/UNICODE=.*/UNICODE="yes"/' /etc/rc.conf
sed -i -e 's/CONSOLEFONT=.*/CONSOLEFONT="Cyr_a8x16"/' /etc/conf.d/consolefont
sed -i -e 's/.*CONSOLETRANSLATION=.*/CONSOLETRANSLATION="cp866_to_uni"/' /etc/conf.d/consolefont
sed -i -e 's/KEYMAP=.*/KEYMAP="ru"/' /etc/conf.d/keymaps
echo 'LANG="ru_RU.UTF-8"' >> /etc/env.d/02locale
echo 'LC_ALL=""' >> /etc/env.d/02locale
env-update && source /etc/profile
/etc/init.d/consolefont restart && /etc/init.d/keymaps restart
cat /usr/share/i18n/SUPPORTED | grep -E 'ru_RU|en_US' >> /etc/locale.gen && locale-gen

============================================================= gpasswd -a ============================================================= make xterm black: $ cat ~/.Xdefaults XTerm*Background: black XTerm*Foreground: white *Text.background: #efefef *background: #dcdee3 $ cat ~/.Xresources XTerm*Background: black XTerm*Foreground: white *Text.background: #efefef *background: #dcdee3 xterm*faceName: Liberation Mono:size=10:antialias=false xterm*font: 7×13 xterm*boldFont: 7×13 xterm*loginShell: true xterm*vt100*geometry: 80×50 xterm*saveLines: 2000 xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48 xterm*termName: xterm-color xterm*eightBitInput: false xterm*foreground: rgb:a8/a8/a8 xterm*background: rgb:00/00/00 xterm*color0: rgb:00/00/00 xterm*color1: rgb:a8/00/00 xterm*color2: rgb:00/a8/00 xterm*color3: rgb:a8/54/00 xterm*color4: rgb:00/00/a8 xterm*color5: rgb:a8/00/a8 xterm*color6: rgb:00/a8/a8 xterm*color7: rgb:a8/a8/a8 xterm*color8: rgb:54/54/54 xterm*color9: rgb:fc/54/54 xterm*color10: rgb:54/fc/54 xterm*color11: rgb:fc/fc/54 xterm*color12: rgb:54/54/fc xterm*color13: rgb:fc/54/fc xterm*color14: rgb:54/fc/fc xterm*color15: rgb:fc/fc/fc xterm*boldMode: false xterm*colorBDMode: true xterm*colorBD: rgb:fc/fc/fc $xrdb -merge ~/.Xresources ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#25: Get system memory, cpu usage, and gpu memory info quickly

 
## pass options to free ## 
alias meminfo='free -m -l -t'

## get top process eating memory
alias psmem='ps auxf | sort -nr -k 4'
alias psmem10='ps auxf | sort -nr -k 4 | head -10'

## get top process eating cpu ##
alias pscpu='ps auxf | sort -nr -k 3'
alias pscpu10='ps auxf | sort -nr -k 3 | head -10'

## Get server cpu info ##
alias cpuinfo='lscpu'

## older system use /proc/cpuinfo ##
##alias cpuinfo='less /proc/cpuinfo' ##

## get GPU ram on desktop / laptop## 
alias gpumeminfo='grep -i --color memory /var/log/Xorg.0.log'

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#29: A note about ssh alias

Do not create ssh alias, instead use ~/.ssh/config OpenSSH SSH client configuration files. It offers more option. An example:

 
Host server10
  Hostname 1.2.3.4
  IdentityFile ~/backups/.ssh/id_dsa
  user foobar
  Port 30000
  ForwardX11Trusted yes
  TCPKeepAlive yes

You can now connect to peer1 using the following syntax: $ ssh server10 ======================================================================= gentoo use flags

Viewing USE flag descriptions using grep

Using grep, you can easily find out what a USE flag means. Just use this (replace the word «useflag» with the USE flag you’re searching for):

grep -i "useflag - " /usr/portage/profiles/use.desc

If that does not return any results, you can search package-specific USE flags as well:

grep -i "useflag - " /usr/portage/profiles/use.local.desc

cat /usr/portage/profiles/use.desc | grep ladspa ladspa — Enable the ability to support ladspa plugins http://www.gentoo-wiki.info/FAQ_USE_Flags#Viewing_USE_flag_descriptions_using_grep

================================================= Склеить фото( ImageMagic): http://teach-linux.blogspot.com/2011/03/imagemagic.html http://www.imagemagick.org/Usage/montage/#geometry_spacing montage *.jpg -tile 1×3 -geometry +0+0 result.jpg montage *.jpg -tile 3×1 -geometry +0+0 result.jpg ================================ convert +append *.jpg product.jpg #horizontal convert -append *.jpg product.jpg #vertical ================================================== sensors /usr/sbin/sensors-detect =================================================== FLASH PLAYER PUGIN(adobe-flash-player plugin for non standard browsers: palemoon etc) sudo cp /usr/lib/nsbrowser/plugins/libflashplayer.so  /usr/lib/mozilla/plugins cp /usr/lib/flashplugin-nonfree/libflashplayer.so /usr/lib/mozilla/plugins (debian) ——————————————————————————————- ============================================================================================== locate libpep /usr/lib64/PepperFlash/libpepflashplayer.so /usr/lib64/chromium-browser/PepperFlash/libpepflashplayer.so /opt/google/chrome/PepperFlash/libpepflashplayer.so ================================================================================================= JAVA PLUGIN libnpjp2.so /opt/oracle-jdk-bin-1.7.0.51/jre/lib/i386/libnpjp2.so /opt/oracle-jdk-bin-1.8.0.0/jre/lib/i386/libnpjp2.so to /usr/lib/mozilla/plugins ln -sf /opt/oracle-jdk-bin-1.7.0.55/jre/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/libnpjp2.so ln -sf /opt/oraln -sf /opt/oracle-jdk-bin-1.7.0.55/jre/lib/i386/libnpjp2.socle-jdk-bin-1.7.0.55/jre/lib/i386/libnpjp2.so ln -sf /opt/oracle-jdk-bin-1.7.0.55/jre/lib/i386/libnpjp2.so /opt/google/chrome/plugins/ $ jcontrol =================================================== curl -O http://someaddress.com/logs/dbsclog01s%5B001-100%5D.log You can also reference the sequences curl http://example.com/logs/dbsclog01s%5B001-100%5D.log -o log#1.log —— for i in {1..999}; do wget -k http://someaddress.com/logs/dbsclog01s$i.log -O your_local_output_dir_$i; done —— wget http://www.zx-spectrum.cz/css/images/picture{1..546}.gif wget -O palemoon-24.4.1.en-US.linux-i686.tar.bz2 http://sourceforge.net/projects/pm4linux/files/24.4.1/palemoon-24.4.1.en-US.linux-i686.tar.bz2/download =================================================== #fbgrab -c1 /home/user/screen.jpg =================================================== autoscroll Go to about:config (type about:config in the urlbar) and set: middlemouse.contentLoadURL to false general.autoScroll to true ====================================================

I’m often using this quick Python hack to serve a directory over HTTP.

python -m SimpleHTTPServer &

will serve the current directory. By default, it binds to port 8000. To choose another port:

python -m SimpleHTTPServer 9090 &

If you choose a port lower than 1024 on *nix, you might need root privileges, otherwise bind() will fail. python3 -m http.server ================================================================================= php5.4 -S localhost:8091 ============================================================================ dd if=porteus-kiosk-v2.1.1-i486.iso of=/dev/sdb ============================================================= x11vnc LOVE gtkvncviewer gtkvncviewer LOVE x11vnc but RealVNC better —————————————————————————————————————————- sound card PULSEAUDIO capture: In order to find the correct device you should run this command:

pacmd list | grep ".monitor"

When you see something like:

	alsa_output.pci-0000_06_05.0.analog-stereo.monitor/#1: Monitor of CA0106 Soundblaster Analog Stereo

and the soundcard corresponds to the one you want to monitor, you know which device name to use. Here it is: alsa_output.pci-0000_06_05.0.analog-stereo.monitor Afterwards pacat is used to read the signal and sox is used to change the output format. See the man page of sox for parameters to choose for correct output format. The default output from pacat is raw audio, rate 44100, signed-integer, little-endian, 16-bit and stereo. The sox reads from standard input by specifying «-» as filename. The format of the output file is therefore specified after the «-» in the examples under. Here is an example of how to write to a float formatted raw audio file with mono sound at a rate of 40000sps:

pacat --record -d alsa_output.pci-0000_06_05.0.analog-stereo.monitor | sox -t raw -r 44100 -s -L -b 16 -c 2 - -t raw -r 40000 -f -b 32 -c 1 output.raw

This one is nice if you will record sounds for using in gnuradio. To record to a wav-file with a rate of 44100sps, simply do like this:

pacat --record -d alsa_output.pci-0000_06_05.0.analog-stereo.monitor | sox -t raw -r 44100 -s -L -b 16 -c 2 - "output.wav"

pacat —record -d alsa_output.pci-0000_01_0a.0.analog-stereo.monitor | sox -t raw -r 44100 -L -e signed-integer -S -b 16 -c 2 — «output.wav» ============================================================================== /usr/bin/murmurd -ini /etc/murmur/murmur.ini -v -fg ============================================================================== 3G Intertelecom usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 1506 -M "55534243123456780000000000000011062000000100000000000000000000" modprobe option vendor=0x12d1 product=0x1506 ===============================================================================

systemctl restart display-manager

======================================================================= Install fonts manually

# cp somefont.ttf ~/.fonts/
# cd ~/.fonts

# fc-cache ================================================================= # create images from videofile mplayer -vo jpeg video.avi #rotate images mogrify -rotate 90 *.jpg # resize images mogrify -resize 320×240 *.jpg # create gif from images convert -delay 5 -loop 0 *.jpg output.gif convert output.gif.gif -coalesce temporary.gif convert -size 3000×2494 temporary.gif -resize 1500×1247 smaller.gif convert smaller.gif -fuzz 10% -layers Optimize smaller_optim.gif ================================================================ http://www.tuxarena.com/intro/cheatsheet.html:

Search Files for a Specific Text

find . -iname «*.txt» -exec grep -l «hello» {} +

List All Users Recognized by the System

cat /etc/passwd | cut -d «:» -f 1

Find Files Modified in the Last N Days
find . -iname «*» -mtime -2 ====================================================== optirun -b none nvidia-settings -c :1 ====================================================== ffmpeg c экрана ffmpeg -f alsa -ac 2 -i pulse -s 640×480 -f x11grab -r 15 -i :0.0+33,363 -acodec libfaac -b:a 128k -vcodec mpeg4 -qscale:v 3 -flags +aic+mv4 -threads 0 output.mkv ==================================================== fluxbox $ cat ~/.fluxbox/keys Mod4 r :exec fbrun # Ctrl+Alt(Mod1)+r will bring up the Fluxbox command dialog Mod4 d :exec gmrun # Ctrl+Alt(Mod1)+r will bring up the Fluxbox command dialog Control n Mod1 n :NextTab Mod4 n :NextTab Mod4 b :PrevTab =====================================================
Search and seek inside jar files: в линухе так ищется внутри jar~/.maven/repository $ grep -rla jetspeed com.ibm.wp.pe.rt.impl/jars/com.ibm.wp.pe.rt.impl-5.1.jar com.ibm.wp.pe.api.legacy/jars/com.ibm.wp.pe.api.legacy-5.1.jar com.ibm.wp.base/jars/com.ibm.wp.base-5.1.jar com.ibm.wp.user.legacy/jars/com.ibm.wp.user.legacy-5.1.jar com.ibm.wp.pe.rt.api/jars/com.ibm.wp.pe.rt.api-5.1.jar com.ibm.portlet-api/jars/com.ibm.portlet-api-5.02.jar =================================================================== ping… Запретить: iptables -A INPUT -p icmp —icmp-type echo-request -j DROP =================================================================== ~/.bashrc : export EDITOR=nano export TERMINAL=lxterminal export BROWSER=firefox export GTK2_RC_FILES=»$HOME/.gtkrc-2.0″ export TERM=xterm-256color $ cat ~/.config/mc/ini | grep skin skin=xoria256 skin-new:skin=ajnasz-blue ~/.local/share/mc/skins/ajnasz-blue.ini https://ajnasz.hu/blog/20140228/midnight-commander-skin [skin] description=Ajnasz Blue Theme. Midnight Commander skin from Ajnasz. [Lines] horiz=─ vert=│ lefttop=┌ righttop=┐ leftbottom=â”” rightbottom=┘ topmiddle=─ bottommiddle=─ leftmiddle=├ rightmiddle=┤ cross=┼ dhoriz=═ dvert=â•‘ dlefttop=â•” drighttop=â•— dleftbottom=â•š drightbottom=╝ dtopmiddle=╤ dbottommiddle=╧ dleftmiddle=â•Ÿ drightmiddle=â•¢ [core] _default_=blue;default reverse=black;brightblue selected=white;brightblue marked=yellow;gray markselect=gray;yellow gauge=lightgray;blue input=white;blue header=lightgray; [filehighlight] directory=lightgray; executable=brightgreen; symlink=cyan; stalelink=red; device=brightmagenta; special=yellow; core=red; temp=gray; archive=magenta; source=green; media=; graph=; database=brown; doc=cyan; [dialog] _default_=black;brightblue dhotnormal=cyan;black dfocus=brightblue;black dhotfocus=white;black [error] _default_=white;red errdfocus=red;white errdtitle=red;white errdhotnormal=red;white errdhotfocus=blue;green [menu] _default_=black;brightblue menuhot=cyan;black menusel=birghtblue;black menuhotsel=cyan;black [buttonbar] hotkey=cyan; button=black;brightblue [editor] _default_=lightgray; editbold=default; editmarked=blue;gray editwhitespace=blue; linestate=; bookmark=white;red bookmarkfound=black;blue [help] _default_=black;lightgray helpitalic=red;lightgray helpbold=blue;lightgray helplink=white;lightgray helpslink=white;blue [viewer] viewunderline=brightred; [widget-common] sort-sign-up = ‘ sort-sign-down = , [widget-scollbar] first-vert-char=↑ last-vert-char=↓ first-horiz-char=« last-horiz-char=» current-char=â– background-char=â–’ =================================================================== find . -name «*.bat» -print | xargs grep «maven» grep -R «maven» | locate *.bat ============================================================ xcompmgr -cCfF -r7 -o.65 -l-10 -t-8 -D7 xcompmgr -r8 -o.85 -l-7 -t-10 -cCfF compton -cCGfF -o 0.38 -O 200 -I 200 -t 0 -l 0 -r 3 -D2 -m 0.88 compton -c -r 16 -l -24 -t -12 -G -b —————————————————————————————
xcompmgr -n -f -Cc -r 30 -D 15 (no delay -f remove)
===========================================
compton -i 0.2 -cC
———————————————————————————
find big file(поиск больших файлов) find ./* -type f -size +1500000k -exec ls -lha {} \; ======================================================= remove same name subfolders find -type d -name "имя_папки" -exec rm -r {} \; ================================================= Рекурсивный поиск/замена текста в файлах из консоли в linux $ grep 'текст_для_поиска' -P -R -I -l  * | xargs sed -i 's/текст_для_поиска/текст_для_замены/g' grep -rn -R -G  -l -I  text_to_find ./* | xargs sed -i 's/text_to_find/new_text_to_set/g' ======================================================= $ lsblk NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0  74.5G  0 disk ├─sda1   8:1    0  37.1G  0 part /media/disk1part1 └─sda2   8:2    0  37.4G  0 part / sdc      8:32   0   1.8T  0 disk ├─sdc1   8:33   0 883.1G  0 part └─sdc2   8:34   0   980G  0 part /media/uuu/WD-Refinement $ /usr/bin/udisks --mount /dev/sdc1

# udisksctl mount -b /dev/sdc1 ========================================================================================= До сих пор актуально sudo apt-get install python-mutagen Convert MP3 Tags using mid3iconv find . -name «*.mp3» -print0 | xargs -0 mid3iconv -e CP1251 -d ========================================================================================= http://mp3unicode.sourceforge.net/ mp3unicode —source-encoding cp1251 —id3v1-encoding none —id3v2-encoding unicode *.mp3 For instance, to find directories that are under the one I’m currently in : find . -type d -exec echo «Hello, ‘{}'» \; ========================================================================================= sudo ddrescue -d -D —force ubuntu-mate-14.04.1-final-desktop-amd64.iso /dev/sdx ================================================================ run command periodically: watch -n 5 echo «Hello World» ======================================================================= http://lin.in.ua/articles/18-Tyuning/221-Kak_v_bash_e_pisat_raznymi_cvetami.html Хотите, чтобы ваши скрипты, использующие обратную связь с пользователем, выглядели более ярче и насыщеннее, или не любите серость? Тогда эта заметка для вас 🙂 BOLD='\e[1m' UNDERLINE='\e[4m' BLINK='\e[5m' INVERSE='\e[7m' BREAK='\e[m' #Foreground colors: BLACK=’\e[0;30m’ RED=’\e[0;31m’ GREEN=’\e[0;32m’ BROWN=’\e[0;33m’ BLUE=’\e[0;34m’ MAGENTA=’\e[0;35m’ CYAN=’\e[0;36m’ GRAY=’\e[0;37m’ DEF=’\e[0;39m’ DGRAY=’\e[1;30m’ LRED=’\e[1;31m’ LGREEN=’\e[1;32m’ YELLOW=’\e[1;33m’ LBLUE=’\e[1;34m’ LMAGENTA=’\e[1;35m’ LCYAN=’\e[1;36m’ WHITE=’\e[1;37m’ # backgrounds colors BLACK=’\e[40m’ RED=’\e[41m’ GREEN=’\e[42m’ BROWN=’\e[43m’ BLUE=’\e[44m’ MAGENTA=’\e[45m’ CYAN=’\e[46m’ GRAY=’\e[47m’ DEF=’\e[49m’ Например echo -e ‘\e[0;31m Скачиваем архив \E[0m’ рисует строку красными буквами. Методом научного тыка было также выяснено, что если для Foreground color ставить первое значение 2, то получаем темный вариант цвета. Например: echo -e ‘\e[2;31m Скачиваем архив \E[0m’ рисует строку темно-красным А значение: ‘\e[9m’ делает текст зачеркнутым. =============================================== split -b 4M file.mp4 part_file This will split the files into chunks of 4 megabytes. TO recreate the file again, type cat part_file[a-c] > file.mp4 ========================================================================== $ eix ncdu [I] sys-fs/ncdu Available versions: 1.9 1.10 Installed versions: 1.10(17:42:13 29.01.2014) Homepage: http://dev.yorhel.nl/ncdu/ Description: NCurses Disk Usage $ eix pydf [I] app-admin/pydf Available versions: 10-r1 {PYTHON_TARGETS=»python2_7 python3_3 python3_4″} Installed versions: 10-r1(15:27:19 09.12.2014)(PYTHON_TARGETS=»python2_7 python3_4 -python3_3″) Homepage: http://kassiopeia.juls.savba.sk/~garabik/software/pydf/ Description: Enhanced df with colors $ eix dfc [I] sys-fs/dfc Available versions: (~)3.0.0 {nls} Installed versions: 3.0.0(11:59:40 19.01.2015)(nls) Homepage: http://projects.gw-computing.net/projects/dfc Description: A simple CLI tool that display file system usage, with colors ============================================================================ Показать свободное место на файловой системе: (флаг -h, говорит отображать данные в KB, MB, GB)

# df -h Показать размер для каждой папки и файла в текущей директории, а также общий размер директории:

# du -sch *

============================================================================ http://www.pixelbeat.org/scripts/ ===================================================================== восставновление Линукс системы cat CHROOTSABAYON64sdb5.sh #!/bin/bash mount -o bind /proc /mnt/sabayon64dev5/proc sleep 2 mount -o bind /dev /mnt/sabayon64dev5/dev sleep 2 mount -o bind /dev/pts /mnt/sabayon64dev5/dev/pts sleep 2 mount -o bind /sys /mnt/sabayon64dev5/sys sleep 2 chroot /mnt/sabayon64dev5 /bin/bash
=====================
internet:
mount —bind /etc/resolv.conf /media/mycomputersabayon64dev5/etc/resolv.conf
=============================================================================================================== #!/bin/bash for var in «$@» do gif2apng «$var» done ==================================================================================================== convert -append in-*.jpg out.jpg ====================================================================================================

sudo qemu-system-x86_64 -vga qxl -m 1024 -usb /dev/rdisk2

#sudo qemu-system-x86_64 -vga qxl -m 3072 -usb /dev/sdb -enable-kvm -net nic -net user -drive file=/dev/sda1

where rdisk2 is your USB drive location & for testing ISO

sudo qemu-system-x86_64  -m 1024 linuxmint-16-cinnamon-dvd-64bit.iso

qemu -boot d -cdrom image.iso -m 512

qemu -boot d -cdrom /dev/cdrom -m 512 qemu-system-i386  -m 1024  -boot d -cdrom  /usr/share/systemrescuecd/systemrescuecd-x86-4.5.2.iso As root: qemu-kvm -m 2048 -vga qxl -cdrom filename.iso If you do not have KVM support, you can use qemu instead qemu -m 2048 -vga qxl —cdrom filename.iso
$sudo qemu-system-x86_64 -vga qxl -m 3072 -usb ‘/mnt/esx2/SOFT/ISO/lxle-14.04.2.iso’
$sudo qemu-system-x86_64 -vga vmware -m 5120 -usb ‘/mnt/esx2/SOFT/ISO/lxle-14.04.2.iso’

qemu-img convert ReactOS.vmdk -O raw ReactOS.hd
qemu-system-x86_64 -m 512 -hda ReactOS.hd
———————————————-
sudo qemu-system-x86_64 -boot d -cdrom mfsBSD-frenzy.iso -enable-kvm -vga qxl -m 3G -net nic -net user -drive file=/dev/sda1 -localtime
—————————————————

sudo qemu-system-x86_64 -vga qxl -m 3072 -usb -soundhw hda ./q4os-live-1.4.9-x64.iso
————-
sudo qemu-system-x86_64 -vga qxl -m 3072 -usb -soundhw hda /disks/disk1part1/home/u/xerus64-8.0.iso

sudo qemu-system-x86_64 -enable-kvm -vga qxl -m 3G -usbdevice host:0930:6545 -net nic -net user -boot d -cdrom /disks/disk1part1/home/uuuu/xerus64-8.0.iso

sudo qemu-system-x86_64 -enable-kvm -vga qxl -m 3G -usbdevice host:0930:6545 -usbdevice tablet -net nic -net user -drive file=/dev/sda1,media=disk -boot d -cdrom /disks/disk1part1/home/uuuuu/xerus64-8.0.iso

sudo qemu-system-x86_64 -enable-kvm -vga qxl -m 3G -usbdevice host:0930:6545 -net nic -net user -boot d /dev/sdc1

 ================================================================================================ sudo nmap -F 192.168.1.* sudo nmap -sP 10.11.18.0/24 -------------------------------------------------------- httping https://svn.firma.ua:9443/firma/cst-prj/ -S -Y -Z -s --offset-yellow 370 --offset-red 380

========================================================================================================= проверка открыта ли связь на данный порт: [root@server ~]# nc 127.0.0.1 80 < /dev/null; echo $? 1-(закрыто) [root@server ~]# nc ya.ru 80 < /dev/null; echo $? 0 -(открыто) [root@server ~]# ============================================================================
sudo add-apt-repository -y ppa:appgrid/stable
sudo apt-get update && sudo apt-get install appgrid
aptitude search ‘~N’
———-
add-apt-repository is available in Debian. It’s in the python-software-properties package:

sudo apt-get install python-software-properties
or
sudo apt-get install software-properties-common

===================================
apt-get install fbi -- смотреть фоточки в текстовой соснольке
apt-get install xzgv -- смотреть фоточки в иксах
apt-get install caca-utils -- упороться веществами и смотреть фоточки в ascii псефдографике
radar sonar:
/usr/lib/xscreensaver/sonar -root -ping 192.168.150.0/24 -font-size 9 /usr/lib/xscreensaver/apple2 -text -program 'tcsh'
======================================================================
xterm -geometry 142x42 -bg black -fg white -fn -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1 &

==========================================================================

mpv --quiet -vo caca ~/video/Sasha_Gray_triple_penetration_porn.avi
==================================================
adjust brightness for second monitor
xrandr --output HDMI1 --brightness 0.5
xrandr --output DFP4 --primary
===================================================
delete file older than 5 day:
find /path/to/files* -mtime +5 -exec rm {} \;
delete file older than 5 days:
find ./* -mtime +3 -exec rm {} \;
=============================================
grep -v ^\# /etc/locale.gen # без комментариев
==============================================
game zx spectrum
~$ cat fuseTV
!#/bin/sh
fuse —graphics-filter tv2x
==============================================
ubuntu must to do
$ gsettings set com.canonical.desktop.interface scrollbar-mode normal
$ gsettings set com.canonical.desktop.interface scrollbar-mode
=========================================================
qemu-system-x86-64 -m 1024 -cpu core2duo -vga std -net user -net nic -hda puredarwin_1.3.0.qcow2
=========================================================
Similar Images photos  align:
align_image_stack -a aligned -C *.jpg
=========================================================

inxi -IAbDc5
inxi -F
inxi -Fx
screenfetch alternative
===========================================================

echo "Привет" | festival --tts --language russian

=============================================================

ffmpeg -i A.mp4 -ss 00:02:50 -to 00:03:09.300 -map 0:a -c:a libopus -b:a 100k -y audio.webm \
&& ffmpeg -i A.mp4 -ss 00:02:50 -to 00:03:09.300 -map 0:v -c:v libvpx-vp9 -pass 1 -f null -y /dev/null && ffmpeg -i A.mp4 -ss 00:02:50 -to 00:03:09.300 -map 0:v -c:v libvpx-vp9 -pass 2 -b:v 1200k -auto-alt-ref 1 -lag-in-frames 25 -y video.webm \
&& ffmpeg -i video.webm -i audio.webm -map 0:v -c:v copy -map 1:a -c:a copy -y out.webm

==================================================================
$cat ~/.bashrc
export PATH=/home/me/SOFT/someapp/bin:$PATH
LANG=ru_RU.UTF-8
PS1=$
========================================================
strings -a libstdc++.so.5 | grep GCC
GCC_3.3
GCC_3.0
=======================================================
ffmpeg  -i  ~/Desktop/fireplace14386240141720.webm -vcodec mpeg4 -acodec aac -strict -3 2.mp4
===========================================================
Gif apng creating
$cat sh2apng.sh
#!/bin/bash
for var in «$@»
do
gif2apng «$var»
done
=======================================
xcompmgr -n -Cc -r 30 -D 10
compton -c -r 80 -l -100 -t -110 -G -o 1.2 (-b daemonize)
xcompmgr -n -Cc -r 10
=========================================================
tar.bz2 to deb
alien -d firefox-4.0.1.tar.bz2  
Enter wait a while until you see “firefox_8.0-2_all.deb generated
================================================install=======
sudo qemu-system-x86_64 -enable-kvm -vga qxl -m 3G -net nic -net user -drive file=/dev/sda1,media=disk -boot d -cdrom /home/kldov/ReactOS-BootCD.iso -localtime -serial file:ReactOS.log -hdb ReactOS.img
==============

sudo qemu-system-x86_64 -enable-kvm -vga qxl -m 3G -net nic,model=ne2k_pci -net user  -boot d -cdrom ./bootcd-71387-dbg.iso -localtime -serial file:ReactOS.log -hdb ./ReactOS.img
=====================
sudo kvm -hda ReactOS.img -vga std -localtime -net nic,model=ne2k_pci -net user -serial file:ReactOS.log -m 3G
====================
:~/temp$ qemu-img create -f qcow2 HDD.img 3G
Formatting ‘winxp.img’, fmt=qcow2 size=3221225472 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16

:~/temp$ sudo qemu-system-x86_64 -enable-kvm -vga qxl -m 3G -usbdevice mouse -net nic -net user -boot d -cdrom ./ReactOS-0.4.2-live.iso -localtime -serial file:ReactOS.log -hdb HDD.img
===============

xdotool key Caps_Lock

==========
lsof -i :8080
If multiple result, try lsof -i :8080 | grep LISTEN
ps -ef | grep 10165
ps -efHu ROOT | grep
netstat -teupln
netstat -nlp
netstat -vatn ; netstat -tulpn ; iptables -L -v
========================
vivaldi browser : echo «.button-toolbar.home { display: none }» >> /opt/vivaldi-snapshot/resources/vivaldi/style/common.css

Реклама

Добавить комментарий

Заполните поля или щелкните по значку, чтобы оставить свой комментарий:

Логотип WordPress.com

Для комментария используется ваша учётная запись WordPress.com. Выход / Изменить )

Фотография Twitter

Для комментария используется ваша учётная запись Twitter. Выход / Изменить )

Фотография Facebook

Для комментария используется ваша учётная запись Facebook. Выход / Изменить )

Google+ photo

Для комментария используется ваша учётная запись Google+. Выход / Изменить )

Connecting to %s