Tag:
terminal

Echo text without a trailing newline

by
on
February 18, 2011

By default the echo command will include a trailing newline at the end of a string. There are many times when you may want to suppress this newline for example when you want to format text in a certain way.There are a couple easy ways to do this. First you can use the ‘-n’ option. [...]

Read More
No Comments
bash

How to SSH into Ubuntu LiveCD

by
on
December 16, 2008

The ability to remotely SSH into a machine running an Ubuntu LiveCD can come in handy in many situations. The LiveCD supports a large variety of hardware and can be used to troubleshoot system problems on a machine where you have limited or no access. A user with limited skills can easily setup remote access [...]

Read More
2 Comments
ubuntu

Find controlling terminal with ttyname

by
on
November 6, 2008

You can identify the path the the controlling terminal device path for your current process in C with the ttyname() system call. This controlling terminal can be a virtual console (/dev/ttyn) or a pseudo-terminal (/dev/pts/n). The ttyname system call takes the following format. char *ttyname(int fd); The stdin, stdout, stderr file descriptors unless redirected are [...]

Read More
No Comments
C
Copyright 2008-2010 WiredRevolution.com. All rights reserved.