#author("2016-08-12T00:07:47+09:00","","") #freeze English / [[Japanese:http://gimite.net/pukiwiki/index.php?UNIX%CD%D1%A5%C4%A1%BC%A5%EB]] [[FrontPage]] Ruby scripts and shell scripts for UNIX environment. Modify path in the first line for your environment. All scripts are in the Public Domain. #contents *melt [#m7b562cd] Extract compressed files in any type of archives. Supports .tar.gz, .tar.bz2, .gz, .bz2, .zip. (Japanese people say ''melting'' archives) $ melt hoge.tar.gz $ melt foo.bz2 [[melt:http://gimite.ddo.jp/archive/melt]] - upWSdO http://www.FyLitCl7Pf7kjQdDUOLQOuaxTXbj5iNG.com -- [[JimmiXS]] &new{2016-08-12 (金) 00:07:47}; #comment(above) *quit [#m7b562cd] UNIX command to kill process by process ID or part of process name. Different from killall/kill in terms of: - Sends INT first, and later TERM, ABRT and KILL until target dies. - Doesn't return until target dies. - If more than one processes match the name, you can choose one of them by number. $ quit httpd 0: www 10547 0.6 1.6 15560 5876 ?? S 11008 55:43.57 /usr/local/sbin/httpd 1: www 10548 0.4 1.4 14968 5348 ?? S 11008 55:38.94 /usr/local/sbin/httpd Number: 0 Sending signal INT... Sending signal TERM... $ quit 2163 [[quit:http://gimite.ddo.jp/archive/quit]] #comment(above) *throw [#jf6ae56a] UNIX command to throw files/directories away to the trash. It creates a directory in ~/.trash and move files/directories there. $ throw hoge.txt foo.txt [[throw:http://gimite.ddo.jp/archive/throw]] #comment(above) *copyf, cutf, pastef [#q6e6c827] UNIX commands which perform Windows-like copy&paste. $ copyf hoge.txt # Copies file. $ copyf -r foo-dir # Copies directory. $ cutf hoge.txt # Cuts file. $ pastef # Paste file/directory. [[copyf:http://gimite.ddo.jp/archive/copyf]], [[cutf:http://gimite.ddo.jp/archive/cutf]], [[pastef:http://gimite.ddo.jp/archive/pastef]] #comment(above) *make-alias [#bcd27755] Creates alias available only in the specific directory (i.e. just a shell script). $ make-alias update 'svn up && ./configure && make' $ ./update # Executes svn up && ./configure && make [[make-alias:http://gimite.ddo.jp/archive/make-alias]] #comment(above) *man-view [#o78b7447] Simple UNIX man viewer CGI script. Supporting multibyte characters. CGI must allow Ruby 1.8.x scripts. Modify path in the first line of man-view.cgi and contents of man-view.conf. ''WARNING: This script may have security risk because it passes CGI input directly to shell. Do not allow anonymous users to access this CGI script (e.g. use BASIC auth).'' [[man-view-1.0.tar.gz:http://gimite.ddo.jp/archive/man-view-1.0.tar.gz]] #comment(above)