Skip to content
The Unix Tips
cat /vishal/brain > theunixtips.com
  • About
  • Contact Me

Category: Shell Scripts

Bash/Shell Scripts

Compare files ignoring a field or column using Process Substitution

Posted on August 9, 2016 by Vishal Jain

Using Process Substitution method, two streams of data can be used with `diff`. This allows pre-processing of files to drop some part (e.g. a column/record per ...

Bash/Shell Scripts/Unix Admin

postfix : Configure outgoing relay server

Posted on March 31, 2014 by Vishal Jain

Add name of outgoing/relaying mailhost as `relayhost` in `/etc/postfix/main.cf` and restart postfix.

Bash/Shell Scripts/Unix Admin

Find the process monopolizing the CPU without using “top”

Posted on March 24, 2014 by Vishal Jain

`ps -eo pcpu,pid,ruser,args | sort -r -k1 | less` provides in reverse sort order the `pid` that is taking up most of `pcpu` and the `ruser` (real user) with `ar...

Bash/Shell Scripts/Unix Admin

bash : grep for pattern from certain location in the file

Posted on August 21, 2011 by Vishal Jain

Using dd, the file can be sliced and then grep can be applied for the pattern on that slice.

Bash/Shell Scripts/Unix Admin

bash : search multiple file patterns using single find command

Posted on June 9, 2011 by Vishal Jain

Using a combination of patterns with "-o" and/or -"a" (which OR the pattern or AND the pattern) in find command, one can search for various patterns or combine ...

Bash/OS Interoperability/Shell Scripts/Unix Admin

Howto rollover a file when size exceeds using unix find

Posted on March 27, 2011 by Vishal Jain

Using -size and -exec flags of find command, one can easily find when the logfile has grown above the threshold and move it to another name in one shot.

Bash/Debugging Tools/OS Interoperability/Shell Scripts

Unix : find affected by current working directory

Posted on February 5, 2011 by Vishal Jain

Many Unix variants (including latest Solaris 11 Express) use a version of find that first looks for current working directory. And if that current working direc...

Bash/Shell Scripts

bash : Count number of recurrence of lines

Posted on January 8, 2011 by Vishal Jain

Using sort and uniq commands, one can count number of recurrences of records in a file.

Recent Posts

  • OTTO – Automate C/C++ CMake for Large Repositories
  • How to persist iptables settings on debian
  • How to Change Console Fonts In Ubuntu for 4K Screen
  • HP Spectre x360 convertible and Linux
  • HOWTO Develop Apache Module in C++

Top Posts

  • xming : Client 4 rejected from IP
  • perl : Extract filename from full path
  • How to persist iptables settings on debian
  • HP Spectre x360 convertible and Linux
  • bash : grep for pattern from certain location in the file
  • perl : Set different TimeZone for script
  • Hardware : Dell GX620 SFF HTPC Bootup problem due to burned up capactiors
  • Sendmail : Configure outgoing relay server
  • HOWTO Develop Apache Module in C++
  • How to Change Console Fonts In Ubuntu for 4K Screen

Recent Posts

  • OTTO – Automate C/C++ CMake for Large Repositories
  • How to persist iptables settings on debian
  • How to Change Console Fonts In Ubuntu for 4K Screen
  • HP Spectre x360 convertible and Linux
  • HOWTO Develop Apache Module in C++

Follow Me

  • LinkedIn
  • GitHub
© 2021 The Unix Tips
Powered by WordPress | Theme: Graphy by Themegraphy