i want to save the output of top command so i did below
top >> fileA
it successfully writes the output but it overwrites the existing result. I want every new result will save but no overwrite
on 12/16/2009 – Made popular on 12/16/2009
I've got a script which creates random command line parameters for second script. I then save the output the second into a file. How do i include the command line parameters used in the second script along with the output it produces ? The command below saves only the output :
I'm writing my own shell in Linux. I want a command like this: "ls -l output output.txt" I want to store the result of the given command to the given file. I googled and found that I am supposed to popen() or some kind. Could anyone tell me how to do it?
Recently i have been coding a socket layer application to send and receive commands/output via socket layer to a remote Centos machine. The app is web based and when the user requests a log file, the php script sends a command to a small server app coded in c, placed in centos machine. The c server then executes the command and send back output through the socket.
I have seen This question but I am not satisfied with answer. I connect to remote sftp server and I will do ls there I want to have the result of ls on my local machine. I don't want any thing extra to be saved, only the result of ls command.