Every now and then I’m hitting the problem of running a shell built-in when I want to run a real command. Built-in masks the command, of course.
Problem* is, one of them has options I want to use, the other does not (or has different ones).
Also, typing `
man someBuiltInHere` gives you nothing, so you can’t check those options. So, few tricks about that.
* For those not so familiar with GNU/Linux it’s an even worse problem. For them the command doesn’t work with options it should’ve worked with.
Case 1: time
I want to use `
time` command to see how many page faults I had when running something.
The option `
-v` that shows page faults does NOT work with built in.
$ time -v elinks
-v: command not found
Case 2: kill
I want to list all signals kill takes in number – name (columnary) format.
$ kill -L
bash: kill: L: invalid signal specification
- Realize the difference. You’re not calling the command. You’re calling something else. That was step one for me.
- See what options you have:
type -a name | type -t name
- Add path for command
- Read help, not just man