Differences

This shows you the differences between two versions of the page.

os:unix [2009/02/04 21:42]
192.168.0.2
— (current)
Line 1: Line 1:
-//A few nice Unix commands.// 
- 
-====== Shell and simple command line applications ====== 
- 
-===== Erase all in a directory except one file (or so) ===== 
- 
-<code> 
-for i in `ls -1 | grep -v <filetokeep>`; do rm -rf $i; done 
-</code> 
- 
-===== Hexadecimal ===== 
- 
-==== Convert hexdump's output to C hex array ==== 
- 
-More exactly, it'll convert from "AA BB CC" to "0xAA, 0xBB, 0xCC" with each line having 8 bytes. 
- 
-<code> 
-hexdump -v -e '8/1 "0x%02x, "' -e '"\n"' <filetodump> 
-</code> 
- 
-===== ls ===== 
- 
-Colour directories, binaries (etc) using ls --color=auto. 
- 
-===== Screenshots ===== 
- 
-Take a screenshot 
-<code> 
-$ xwd -root -out scrdump 
-</code> 
- 
-View a screenshot 
-<code> 
-$ xwud -in scrdump  
-</code> 
- 
- 
-===== Tar ===== 
- 
-==== Untar a single file in a big tar file ==== 
- 
-<code> 
-tar -xvf <thetar.tar> <thefile> 
-</code> 
- 
-==== Untar in a given directory ==== 
- 
-<code> 
-tar -xvf <thetar.tar> -C <thedir> 
-</code> 
- 
- 
- 
-====== Development ====== 
- 
- 
-===== Compilation ===== 
- 
-  * to generate a .s: gcc -S -c foo.c 
-  * to output combined C and assembly: gcc -c -g -Wa,-a,-ad foo.c > foo.lst 
-  * to assemble a .s: as -o foo.o foo.s. Use -gstabs for debug and -a to print memory listing. 
-  * to assemble a .o: gcc foo.o -o foo 
- 
-====== Application Configuration/Customization ====== 
- 
-===== Alpine ===== 
- 
-Set configuration in ~/.pinerc. 
- 
-To access a Google Mail account with IMAP: 
-<code> 
-personal-name=<YOUR NAME> 
-user-domain=gmail.com 
-smtp-server=smtp.gmail.com/submit/user=<YOUR GOOGLE USERNAME>@gmail.com/novalidate-cert 
-inbox-path={imap.gmail.com/user=<YOUR GOOGLE USERNAME>@gmail.com/ssl/novalidate-cert}Inbox 
-</code> 
- 
-All other entries can left by default. 
- 
-===== Emacs ===== 
- 
-^ Solaris 10 ^ OpenSolaris 2008.11 ^ Ubuntu ^  
-| [[http://www.blastwave.org|CSWemacs]] | SUNWgnu-emacs and SUNWgnu-emacs-x | =) Works fine | 
-| /opt/csw/bin/pkg-get emacs | pkg install SUNWgnu-emacs SUNWgnu-emacs-x | apt-get install ?? | 
- 
-  * Homepage: [[http://www.gnu.org/software/emacs/|See here]] 
-  * The configuration file is ~/.emacs 
-  * To reload .emacs:  M-x load-file ~/.emacs 
- 
-<code> 
-;; turn on font-lock mode 
-(global-font-lock-mode t) 
- 
-;; enable visual feedback on selections 
-(setq-default transient-mark-mode t) 
- 
-;; always end a file with a newline 
-(setq require-final-newline t) 
- 
-;; stop at the end of the file, not just add lines 
-(setq next-line-add-newlines nil) 
- 
-;;to display time 
-(display-time) 
- 
-;;to set the cursor color 
-(set-cursor-color "red") 
- 
-;;to set the font 
-(set-default-font "7x14") 
- 
-;; foreground 
-(set-foreground-color "white") 
- 
-;;to set background color to black 
-(set-background-color "black") 
- 
-;;to manage the geometric size of initial window. 
-(setq initial-frame-alist '((width . 87) (height . 42))) 
-</code> 
- 
-===== Evince ===== 
- 
-Evince is a PDF, PS (etc) document viewer. 
- 
-^ Solaris 10 ^ OpenSolaris 2008.11 ^ Ubuntu ^  
-| [[http://www.blastwave.org|CSWevince]] | =) Works fine | =) Works fine | 
-| /opt/csw/bin/pkg-get evince  |  | apt-get install ?? | 
-| installed in /opt/csw/bin  | installed in /usr/bin | apt-get install ?? | 
- 
-===== Fetchmail ===== 
- 
-^ Solaris 10 ^ OpenSolaris 2008.11 ^ Ubuntu ^  
-| [[http://www.blastwave.org|CSWfetchmail]] |  |  | 
- 
-===== GIMP ===== 
- 
-^ Solaris 10 ^ OpenSolaris 2008.11 ^ Ubuntu ^  
-| [[http://www.blastwave.org|CSWgimp]] | SUNWgnome-img-editor | =) Works fine | 
-| /opt/csw/bin/pkg-get gimp | pkg install SUNWgnome-img-editor | apt-get install ?? | 
- 
- 
-===== LaTeX ===== 
- 
-^ Solaris 10 ^ OpenSolaris 2008.11 ^ Ubuntu ^  
-| [[http://www.blastwave.org|CSWtetex]] | IPStetex from Blastwave's IPS repository | =) Works fine | 
-| /opt/csw/bin/pkg-get tetex | installed from packagemanager in /opt/csw/bin | apt-get install ?? | 
- 
-===== Locate and Updatedb ===== 
- 
-^ Solaris 10 ^ OpenSolaris 2008.11 ^ Ubuntu ^  
-| [[http://www.blastwave.org|CSWfindutils]] |  | =) Works fine | 
-| commands are glocate and gupdatedb in /opt/csw/bin | command is slocate | locate and updatedb | 
- 
- 
-===== Mrxvt ===== 
- 
-^ Solaris ^ OpenSolaris 2008.11 ^ Ubuntu ^ 
-| | [[http://materm.sourceforge.net/wiki/pmwiki.php|Download here]] | | 
- 
-Mrxvt is a nice terminal, with support for transparency and tabs (though I usually do not use tabs !). 
-The only problem is that is doesn't support unicode yet, so French accents are quite ugly ;-) 
- 
-Set the following properties in ~/.Xdefaults: 
-<code> 
-mrxvt*vt0*saveLines:  1000 
-mrxvt*loginShell:  false 
-mrxvt*scrollBar:  true 
-mrxvt*scrollbarStyle: rxvt 
-mrxvt*transparent:  true 
-mrxvt*shading: 85 
-mrxvt*transparentScrollbar: false 
-mrxvt*transparentTabbar:    true 
-mrxvt*transparentMenubar:  true 
-mrxvt*background:  darkblue 
-mrxvt*backgroundFade:  60 
-mrxvt*fading:      0 
-mrxvt*tabForeground:  lightgreen 
-mrxvt*itabForeground:  lightgreen 
-mrxvt*itabBackground:  black 
-mrxvt*bottomTabbar:  true 
-mrxvt*windowsSwitch:  false 
-mrxvt*showMenu:      false 
-mrxvt*hideButtons:  false 
-mrxvt*xft:      true 
-mrxvt*xftFont:      DejaVu Sans Mono 
-mrxvt*xftmFont:      DejaVu Sans Mono 
-mrxvt*xftWidth:      normal 
-mrxvt*xftSize:      12 
-mrxvt*cursorBlink:  false 
-mrxvt*geometry:      80x25 
-mrxvt*cursorColor:  red 
-</code> 
- 
-===== Unicode Rxvt ===== 
- 
-^ Solaris ^ OpenSolaris 2008.11 ^ Ubuntu ^ 
-| [[http://software.schmorp.de/pkg/rxvt-unicode.html|Web page]]. Use CVS to checkout ||| 
- 
-URxvt is a unicode rxvt... so it supports French accents ! It also supports transparency. 
- 
-Set the following properties in ~/.Xdefaults: 
-<code> 
-URxvt*xft:      true 
-URxvt*scrollBar: true 
-URxvt*vt0*saveLines:  1000 
-URxvt*loginShell:  false 
-URxvt*scrollbarStyle: rxvt 
-URxvt*transparent:  true 
-URxvt*shading: 60 
-URxvt*transparentScrollbar: false 
-URxvt*transparentTabbar:    true 
-URxvt*transparentMenubar:  true 
-URxvt*foreground:  orange 
-URxvt*background:  darkblue 
-URxvt*cursorColor:  red 
-URxvt*geometry:      80x25 
-URxvt*scrollColor:  orange 
-URxvt*font: xft:DejaVu Sans Mono:style=Normal:pixelsize=15 
-URxvt*mouseWheelScrollPage: true 
-</code> 
- 
-===== XTerm ===== 
- 
-//This is the simplest, lightest, THE original XTerm// 
- 
-Set the following properties in ~/.Xdefaults: 
-<code> 
-XTerm*font: 9x15 
-XTerm*foreground: lightgreen 
-XTerm*background: black 
-XTerm*scrollBar: true 
-XTerm*vt0*saveLines:  1000 
-</code> 
- 
- 
-===== Useful packages ===== 
- 
-Packages from [[http://www.blastwave.org|BlastWave]] install in /opt/csw. 
-The default Solaris installation (with the entire distribution) includes several software, installed in /usr/sfw. For instance, gcc is in /usr/sfw/bin. 
- 
- 
-  * [[ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/3.0.1/contrib/|firefox3]] (from [[http://www.solaris4you.dk/|Solaris4you]]) 
-  * gam_server is similar to fam. It is contained in SUNWgamin. Do not remove this package unless you accept to break dependencies with gnome-vfs. 
-  * gftp (CSWgftp) 
-  * gnupg (CSWgnupg) 
-  * subversion: SUNWsvn 
-  * tk (CSWtk): this is a graphical toolkit for Tcl. It's required by Gorilla Password Safe. 
-  * top (CSWisaexec): if possible use the 64-bit version in /opt/csw/bin/amd64/top 
-  * [[http://www.webmin.com/|Webmin]] (WSWebmin)  : a neat tool for administration via the web. There's a Solaris package available. Installs in /opt/webmin by default. 
-  * [[http://www.openssl.org/|OpenSSL]] : requires [[http://www.sunfreeware.com/indexsparc10.html|m4]] ! Also, sometimes ar is not found (/usr/ccb/bin) : either add that directory to the adequate path, or create a link to /usr/bin.  
-  * wireshark ([[http://www.blastwave.org/|CSWwireshark]]): like ethereal.  
-  * Xorg headers: SUNWxorg-headers 
-  * XnView ([[http://pagesperso-orange.fr/pierre.g/xnview/frdownloadsolarisx86.html|tar.gz]]): a good image viewer which runs on several platforms including Solaris. To install the soft, unzip the package. Then modify the ./install script and modify directory /usr/lib/X11/app-defaults/XnView to /usr/X11/lib/X11/app-defaults/XnView (Solaris 10 u5). To launch XnView, run /usr/local/bin/xnview. 
 
Back to top
os/unix.1233780163.txt.gz · Last modified: 2009/02/21 21:10 (external edit)
 
 
Get OpenSolaris Recent changes RSS feed Valid XHTML 1.0 Driven by DokuWiki chimeric.de = chi`s home
(c) A. Apvrille - 2009