grep command

How do I clear squid cache? How do I re-create the cache directories on a server where Squid version 3.x is currently running in Linux or Unix based server?

{ 3 comments }

How do I find out what is listing or using tcp port number 80 on Linux based systems using command line options?

{ 4 comments }

I am porting ksh script from Sun/Oracle Unix to Linux. How do I install ksh (KornShell) in CentOS / Fedora / Red Hat Enterprise Linux? How do I run and test ksh script on RHEL/CentOS Linux?

{ 0 comments }

I am using awk to grep ‘foo’ from a text file and cacluate sum of field # 7. But, result is rounded to an integer. I need exact result such as 385858.66 and not 385858 using the following command:

grep ‘foo’ 2012-2013.txt | awk ‘BEGIN{ sum=0.0}{ sub(“,”,””,$7); sum +=$7}END{ print “$” sum}’
$682444

I want $682444.57 as output. How can I force “awk” to do floating point math?

{ 1 comment }

How do I find out if a service such as MySQL or Apache running on my Centos/RHEL/Fedora Linux server?

{ 7 comments }

I am new Linux and Unix-like system user who recently switched from MS-Windows XP. How do I save the output of a Linux / Unix ls command to a file named “lists.txt” using command prompt or POSIX shell such as SH/KSH/BASH?

{ 0 comments }

The top and free command display the total amount of free and used physical and swap memory in the server. How do I determine which process is using swap space under Linux operating systems? How do I find out swap space usage of particular process such as memcached?

{ 7 comments }