Score:0

Executing a command with no output

ar flag

How can i execute a command with NO output in Ubuntu 20.04 LTS.

you can do that in windows using dir > nul

but how to do it in UBUNTU? `

Thanks in advance Sorry if I am wrong

Michal Przybylowicz avatar
eg flag
Check [this](https://stackoverflow.com/questions/617182/how-can-i-suppress-all-output-from-a-command-using-bash#617184) answer.
guiverc avatar
cn flag
`ls >/dev/null` will redirect the output to device null. Microsoft based their DOS on their prior Xenix product (ie. a licensed unix system that IBM wasn't interested in)
Score:2
gs flag

Redirect to /dev/null will silent the result of the command but still display the errors:

ls >/dev/null

To also hide the errors you can do this:

ls >/dev/null 2>&1

https://unix.stackexchange.com/questions/80629/redirect-both-stderr-and-stdout-to-dev-null-with-bin-sh

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.