≡ Menu


awk / cut: Skip First Two Fields and Print the Rest of Line

I'd like to skip first two or three fields at the the beginning of a line and print the rest of line. Consider the following input:

This is a test
Giving back more than we take

I want my input file with the following output:

a test
more than we take

How do I printing lines from the nth field using awk under UNIX or Linux operating systems?
[click to continue…]

Bash Remove Last Character From String / Line / Word

I have a file of that looks as follows:

foo bar
tom jerry
UNIX Linux

Each word and/or Linux is a different length. How do strip or remove the last character from each line using bash or ksh shell only on a Linux or Unix-like systems?
[click to continue…]

Linux Display System Statistics Gathered From /proc

How do I display information from /proc such as memory, Load average, uptime, page activity, context, disk status, interrupts using a shell or perl script?
[click to continue…]

HowTo: Upgrade Debian 5.0 (Lenny) To Debian 6.0 (Squeeze)

Debian 6.0 "Squeeze" has been released and how do I upgrade to Debian GNU/Linux 6.0 from the previous release, Debian GNU/Linux 5.0 ("Lenny") using command prompt?
[click to continue…]

Linux exec-notify: Find Out Shell Escaping Applications [ Security Monitoring ]

How do I watch or monitor applications that executed on a system and executes external programs via "bash"?
[click to continue…]

Verify: SSL Certificate Under OpenSSL

All UNIX / Linux applications linked against the OpenSSL libraries can verify certificates signed by a recognized certificate authority (CA). How do I verify SSL certificates using OpenSSL command line toolkit itself under UNIX like operating systems without using third party websites?
[click to continue…]

FreeBSD: Disable / Stop Console Beep ( Bell )

I know how to turn off console beep under Gnome Linux desktop. How do I stop console beep under FreeBSD operating systems?
[click to continue…]

UNIX: Loop Through Files In A Directory

How do I loop through files in a directory under UNIX like operating systems?
[click to continue…]

Truncate Large Text File in UNIX / Linux

How do I truncate or shrink large text file under UNIX / Linux operating systems?
[click to continue…]

Removing a Directory In Linux

How do I remove a directory in Linux using the shell prompt?
[click to continue…]