Skip Navigation Bar
NLM logo

> (greater-than)

Please note: following the release of the new version of PubMed, the results returned by E-utilities queries of PubMed may differ slightly from those returned in the web version of PubMed. A new PubMed API is currently under development: more information will be announced when available.

As new Insider's Guide classes are no longer being offered, this site is not currently being updated. Please refer to NCBI's E-utilities documentation for more up-to-date information.

The Unix redirection operator “>” can be used to redirect the output of a command to a file. Simply add “>” at the end of the command, followed by the name of the file to which you wish to redirect the output. The file will be saved in your Unix working directory.


Redirect the output of an efetch command to a file named “abstract.txt”:

efetch -db pubmed -id 26287646 -format abstract > abstract.txt

Redirect the output of an esearch command to a file named “search_results.xml”:

esearch -db pubmed -query "h1n1 asthma" > search_results.xml

Last Reviewed: August 9, 2021