Archive for category: UNIX

Adding an User to an Existing Group

26 June, 2010 (06:30) | Linux, Mac OS X, UNIX, [English Posts] | By: Wolfgang

To add an existing user to an existing group from the command line use the following commands:

On Linux
usermod -a -G username groupname

On Mac OS X
dscl / -append /Groups/groupname GroupMembership username

Escaping Spaces in scp Commands

12 June, 2010 (06:30) | Linux, UNIX, [English Posts] | By: Wolfgang

Command line users know that the best way to deal with spaces in filenames is not to use them. If you still have to, it is necessary to escape the command arguments accordingly. Sometimes it might be enough to put quotes around the string, other times a backslash in front of every space character ...

How to Control screen from Within Other screen Sessions

19 May, 2010 (23:22) | Linux, Mac OS X, screen, UNIX, [English Posts] | By: Wolfgang

Today a tip for all the GNU screen fans out there. It's really nothing special and the manpage readers might already know this but as I only figured this out lately I thought I would share it anyway:

By default control sequences in screen begin with C-a (pressing Ctrl and a at the same time). ...

Autostart GNU Screen on a zsh Login Shell

16 May, 2010 (23:49) | Linux, UNIX, [English Posts] | By: Wolfgang

To automatically start GNU screen every time you log into your zsh shell just put the following command into your $HOME/.zprofile:

screen -DR

The advantage of placing the command in the .zprofile file is that it is only read by login shells. The -DR option creates a new screen session or reattaches a running one. The ...