OESF Portables Forum
General Forums => General Discussion => Topic started by: ArchiMark on April 11, 2006, 10:46:54 am
-
Forgot how to do this....hope someone can please advise....
When you're working in Terminal or Konsole, how can you save out what is shown on the display to a text file somewhere?
I am NOT talking about viewing a text file and saving it.
I am referring to the text that is shown on the display while you're working in Terminal such as executing a command and watching the progress of it, like installing a program.
I assume that it is something like:
[CODE]
$ xxxxxxx > "file location/filename.txt"
It is the part on the left side of the ' > ' that I'm wondering about....
Unless there is another way to do this....
Thanks!
Mark
-
There are serveral different ways (of course, this in UNIX-like after all, there's always more than one way to cat a skin ).
This will save all output from command into file.out, including any error messages.
command > file.out 2>&1
This will save all output from command into file.out, as well as showing it on the screen at the same time.
command 2>&1 | tee file.out
HTH
-
For example!
echo "Test" > /home/user/test.text
or
ps aux|grep aterm > /home/user/aterm.ps
or
ls -la > /home....
or if you need only errors you can do
ipkg install lala.ipk 2> install.error
did it help?
EDIT: HTH's is better
-
Thanks, grog and DaemonsGR....but not sure either of you still get what I'm trying to do.... although maybe I am wrong...
I have already run the command and so now have lots of text shown on the display.
How do I save that text to a file?
In other words, is it possible to save what I see on the screen after I have run a command, not during the running of the command???
Thanks,
Mark
-
wouldn't that just be cut and paste?
Highlight the text, open text editor and hit the paste button.
-
Bingo!!!
Thanks, bluedevils!!
Now why didn't I think of that.....
Mark
wouldn't that just be cut and paste?
Highlight the text, open text editor and hit the paste button.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=122667\"][{POST_SNAPBACK}][/a][/div]
-
From your original post, I would have given grog's answer, but your followup cleared things up.
-
- It's the simple things that are always the hardest. (befuddled grin)
-
I always just do this in console. My example is for "df -h" (dmseg and other output commands also write to a text file)
-------------------------
df -h > /hdd3/dfh.txt
-------------------------
Then I just attach my Z to my winxp box and copy the file over.
In winxp, you'll need to open it in wordpad to format it correctly.
If you have Cacko Lite 1.23 installed you'll need the following lib installed,
otherwise copy/paste doesn't format correctly, and above command results in a zero byte, empty file.
unicon-modules-2.4.20_1.23-lite-1_arm.ipk
-
Amen, brother Ragnorok !!!
Mark
- It's the simple things that are always the hardest. (befuddled grin)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=122678\"][{POST_SNAPBACK}][/a][/div]
-
Thanks for your tip, Jon_J !!
Mark
-
Cool trick with 2.6 (and mabey 2.4) with frame buffers
cat /dev/fb0 > $HOME/screen.pic
takes a screen shot and works even on the command line without X11
doing the reverse:
cat $HOME/screen.pic > /dev/fb0
allows you to see the image, handy for something but normally a file descripter redirection works better (ie using >) but if you want to take a pic of a ncurses app its a great tool, just team it up with sleep
sleep 3; cat /dev/fb0 > $HOME/screen.pic
this takes a screenshot after 3 seconds, allowing you to switch VT's or bring up another console
-
[/code]
this takes a screenshot after 3 seconds, allowing you to switch VT's or bring up another console
[div align=\"right\"][a href=\"index.php?act=findpost&pid=123003\"][{POST_SNAPBACK}][/a][/div]
[/quote]
Hello,
I'm trying to use OZ bootstrapp distro. Could you please tell me how to open more VT's and how to switch from one to another.
thanks for help
-
you have to edit the /etc/inittab file to launch more getty's on other tty's, just copy and paste the getty entries and change the first field (must be unique) and the tty device
i have 5 and also changed the keyboard button bindings so that the row of keys on the bottom left switches between the VT's