Share Linux skills to make you an efficient developer!

As an open source operating system, Linux has always been favored by developers. However, for beginners, mastering Linux skills can take a lot of time and effort. Today, we will share some practical Linux tips to make you an efficient developer and help you go further in the programming world!

Example 1

Create an alias, delete the original file, and save a copy in backup in the user's home directory.

#/bin/bash
cp $@ ~/backup && rm -rf $@

Example 2

Fork bomb

:(){:|:&};:

Example 3

Generate an 11-digit random password, including uppercase and lowercase letters, numbers and special (/ and +) symbols.

openssl rand -base64 200|cut -b 1-11|head -n 1

Example 4

Without switching the current working directory, use the cd command and display the content of the target directory after switching.

(cd /bin;ls)

In this example, use () to define a subshell , which has no effect on the current shell, and all changes are limited to the subshell. The above operations are especially useful in some scenarios.

Example 5

In order to prevent the currently executing task from being interrupted due to the exit of the current working terminal, we can randomly open the

Guess you like

Origin blog.csdn.net/shengyin714959/article/details/130911120