A CD is a command that the project master uses every day.
Share a few tips on CD today.
Cd
If you use CD ~ To enter the current user's home folder, then you can try to hit the CD directly.
The same effect, less knocking two keyboards.
CD-
CD-Used for switching between two working folders in the near future. For example, it is now below/usr and then Cd/var. If you want to return to/usr below, you can use CD-.
CD ~username
This command can be accessed directly into the Username home folder.
Cd+ls
According to my observation. A lot of the next command the project teacher has after he finishes the CD is LS. So. The ability to consider combining two commands.
In the. bashrc file, add the following code after you enter the folder to list the files in the folder:
function CD () {Builtin cd ${1:-$HOME} && ls;}
Mkdir+cd
After you create a new folder, you will typically get to that folder. As a result, two commands can be combined together. In the. bashrc file. Add the following code to create a new folder and enter the folder later with the command MKDIRCD.
function Mkdircd () {mkdir-p "[email protected]" && eval cd "\" $$#\ "";}
In some distributions of Linux, use the. will be able to access the parent folder.
If you use a version number that does not have this function, add the following code to the. BASHRC, for example.
Alias.. = "CD.."
You can also define ... to enter the two-tier folder.
If you want to know the latest tricks, please follow the public number "project Division"
Copyright notice: This article blog original article. Blogs, without consent, may not be reproduced.
Quick Tips for several CDs