Implimentation of linux terminal commands in c