1
vote
1answer
40 views

How would you get all users history

I know there is the $HISTFILE variable where i can find the currently logged in users history-file, but how can i be sure to get every history file on the server I was thinking of the ...
29
votes
5answers
744 views

How to save a command you entered without executing it? [duplicate]

Every Linux user has experienced this annoying thing: you begin typing a long and boring command, then realise you should have executed another one before. How to save the first one to execute it ...
2
votes
2answers
33 views

How to set the number of commands history recalls

I am using bash. To browse my command history I am calling the history command which I believe is calling the Gnu program of the same name. (I don't know if there's a better bash specific way). In ...
26
votes
3answers
4k 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
248 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
137 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
79 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.
90
votes
3answers
13k views

What does “rc” in .bashrc stand for?

Is it "resource configuration", by any chance?