Home » Shell Scripting (page 4)

Shell Scripting

Linux cut Examples

In this post, we feature comprehensive Linux cut Examples. Cut is a Unix command line utility which is used to extract sections from each line of input, usually from a file. It is currently part of the GNU coreutils package and the BSD Base System. It first appeared in AT&T System III UNIX in 1982. Extraction of line segments can ...

Read More »

10 Examples of find command in Unix and Linux

The find command is one of the versatile commands in UNIX and Linux  and I used it a lot in my day to day work. I believe having good knowledge of it and understanding of its different options and usage will increase your productivity a lot in UNIX based operating system e.g. Redhat Linux or Solaris. If you are a QA, support ...

Read More »

Linux sed Examples

In this post, we feature a comprehensive Linux sed Examples. Sed is basically a stream editor used for modifying files in unix or linux. It provides a nifty way to perform operations on files which can be passed around through pipes. Most people never learn its real power, they just simply use sed to replace text. You can do many ...

Read More »

Bash completion for Docker

When you interact a lot with command line tools, such as : docker , docker-machine and docker-compose, command line completion (using the tab key) is a must. Let’s have a look at how to enable bash completion for those docker command line tools Mac user ? install bash-completion I suppose you already use brew on Mac to install additional packages; ...

Read More »

Using rlimit (And Why You Should)

I’ve been going through some old notes and came across a reminder of setrlimit(2). This is a C system call that allows an application to specify resource limitations on a number of important parameters: RLIMIT_AS – The maximum size of the process’s virtual memory (address space) in bytes. RLIMIT_CORE – Maximum size of core file. RLIMIT_CPU – CPU time limit ...

Read More »

Linux tar Examples

In this post, we feature a comprehensive Linux tar Examples. I am a real fan of learning Linux commands by examples and from my personal experience it will really help to see some Linux tar command examples. But first, a brief bit of background information. The name “tar” stands for “tape archive”. As that name implies, originally it was a ...

Read More »

Migrating from bash to zsh

These are my steps in migration from bash to zsh. I’m documenting these to keep the future reference for me (and possibly other readers as well). Motivation? Check out the Slideshare presentation: Why Zsh is Cooler than Your Shell Current shell to find out the current shell: ps -p $$ it’s useful during migration to make sure the new shell ...

Read More »

Adding new machine to rc files sync

Some time ago I wrote a post on linux productivity tools I use. As from time to time I need to install new machine that would benefit from the synced rc files, I’ll document the steps required (as rediscovering it every time is rather a waste of time). What I’d need I’ll use the previously introduced: oh-my-zsh homeshick vim’s vundle ...

Read More »

Linux chown Example

1. Introduction In this example, we feature a comprehensive Linux chown Example. We will see how to use the Unix-like system command chown The chown command changes the owner and owning group of files. 1.1 Linux Machine If you are on Windows OS, before we get into the details of this command, I would suggest you to have a Linux machine ...

Read More »