answersLogoWhite

0


Best Answer

This can be done using the logsave command. To save the output of a command to a log file using logsave, type the command using the following syntax:

logsave (path and name of log file)'(command)'

Notice how there are single quotation marks around the name of the command. Although these are not necessary for all commands, it may be required for commands containing spaces or other special characters. Unlike in Windows, where the output of the command can either be written to standard output or a log file, logsave will write a copy of the output to both.

If the command has progress bar output, you may want to use the -s argument to prevent these lines from being written to the log file. Also, by default logsave does not append the log file, but instead overwrites it, so if you are using a bash script or something to write a log of output, the -a argument may be useful to ensure that the previously written text is appended instead of being replaced.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you have Linux dump the output of a command to a text file?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you use less command in Linux?

Viewing a file:"less [filename]"viewing the standard output of a command:"[command] | less"


What Linux command displays the last part of a file without editing it?

The tail command can be used to output the last part of a text file. The default is to show the last 10 lines of a file and options are available to override this.


What Linux command sets a files permission?

In Linux the chmod command is used to set file permissions.


Which Linux symbols instructs the shell to redirect the shell to redirect the output of a command to the specified file instead of the screen?

It depends on the shell interpreter you are using, but in general the I/O redirection operators are >, >>, |.


What is the importance of a pipe in Linux?

Pipes are useful for redirecting inputs or outputs from a program instead of using stdin or stdout. For instance, piping the output of a command to a text file.


How do you clear a Unix memory dump?

A Unix memory dump is usually placed in a file called 'core'. You merely delete the file with the 'rm' command, as you would any other file on the system. For Linux/Unix on the mainframe, the file is called CEEDUMP (if the C plus plus runtime LE library is being used), and you delete it the same way.


What is Tee Command in unix?

The Unix/Linux tee command permits the forking of a data pipe in a shell script or at the command line. The teecommand does this by both writing it's standard input to a file and to it's standard output simultaneously. Most implementations of tee provide for both file overwrite/creation and file appends by command line switch options.


Simplest utility for viewing file content?

The simplest utility for viewing file content in the Linux Terminal, (Terminal as command promt also called DOS in Windows) its called the file command. The simplest utility for viewing file content in the Linux Terminal, (Terminal as command promt also called DOS in Windows) its called the file command.


In Linux this connects the output of the first command with the input of the second command?

You would use a pipe. For example. ls | grep cool The output of ls(the list of files in your current directory) is given to grep. Grep then finds and prints file names that include the word cool in them.


What is the mount command in Linux?

The mount command instructs the kernel to access the file system on a partition or device.


What command in Linux do you use run an executable file?

if the file is allready runnable you can type in the terminal: ./filename


What command in Linux do you use to run executable file?

if the file is allready runnable you can type in the terminal: ./filename