Sample Header Ad - 728x90

why strace ignores my alias for rm?

9 votes
6 answers
1601 views
I have an alias set for my rm command. If I run alias command, this is what I get as output. alias rm='rm -i' Now, when I run the rm command it works fine as expected. rm ramesh rm: remove regular empty file `ramesh'? y Now, I was learning on the system calls that are being called when I execute a command. For that I got to know about the strace command from here which lists me the files that are being called when I execute some command. The command is as below. strace -ff -e trace=file rm ramesh 2>&1 The command works perfectly fine except that it ignores my aliases that I have in place for my rm command. It deletes the file without prompting the user. So, does strace ignore aliases like this? If so why is it so? **EDIT:** Not sure, if this has something to do but type -a rm gives me the output as, rm is aliased to `rm -i' rm is /bin/rm So is it considering /bin/rm in this case which is why the user is not prompted before deletion?
Asked by Ramesh (40416 rep)
Sep 17, 2014, 08:06 PM
Last activity: Jan 2, 2025, 09:54 AM