Linux:Copy, change permissions and ownership of a file in a command

Today I came across a requirement to copy couple of files and change permissions to execute those files when writing some ansible playbooks. We can do this by using cp, chmod, chown command as shown below. Ownership is changed from root user to normal user surendra. ls -l output: -rw-r–r– 1 root root 0(…)

How to open/read epub books in Linux?

This is a small how to on installing epub(Electronic Publications) reader software to read epub books. What is epub means? Epub is a open book standard for reading documents on mobile devices. The beauty of epub books format is that it will adjust its font size to the device display so that user who reads(…)

What is a mount point in Linux/Unix?

Mounting takes place before a computer can use any kind of storage device (such as a hard drive, CD-ROM, or network share). The user or their operating system must make it accessible through the computer's file system. A user can only access files on mounted media —From Wikipedia. From the above statement only a geek(…)

Linux watch command, To monitor a command

watch is an excellent command which can run scripts or commands at a regular intervals or repeatedly. This is very much useful when we want to see a command in continuously running phase similar to top command. This is very much useful when troubleshooting an issue and requires to monitor a command output continuously. If(…)

Set VLC as default video and audio player in Ubuntu

Q. I want to play mkv format file in my Ubuntu machine, but I am unable to do Totem player is asking me some plugins to install. I want to use VLC player as it plays many formats, how can I do that? VLC Player is an excellent player due to its support of many formats and simplicity.(…)

PS1 prompt explained for Linux/Unix

As said in our previous post(Linux booting process) about our up coming posts on Linux prompts. This is first in the series which will give you detail information about PS1 prompt. What is PS1 prompt? PS1 (Prompt String 1) is one of the prompts available in Linux/Unix. When you try to login to any machine, you have(…)

How to Record your Terminal session in Linux?

  Some times its require to record your terminal sessions for future use or some sort of educational purpose. Recording terminal session can be achieved by installing script command(Most of the distributions install this application by default). If the command is not there try to install the package which provides it. Install script command in Linux(Redhat/Fedora/CentOS) Operating(…)

Does rm, cp, mv etc work alphabetically?

Q. Is rm -rf * removes the files in alphabetically? Simple answer is yes, the files/folders are removed in alphabetic sequence. I ran strace command to support my answer. I have 4 files in my dir as shown below [email protected]:~/scripts/temp/temp$ ls -lrt total 0 -rw-rw-r– 1 surendra surendra 0 Oct 10 23:55 c.txt -rw-rw-r– 1(…)

25+ Awesome Linux/Unix command chaining examples

Command chaining is a concept to execute two or more commands in one execution to increase. productivity Reduce system resource usage (In some cases) Short and sweet codes. These are supported by almost every shell we know. Today we will learn how to use different command chaining operators available for us in an easy way.(…)