Dear bo Friends, Hello, I was a bit busy last month, so there is no update blog, this time for you to bring the "Z command"
When we use the "CD" command to enter a particularly long directory, it will feel very troublesome, Z command can solve the problem
Z Source of command: https://github.com/rupa/z/blob/master/z.sh
Copy and paste the source code of the z command to the Linux home directory with the file name "z.sh"
Use "source z.sh" for it to take effect, now you can use the Z command
Z Command + directory name (this directory must be previously skipped)
The steps are as follows:
[[email protected] ZYJTF 孤云暮雨 ~]
# pwd
/root
[[email protected] ZYJTF 孤云暮雨 ~]
# z
-
bash
: z:
command
not found
[[email protected] ZYJTF 孤云暮雨 ~]
# vim z.sh
[[email protected] ZYJTF 孤云暮雨 ~]
# source z.sh
[[email protected] ZYJTF 孤云暮雨 ~]
# cd /etc/sysconfig/network-scripts/
[[email protected] ZYJTF 孤云暮雨 network-scripts]
# cd
[[email protected] ZYJTF 孤云暮雨 ~]
# z network-scripts
[[email protected] ZYJTF 孤云暮雨 network-scripts]
# pwd
/etc/sysconfig/network-scripts
[[email protected] ZYJTF 孤云暮雨 network-scripts]
# cd
[[email protected] ZYJTF 孤云暮雨 ~]
# z
common:
/etc/sysconfig/network-scripts
12
/etc/sysconfig/network-scripts
This article is from "ZYJTF Lone Cloud Twilight" blog, please be sure to keep this source http://zhangdaifu.blog.51cto.com/11848193/1963407
Linux using Tricks z command