Showing posts with the label Unix

Split File Using Awk Command - Unix / Linux

The split command in unix is used for creating fixed size pieces of output files from a given input file. However there is no option in the...

Execute a Command at a given Time in Unix

Q) How to execute a command in unix or linux at a specific point of time.? Recently I got a requirement from one of our client to execute...

Connect to Postgres Database in Unix Shell Script

Q) How to connect to postgres database from unix shell or bash script and run sql queries? The postgres command line utility, psql, can b...

Vim / vi Editor Commands for Copy / Paste and Delete

Vim is a beautiful editor in linux / unix operating system. The vim editor has got lot of in-built commands for doing numerous operations. ...

Check if a Directory Exists in Shell Script - Unix

How to check whether a directory exists or not in unix or linux shell script? I want to check for the directory existence in the shell sc...

Know the User Shell - Unix / Linux

Know User Shell : How to know which shell you are using in unix or linux environment? User Shell There are different ways to know the...

View Phpinfo from Command Line

Phpinfo from Command Line : How to view the phpinfo from the command line on unix or linux terminal? phpinfo from command Line To view ...

Unix Sed Command to Delete Lines in File - 15 Examples

Sed Command to Delete Lines : Sed command can be used to delete or remove specific lines which matches a given pattern or in a particular p...

How to recover lost root user password in Unix /linux

Creating a complex password is a very important issue in our life. So that no one hacks our password. The more complex is the password, the...

Sort Files By Size In Unix / Linux ls Command

Q) How to sort the list of files in a directory based on the size of the file using the unix or linux ls command? The ls command in unix ...

Read Password Without Showing / Displaying on the Screen - Unix Bash Script

Q) My requirement is to write a bash script which prompts for the username, Password and then do some operations. When the password is ente...

Sed Command to Print Matching Lines - Unix / Linux

We use sed command mostly to do operations like search and replace. We can also use the sed command just like a grep to print only the matc...

Assign output of Shell Command To variable - Bash script

How can one assign the output of the shell command to a variable in bash script under unix and linux like operating systems. Bash provid...

Tail Command Examples in Unix / Linux Tutorials

The tail command in unix or linux system is used to print the last N lines from the file on the terminal. Tail command is especially used w...

Head Command Examples in Unix / Linux Tutorials

The head command in unix or linux system is used to print the first N lines from the file to the terminal. The syntax of head command is h...

Uniq Command Examples in Unix and Linux Tutorials

Uniq command in unix or linux system is used to suppress the duplicate lines from a file. It discards all the successive identical lines e...

Translate/ tr Command Examples in Unix and Linux Tutorials

Tr stands for translate or transliterate. The tr utility in unix or linux system is used to translate, delete or squeeze characters. The s...

Chmod Command Examples in Unix / Linux Tutorials

Chmod (change mode) is one of the most frequently used commands in unix or linux operating system. The chmod command is used to change the ...

Top Command Examples in Unix / Linux Tutorials

Top command in unix or linux operating system is one of the useful commands to know about the system information. The top command provides ...

Remove Duplicate Strings / Words from line in Unix / Linux

Q) I have the following file with data in my linux system: $ cat sample.dat unix,linux,linux,server unix,unix,dedicated server Here in ...

Load More That is All