Agnostic.com
1 1

Share your favorite Bash alias.

SummerKnight 4 Nov 8
Share
You must be a member of this group before commenting. Join Group

Enjoy being online again!

Welcome to the community of good people who base their values on evidence and appreciate civil discourse - the social network you will enjoy.

Create your free account

1 comment

Feel free to reply to any comment by clicking the "Reply" button.

2

Mine is: please='sudo $(fc -ln -1)'
It will rerun the last command with a sudo.

Ah, a bash builtin.
"fc is used to list or edit and re-execute commands from the history list."

Yeah, that alias could be handy. Funny name for it though. Is it like pleading for that last command to work? lol Like, "grrrr effing permissions! please work this time!" 😛

@bingst Exactly, as in, "You forgot to say 'Please'"

@bingst so is "fc" like "cd.."?

@dalefvictor Apparently it stands for "fix command." Not very intuitive.
[unix.stackexchange.com]
[gnu.org]

@bingst thanks for the information and the link. I have not known of this site. Thanks.