ls -a: all files and their hidden files
ls -t: sort by creation time
ls -h: real file content size
To tell you the truth, so many usages are sometimes used suddenly. I can’t remember. Maybe we choose to go to Google and Baidu. But today I recommend a method to you, which has improved the efficiency a lot.
man！！！ It’s a little interesting to hear the name. The usage is also very simple.
Direct terminal input
Man command to query
What？ How is it in English? Obviously, it’s not very friendly to many little friends who don’t speak good English.
So, for Linux and MAC. How to install the Chinese version of man!
All students using MAC must have homebrew installed. First, install two packages through brew
brew install automake brew install opencc
After installation, download the Chinese package and compile it. Execute the following commands in sequence!
> git clone https://github.com/man-pages-zh/manpages-zh > cd manpages-zh > autoreconf --install --force > ./configure > sudo make > sudo make install
After the installation, re execute our command just now,
man ls。 Eh, why is it garbled?
At this time, install groff through brew
brew install groff
Edit the file after installation
sudo vim /etc/man.conf
Add on the last line
NROFF preconv -e UTF8 | /usr/local/bin/nroff -Tutf8 -mandoc -c
:WqSave and exit, execute the command again, and you can display Chinese normally
tar -xjf manpages-zh-1.5.2.tar.bz2
> ./configure --disable-zhtw > make && make install
To prevent the conflict between the Chinese version and the original version, use an alias
echo "alias cman='man -M /usr/local/share/man/zh_CN'" >> /etc/profile.d/cman.sh
Then refresh it
In this way, the Chinese version on Linux is installed. Enter
cman lsYou can see all the usage of LS
Well, if you can’t remember the command in the future, you can query it directly. Is it convenient?