我们总是可以通过使用alias命令来查看alias值。
wolf@linux:~$ alias al='grep "$1" file.txt'
wolf@linux:~$ alias al
alias al='grep "$1" file.txt'
wolf@linux:~$
不幸的是,grep不能使用别名。不知道是什么问题。如果你知道问题和解决办法,请告诉我。
wolf@linux:~$ al
random text
abc def jkl
random text
abc ghi jkl
random text
wolf@li
我习惯于打字
$ cd
在bash中没有参数导航到我的主目录。
然而,由于一些未定的时间,这不再起作用,只是什么也不做。
设置了我的HOME变量:
$ echo $HOME
/home/me
这怎么可能呢?上面写着
If no directory operand is given and the HOME environment variable is set to a non-empty
value, the cd utility shall behave as if the directory named in the HOME environment
variable was speci
Apache无法使用mod_wsgi启动Django WEB应用程序,我不能找出原因。
启动apache的错误是这样的
linux-ua6r:/etc/apache2/vhosts.d # /etc/init.d/apache2 start
redirecting to systemctl start apache2
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -n' for details.
linux-ua6r:/etc/apa
我真的不关心bash别名,但是有可能获得mysql函数的快捷方式吗?比方说,如果我想描述一个表,是否可以只执行ds table_name,而不是键入整个表?
如果重要的话,我将使用以下内容:
bash -版本GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
mysql --版本Ver 14.14 Distrib 5.5.38, for debian-linux-gnu (x86_64) using readline 6.3
为了便于访问,我试图为应用程序创建一个别名,而不是进入目录并运行它。
alias cpanel-run='"$(cd /home/ian/projects/electron/cpanel-linux-x64/)" "$(cpanel)"'
但它只显示
bash: ./cpanel: No such file or directory
Command '' not found, but can be installed with:
sudo apt install bpfcc-tools #