Originally Posted by nblab
i need to create an alias of a command named
find_c="find . -path '*.c'|wc -l"
and i wanted that every user should be able to execute this alias when ever they login and wish to execute
I'm not sure about aliases since I never use them. Using functions is possible as well. I would suggest using a script though and place it in /usr/local/bin. e.g. /usr/local/bin/find_c
exec find . -path '*.c' | wc -l
Afterwards change the permission of the file to 0755.
it would be better if this executes each time a user login.
Do you mean creating the alias? But that's not necessary if you already have a script. Anyhow you could use .bashrc for that, or /etc/profile for general startup.
Of course some people would recommended/criticize how one should manipulate those files; it also depends on your system or distro, but those are the basics.