Determine 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 ArticleSend html POST command from console
curl --data "param1=value1¶m2=value2" http://hostname/resource
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 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 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Запуск KOI8-R терминала SSH в UTF-8 окружении
luit -encoding "KOI8-R" ssh ip или xterm -en koi8-r (дальше обычный ssh) mc -S dark --stickchars
View Article