Skip to main content
edited tags
Link
Jeff Schaller
  • 68.9k
  • 35
  • 122
  • 268
added 170 characters in body
Source Link
Kshitiz Sharma
  • 9.1k
  • 22
  • 62
  • 77

Consider the following command:

watch -d "ps -ef | grep java" 

It gives following output:

kshitiz 11369 11285 0 Oct13 ? 00:06:02 /usr/lib/jvm/jdk1.7.0_40/jre/bin/java -Djava.awt.headless=true -Didea.version==14.1.2 -Xmx512m -Dfile.e 

The output beyond -Dfile.e is truncated or flows off screen. How can I scroll to see the output or word wrap it?

Using fold without watch: enter image description here

Using fold with watch: enter image description here

Consider the following command:

watch -d "ps -ef | grep java" 

It gives following output:

kshitiz 11369 11285 0 Oct13 ? 00:06:02 /usr/lib/jvm/jdk1.7.0_40/jre/bin/java -Djava.awt.headless=true -Didea.version==14.1.2 -Xmx512m -Dfile.e 

The output beyond -Dfile.e is truncated or flows off screen. How can I scroll to see the output or word wrap it?

Consider the following command:

watch -d "ps -ef | grep java" 

It gives following output:

kshitiz 11369 11285 0 Oct13 ? 00:06:02 /usr/lib/jvm/jdk1.7.0_40/jre/bin/java -Djava.awt.headless=true -Didea.version==14.1.2 -Xmx512m -Dfile.e 

The output beyond -Dfile.e is truncated or flows off screen. How can I scroll to see the output or word wrap it?

Using fold without watch: enter image description here

Using fold with watch: enter image description here

Source Link
Kshitiz Sharma
  • 9.1k
  • 22
  • 62
  • 77

How to wrap output of watch command?

Consider the following command:

watch -d "ps -ef | grep java" 

It gives following output:

kshitiz 11369 11285 0 Oct13 ? 00:06:02 /usr/lib/jvm/jdk1.7.0_40/jre/bin/java -Djava.awt.headless=true -Didea.version==14.1.2 -Xmx512m -Dfile.e 

The output beyond -Dfile.e is truncated or flows off screen. How can I scroll to see the output or word wrap it?