Tag Archives: linux command

linux file properties and permissions

In Linux system, there are three most common file permissions: read (R), write (W) and execute (X) permissions. In Linux system, each file clearly defines the access rights of different identity users, which can be seen through ls command. Example … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on linux file properties and permissions

rename file linux – use rename cmd or mv cmd or awk cmd

Rename file in linux has two ways: linux rename command and linux mv command. linux rename command rename command – renames multiple files. Ubuntu is used as the test system, it does not have the remanae command installed by default. … Continue reading

Posted in File & Directory, Awk Command, Internet Technology | Tagged , , | 2 Comments

linux iostat syntax and iostat examples

linux iostat command is an abbreviation for I/O statistics (input/output statistics). Iostat is a computer system monitor tool used to collect and show operating system storage input and output statistics. Syntax interval: The interval parameter specifies the amount of time … Continue reading

Posted in System | Tagged , , | Comments Off on linux iostat syntax and iostat examples

Linux load average high, Java project

Linux load problems, in daily development, often suffer from us; below to sort out several factors that lead to changes in Linux load. Case 1: CPU high, Load high 1. Use the top command to find the process PID that … Continue reading

Posted in Monitor | Tagged , | Comments Off on Linux load average high, Java project

linux ps command and ps examples

Linux ps command is an abbreviation of Process Status. The linux ps command is used to list those processes currently running on the system. The ps command lists the snapshots of the current processes, that is, the processes at the … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on linux ps command and ps examples

Open SSH service in Ubuntu

SSH is divided into client (openssh-client) and server (openssh-server). If you just want to log in to SSH of other machines, you only need to install openssh-client; Openssh-client is installed by default on Ubuntu system. If not, you can install … Continue reading

Posted in System | Tagged , | Comments Off on Open SSH service in Ubuntu

AWK tutorial: awk group by count

When we are dealing with log files, we often need to count the number of times some keywords appear. For example, count the number of times the access log ip appears. Here we can use linux awk command to handle. … Continue reading

Posted in Awk Command, Text Processing | Tagged , , , | Comments Off on AWK tutorial: awk group by count

awk custom function and examples

Here, you need to use the awk custom function to implement the abs function.

awk ‘function abs(x){return (x Continue reading

Posted in Awk Command, Text Processing | Tagged , , , | 1 Comment

AWK tutorial: find and kill process use awk

Step 1. View the process ID pid of the top command.
Step 2. Use the awk command to get the process ID.
Step 3. Use xargs kill to kill top process ID. Continue reading

Posted in Awk Command, Text Processing | Tagged , , , | 1 Comment

AWK tutorial: awk -F and awk BEGIN{ FS … }

Usually, when I use awk for text processing, I prefer to use the awk -F option for text field separation. Of course, we can also use the combination of BEGIN and FS to achieve the same goal. Let’s take a … Continue reading

Posted in Awk Command, Text Processing | Tagged , , , , | Comments Off on AWK tutorial: awk -F and awk BEGIN{ FS … }

AWK tutorial: awk regex example

What Is Regex?
Types of Regex:BRE and ERE.

Awk using BRE regex Patterns, Special Characters;

Awk using ERE regex Patterns, matches the start of text… Continue reading

Posted in Awk Command, Text Processing | Tagged , , | Comments Off on AWK tutorial: awk regex example

How to split large files by line or by file size in Linux

When Linux splits large files, we usually use the linux split command to split files by line or by size.
When you split the file, also need to use the split of the string. Continue reading

Posted in File & Directory, How to | Tagged , , | Comments Off on How to split large files by line or by file size in Linux

grep multiple words/patterns/strings, and/or condition, use -e or regex

grep multiple words

You can use grep -e parameters and pipes (“|”) to implement grep multiple words “and” query, “or” query … Continue reading

Posted in File & Directory | Tagged , , | Comments Off on grep multiple words/patterns/strings, and/or condition, use -e or regex

linux grep process by name/by id and kill example, and grep -v example

linux grep process

– grep process name;
– grep process by port;
– grep process id and kill;
– grep process without itself;
– grep process without grep
Continue reading

Posted in File & Directory | Tagged , , , | Comments Off on linux grep process by name/by id and kill example, and grep -v example

How to count using the grep command in Linux/Unix

linux grep count * ; – grep count lines; – grep count words; – grep count files; – grep count sort; – grep two words on the same line …… Continue reading

Posted in File & Directory, How to | Tagged , , | Comments Off on How to count using the grep command in Linux/Unix