How does grep exclude directory, file, keyword in Linux/unix
Grep command supports multiple exclusion methods, including grep exclude directory, grep exclude file, grep exclude binary files, and grep exclude keywords....
How to grep ignore case in linux/unix
In linux/unix, we can use the grep -i option to ignore case matching search keywords. grep ignore case syntax: grep -i "keyword" file...
How to find and replace specified string with sed in linux/unix
find and replace content in linux: Use the grep command and sed command to search and replace, Use the find command and sed command to...
How to remove lines with specific line number from text file with awk or sed in Linux/unix
Remove specific line numbers in linux/unix, use awk NR variable to delete a specific line numbers, use sed command action option "d" to delete a...
How to use sed to replace multiple patterns at once in linux/unix?
sed is a powerful streaming text editor, and replace pattern is one of the most used functions. This article introduces how to replace multiple patterns...
How to remove the first line of a text file using the linux command line?
remove the first line: use awk NR variable, awk '{if(NR>1){print $0}}' file ; use sed action option d, sed '1d' file; use tail n...
How to delete empty lines in a text file in linux/unix
To delete blank lines in a text file, you can use awk NF variable, awk regular expression, sed regular expression and grep -v '^$'...
How to delete lines containing a specific string in a text file in linux/unix
Delete lines containing a specific string in a text file, we have three implementation methods: sed -i '/ pattern/d', grep -v 'pattern' and awk '!/pattern/...
How to sort by size using the du command
The default options of the linux du command are not sorted according to the size of the disk. If you want to display the results...
How to mount volume in docker container
Docker run use -v bind mount a volume. You can also modify the docker hostconfig.json and config.v2.json configuration files to mount volumes to existing docker...
How to map the docker container network port to the host port
When running the docker container, you can use -p for port mapping. This article describes running a new container mapping port and mapping an existing...
How to change permissions folder and all its subfolders and files in linux
Changing the permissions of a folder and its subfolders and files is often used in Linux operations.For example: To change all the directories and files...
How to set docker container host name
When we start a new container, the default host name is the container’s id. This host name is not only easy to remember, but also...
How to rename the docker container name
In the previous article, we introduced how to rename the docker image name. This article will show you how to rename the docker container. List...
How to rename the docker image name
Docker image rename,
docker tag: Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE;
docker rmi: remove the SOURCE_IMAGE image....