Showing posts with label unix. Show all posts
Showing posts with label unix. Show all posts

Thursday, November 13, 2014

Byobu shortcuts for screen/ssh

Byobu is a lifesaver for multiple jobs to be done on the command line via ssh client.
Currently I am using it in putty.
You can create, close and detach... and come right back to the place you left off!

Here are some of the handy commands

Start with byobu

Ctrl-a, c: create a new window
F8: rename
Ctrl-a C-a - Go back to the previous window

Ctrl-a <0-9> - Switch to screen # 0-9.
If you want to go to screen # 10,
Ctrl-a ' - Enter a screen number to switch to two digit number

Ctrl-a " - View a list of the current screens, which will allow you to select one from the list

Ctrl-a d - Detach the whole screen session and fork to the background. Very useful for remote sessions you want to leave open. The command "screen -r" will resume your screen session.

Ctrl-a, k: kill the screen. Usually detach is good; but sometimes you need to kill the screen/process.

If you hit F9, you can set options to start with byobu screen.

Ctrl-a, n or p does next and p



Monday, June 17, 2013

Create SSH alias

Pretty easy!
In terminal do:
vi ~/.ssh/config #add the following lines Host myserver User username HostName host.server #then esc, :wq # Then ssh myserver should do the magic.
-->

Tuesday, May 28, 2013

copy the list of files to another folder

I had a list of file, to be copied to another folder location for compiling them together. This worked!
cat listFile.txt | while read line; do cp "$line" /Users/asdf/Documents/compile; done
-->

Tuesday, May 1, 2012

Basic unix shell scripting tutorial revision

I wanted to revise shell scripting to my friend. Here are the list of commands that we used.

The kernel: agent
The shell: interface between the user and the kernel,
command line interpreter
bash
tcsh
etc
http://unixhelp.ed.ac.uk/shell/oview2.html

(show terminal)
You can scroll up and down with arrow key...

Thursday, February 24, 2011

Running command line programs in Mac

Type in textwrangler

#!/bin/bash
cd /applications/IDV
./runIDV

Saved it as runIDV.command in home

Right click on the item and then create alias. Move the alias to the Applications folder on the dock.

Bingo!