shell
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
shell [2010/06/04 12:57] – admin | shell [2010/06/11 12:17] (current) – removed 172.26.14.218 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Shell tips ====== | ||
- | ====== Environment Modules ====== | ||
- | The [[http:// | ||
- | |||
- | < | ||
- | R is /usr/bin/R | ||
- | $ module load R/2.11.0 | ||
- | $ type -a R | ||
- | R is / | ||
- | R is / | ||
- | |||
- | ===== Searching for a string in multiple files ===== | ||
- | Ever need to search through all your files for a certain word or phrase? You probably know about the grep command, but did you know it's recursive? | ||
- | |||
- | Here's an example. In this case we're searching for the word " | ||
- | |||
- | < | ||
- | |||
- | By using the " | ||
- | |||
- | If you'd rather just get the file names and skip the rest of the output, use the " | ||
- | |||
- | < | ||
- | |||
- | Here's another tip: grep also supports regular expressions, | ||
- | |||
- | < | ||
- | |||
- | That command will print a list of files containing any word starting with " | ||
- | |||
- | You can also use grep to search for multiple words: | ||
- | |||
- | < | ||
- | |||
- | And, of course, grep supports file name wildcards in the standard unix fashion. In this example, grep will search only file names starting with " | ||
- | |||
- | < | ||
- | |||
- | ====== GNU screen tips ====== | ||
- | GNU screen is a terminal multiplexer. That means you can run multiple terminals inside one terminal. | ||
- | |||
- | {{: | ||
- | |||
- | ===== Basic usage ===== | ||
- | * Start screen by typing '' | ||
- | * To get help, just use “Ctrl-A” then “?”. | ||
- | * Create a new window: '' | ||
- | * Switch to the previous window: '' | ||
- | * Switch to the next window: '' | ||
- | * Alternate between two windows: '' | ||
- | * Switch to a window by number: '' | ||
- | * List active screen' | ||
- | * Re-attach to screen: '' | ||
- | * Detach from the window using '' | ||
- | * To scroll window, press '' | ||
- | |||
- | C-u - Scrolls a half page up | ||
- | C-b - Scrolls a full page up | ||
- | C-d - Scrolls a half page down | ||
- | C-f - Scrolls the full page down | ||
- | |||
- | |||
- | ===== Tweaks ===== | ||
- | |||
- | To make your screen a little easier to use, add these lines to the appropriate files and your screen will show a status bar at the bottom with a list of programs running, time, date, etc. | ||
- | |||
- | ==== ~/.screenrc ==== | ||
- | < | ||
- | # it will be a login shell (and will process normal bash startup files). | ||
- | shell -/bin/bash | ||
- | |||
- | defscrollback 2048 | ||
- | vbell off | ||
- | msgwait 1 | ||
- | msgminwait 1 | ||
- | |||
- | #dynamic titles | ||
- | shelltitle '$ | bash' | ||
- | |||
- | #Display date and other information in colorred window | ||
- | hardstatus on | ||
- | hardstatus alwayslastline | ||
- | hardstatus string " | ||
- | |||
- | ==== ~/.bashrc ==== | ||
- | < | ||
- | export PS1=' | ||
- | ===Bluetooth=== | ||
- | sudo apt-get install obextool gnome-vfs-obexftp blueman | ||
- | |||
- | === Statically linking executable === | ||
- | |||
- | < | ||
- | < |
shell.1275656264.txt.gz · Last modified: by admin