Запуск KOI8-R терминала SSH в UTF-8 окружении
luit -encoding "KOI8-R" ssh ip или xterm -en koi8-r (дальше обычный ssh) mc -S dark --stickchars
View ArticleHow to change pattern recursively
ack -l 'pattern' | xargs perl -pi -E 's/pattern/replacement/g'Explanationackack is an awesome command line tool that is a mix of grep, find, and full Perl regular expressions (not just the GNU subset)....
View ArticleРабота с русскими именами файлов в ZIP и UNZIP под *nix
Увидеть имена файлов путём перекодировки ls -N | iconv -f cp1252 -t cp850 | iconv -f cp866Перекодировать распакованные файлы в utf-8 можно следующей командой: find . -type f -exec sh -c 'np=`echo...
View ArticleHow to check for changes on remote (origin) git repository?
You could git fetch origin to update the remote branch in your repository to point to the latest version. For a diff against the remote: git diff origin/masterIf you want to accept the remote changes:...
View ArticleSend html POST command from console
curl --data "param1=value1¶m2=value2" http://hostname/resource
View ArticleDetermine and change file character encoding
file -bi [filename]Example output: steph@localhost ~ $ file -bi test.txt text/plain; charset=us-ascii Use vim to change a file's encoding:set encoding=utf-8set fileencoding=utf-8
View ArticleCreate bootable USB key with Windows 7 from Linux
1. dd if=/w7.iso of=/dev/sdx2. ms-sys -7 /dev/sdxLink to ms-sys in AUR (archlinux)
View ArticleSplit large file
Have you ever want to split a large file into several small files? I’ve face this problem few days ago. I need to split a large file (3GB log file) into several smaller file where i can read it using...
View ArticleПереименовать группу файлов
Often over time, we will want to reorganize a group of files by renaming them.To rename *.txt to *.bak (e.g. to rename ham.txt to ham.bak)for f in *.txt; do mv "$f" "${f%.txt}.bak"; doneTo remove...
View Articleandroid vibrator
To make vibrator works you need make few steps:1. in sources:Vibrator vb = ( Vibrator )getApplication().getSystemService( Service.VIBRATOR_SERVICE );vb.vibrate( 1000 );2. in application manifest:...
View ArticleКак погасить питание на USB программно?
echo "suspend" > /sys/bus/usb/devices/usb2/power/levelecho "auto" > /sys/bus/usb/devices/usb2/power/level
View ArticleRestore files by grep
Шустро восстановить удаленные/потерянные/случайно_измененные текстовые файлы можно и грепомgrep -i -a -B10 -A100 'Строка или текст из файла, который потерпел катастрофу' /dev/sda1 > result.txt...
View Article