Howto uncompress .txz and .xz files in Linux

Howto uncompress .txz and .xz files in Linux

TXZ compression seems to be starting to take off in the Linux community. Slackware 13.0 is a Linux distribution that is  activley using XZ compression. Slackware used to use gzip and the .tgz extension was used. Now that XZ compression is used the new Slackware packages use the .txz extension. In order to uncompress .TXZ [...]

Linux: cal – display a calendar

cal
Display a calendar

Syntax
cal [-mjy] [[month] year]

Options:

-m Display monday as the first day of the week.

-j Display julian dates (days one-based, numbered from January 1).

[...]

Linux: (g) awk – search and replace.

awk or gawk (gnu awk)
Find and Replace text, database sort/validate/index

Syntax

awk <options> ‘Program’ Input-File1 Input-File2 …

awk -f PROGRAM-FILE <options> Input-File1 Input-File2 …

Key
-F FS
–field-separator FS
Use FS for the input field separator (the value of the [...]

Linux: cut – divide file into columns.

cut
Divide a file into several parts (columns)
Writes to standard output selected parts of each line of each input file, or standard input if no files are given or for a file name of `-’.

Syntax
cut [OPTION]… [FILE]…
In the options below, BYTE-LIST, CHARACTER-LIST, and FIELD-LIST are one or more [...]

Linux: screen – multiplex terminals

screen
Multiplex a physical terminal between several processes (typically interactive shells).

Syntax:

Start a screen session:

screen [ -options ] [ cmd [args] ]

Resume a detached screen session:

screen -r [[pid.]tty[.host]]

screen -r [...]

Linux: chroot – change root directory.

chroot
Run a command with a different root directory.

‘chroot’ runs a command with a specified root directory. On many systems, only the super-user can do this.
SYNTAX
chroot NEWROOT [COMMAND [ARGS]…]

chroot OPTION
Ordinarily, filenames are looked up starting at the root of the directory structure, i.e. [...]

Linux: du – Disk Usage

du
Disk Usage – report the amount of disk space used by the specified files and for each subdirectory.

Syntax
du [options]… [file]…
With no arguments, `du’ reports the disk space for the current directory. Normally the disk space is printed in units of 1024 bytes, but this can be [...]

Linux: adduser

NAME
useradd – Create a new user or update default new user information 

SYNOPSIS

useradd [-c comment] [-d home_dir]
[-e expire_date] [-f inactive_time]
[-g initial_group] [-G group[,...]]
[-m [-k skeleton_dir] | -M] [-n] [-o] [-p passwd] [-r]
[-s shell] [-u uid] login
useradd -D [-g default_group] [-b default_home]
[-e default_expire_date] [-f default_inactive]
[-s default_shell]

DESCRIPTION

Creating New Users
When invoked without the -D option, the useradd command [...]

Making a simple ListBox with GTK and Glade3.

Adding a simple ListBox widget in your GTK application is easier than you think. This tutorial will show you how to create ListBox-like functionality in GTK using Glade3. GTK uses the TreeView control as their do-all list control. You can create simple lists, tree-like lists and all sorts of various list views. What is really [...]

Read More »

Glade 3 + GtkBuilder + Anjuta Example.

Today I whipped up a simple GTK application using the Anjuta IDE, Glade 3, and the new GtkBuilder system. As some of you know, Glade 3 and GTK changed things up. First Glade stopped using generated code which required you to use libglade. Now the GTK developers created their own interface interpretor called GtkBuilder. [...]

Read More »

Get Windows Service info in C#.

This code will show you how to search for Windows Services. The ServiceController class handles almost everything service related. You can also check if services are running by checking the service.Status property and you can search for installed services using the sample code below. The services we are talking about are the services that run [...]

Read More »

Visual Basic comes to Linux.

Visual Basic for Linux is here, sort of. In my search for the perfect RAD environment for Linux I came across a project called Gambas. Gambas is a Visual Basic like development environment for Linux which is very much like Microsoft’s drag and drop Visual Basic but it is not a clone. For an Open [...]

Read More »

Add background color to PNG files in C#.

This code snippet will let you force a background color into a PNG file with C#. When working with PNG files in Visual Studio sometimes you’ll run into situations where the background of a PNG shows up as grey or even blue. This is because of the PNG files transparency and Windows can sometimes [...]

Read More »

C#: A multi-threaded UDP server with BackgroundWorker.

The following code shows you how to build a UDP server in C# using the UUdpClient class for the networking and BackgroundWorker class for reporting data back to the application. This particular UDP server class is designed to be used with a Windows Forms or GUI. When using the UDP server you pass a BackgroundWorker [...]

Read More »