18
votes
3answers
2k views

What is the purpose of the hash command?

If you run hash it shows the path of all commands run since the hash was last reset (hash -r) [root@c04c ~]# hash hash: hash table empty [root@c04c ~]# whoami root [root@c04c ~]# hash hits ...
6
votes
2answers
203 views

Expand subshell before executing it?

I often run commands using subshells, and sometimes would like to have the subshells expanded before I run something.. This way I could verify what I'm doing, and possibly edit what's about to happen ...
4
votes
3answers
114 views

CD into directory from HISTORY in a bash script or alias e.g. $(!!)

I often want to change into the directory of a file on my file system, but I'm not sure where the file is. I search for it like so: find -type f -name "myfile.txt" Lets say for the sake of ...
3
votes
1answer
66 views

how to record command which execute a programme suid

My question: Is there a way to record all commands who execute a suid programme? Like what .bash_history do, but only the setuid programmes.
79
votes
3answers
10k views

What does “rc” in .bashrc stand for?

Is it "resource configuration", by any chance?