This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to save a terminal output in a txt file?

Hi,

I am using Fastx Tool Kit and I need to save the output of command line. For example, if I use the fastq_quality_filter command, the output in the terminal is:

Quality cut-off: 20
Minimum percentage: 50
Input: 24038429 reads.
Output: 23792466 reads.
discarded 245963 (1%) low-quality reads.

How can I save the output in a txt file to see later if I need to do that?

Thank you so much

fastxtoolkit

Hello silas008!

We believe that this post does not fit the main topic of this site.

Not a bioinformatics question. This is basic unix, use google.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

Friends don't let friends use Fastx Toolkit. Virtually any alternative would be superior. I am biased, but I recommend BBDuk.

2 answers

">" directs standard output into a file:

fastq_quality_utility > output.txt

And for the record, some programs output to both standard out and standard error. So the most universal way to record all screen output is like this:

foo 1>out.txt 2>&1

..where "foo" is the complete program command line.

&> also works:

command &> out.txt

Is this stdout? If yes, just > file.txt

Ok... Thank you

Why no "thank you" to me? :(

I'm sorry...

I did a idiot question to 5eikki and then I edited the question to: Ok... thank you. :)

But I gave a "like" to you answer too. And thank you so much

Log in to answer this question.