我喜欢ls -l
通过消除前 4 列来限制命令中显示的列。
ls -lh
显示:
drwxr-sr-x 20 gamma alpha 4.0K May 22 13:18 Desktop
drwxr-sr-x 3 gamma alpha 22 Oct 6 2014 Eclipse
-rw-r--r-- 1 gamma alpha 28K Jul 11 2014 fire
drwxr-sr-x 5 gamma alpha 48 Mar 31 2014 lb_deployment
Run Code Online (Sandbox Code Playgroud)
为了消除前四列,我尝试了ls -lh | cut -d " " -f5-
. 但它的行为不符合预期:
4.0K May 22 13:18 Desktop
alpha 22 Oct 6 2014 Eclipse
alpha 28K Jul 11 2014 fire
alpha 48 Mar 31 2014 lb_deployment
Run Code Online (Sandbox Code Playgroud)
我喜欢它看起来像这样: …
当我运行该alias
命令时,我看到一个别名,但我不知道它是在哪里定义的(即我找不到包含该别名定义的文件)。我检查过/etc/profile
,,,,,和其他一些~/.bashrc
,但无济于事。~/.profile
~/.bash_profile
~/.bash_login
/etc/bash.bashrc
有没有办法找出alias
命令从哪些文件获取信息?我的意思是该命令如何alias
工作?它是否读取一些预先确定的文件来查找别名定义?