Advanced

23 Awesome less known Linux/Unix command chaining examples

Posted by linuxnix on · Post a comment
The Linux Juggernaut; By Surendra Anne
Mail this story
Print this story

Command chaining is a concept to execute two or more commands in one shot to increase .. productivity Reduce system resource usage(In some cases ) Short and sweet codes . In this post we will see how to use different command chaining operators available for us in an easy way. Command chaining operators & –Forking

Command chaining is a concept to execute two or more commands in one shot to increase ..

productivity Reduce system resource usage(In some cases ) Short and sweet codes . In this post we will see how to use different command chaining operators available for us in an easy way.

Command chaining operators & –Forking operator(run in background parallelly ) ; –Run multiple commands in one run, sequentially. –To combine a big command for multiple lines && –Logical AND operator || –Logical OR operator ! -NOT operator(I did not find much info on this.0) | — PIPE operator {} –Command combination operator. () –Precedence operator

& – Forking operator(AND operator): This operator is used to send a process/script/command to run background so that we can execute other commands in foreground to increase effective utilization of system resources and to speed up the script execution. This is also called as Child process creation or forking in other programming languages.

Example1: Run commands in background

$ping -c1 google.com &

Full Story

  Nav
» Read more about: Story Type: Editorial, News Story, Tutorial; Groups: Immunix, Red Hat, SCO, Slackware, Sun, SUSE, Turbolinux, Ubuntu

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments

No comments yet. Be the first.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post