sort command

I need to get a list of sizes in human readable du output format. How do I get the output for du command in GB under Linux or UNIX operating systems?

{ 1 comment }

How To Use awk In Bash Scripting

by Vivek Gite on August 15, 2009 · 22 comments

How do I use awk pattern scanning and processing language under bash scripts? Can you provide a few examples?

{ 22 comments }

I type the following command:

ps -auxf | sort -nr -k 4 | head -10

And I get the output along with warning message:

Warning: bad syntax, perhaps a bogus ‘-’? See /usr/share/doc/procps-3.2.7/FAQ


How do I fix this problem?

{ 0 comments }

Linux / UNIX Shell: Sort Date

by Vivek Gite on October 23, 2008 · 8 comments

Q. How do I sort date type of data stored in a text file which is in following sample format:

Code         Date          TIME
HOS05	23/12/2008	10AM
HOS06	15/12/2008	2PM
HOS62	29/12/2008	10AM
HOS64	23/12/2008	2PM
HOS70	26/12/2008	10AM
ZFT01	06/12/2008	10AM
HOS73	11/12/2008	2PM
MHOS051	05/12/2008	10AM
MHOS041	20/12/2008	2PM
MHOS042	27/12/2008	2PM
MHOS053	11/12/2008	10AM
MHOS043	30/12/2008	2PM

How do I sort data date and time wise?

{ 8 comments }

Shell: How To Remove Duplicate Text Lines

by Vivek Gite on September 19, 2008 · 22 comments

Q. I need to sort data from a log file but there are too many duplicate lines. How do I remove all duplicate lines from a text file under GNU/Linux?

{ 22 comments }

Linux / UNIX Shell: Sort IP Address

by Vivek Gite on September 17, 2008 · 6 comments

Q. I’d like to sort a list of IP address stored in a text file. How do I sort by last notation or entire address under Linux or UNIX operating systems?

{ 6 comments }

Diagnosing a dos Attack Under Linux

by Vivek Gite on February 17, 2008 · 0 comments

Q. How do I find out if I Linux box is under DoS attack or not form a shell prompt?

{ 0 comments }