How can I create a file under /tmp/stage2/
named system.info
? What are the commands to use? Also how do I append the following information to the file?
- The full hostname
- The current date
- The load of the system
How can I create a file under /tmp/stage2/
named system.info
? What are the commands to use? Also how do I append the following information to the file?
maybe you show do like this:
#!/bin/bash
MYSYS_PATH="/tmp/stage2/system.info"
mkdir -p /tmp/stage2
hostname > $MYSYS_PATH
date >>$MYSYS_PATH
cat cat /proc/loadavg >>$MYSYS_PATH