How can I recall the argument of the previous bash command?

前端 未结 7 1998
轮回少年
轮回少年 2020-12-04 04:33

Is there a way in Bash to recall the argument of the previous command?

I usually do vi file.c followed by gcc file.c.

Is there a w

7条回答
  •  佛祖请我去吃肉
    2020-12-04 05:05

    You can use $_ or !$ to recall the last argument of the previous command.

    Also Alt + . can be used to recall the last argument of any of the previous commands.

提交回复
热议问题