Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thewhitehart

macrumors 65816
Original poster
Jul 9, 2005
1,106
609
The town without George Bailey
I'm a unix newbie - all I really know how to do is navigate through directories, move and copy files, and other basic stuff.

Is there a way for me to view the results of commands I've run in the past in terminal.app? Like a log or something?

I used the command ls -a in my home directory, and I read a file called ".history_bash", but it only showed what commands I ran, not their output, if that's what you call it.

My ultimate goal is to ask a question here about whether some command I issued screwed up or modified anything, but I don't want to run the command again and risk it. I forgot the results when I did it the first time because I was too stupid to print it out. :(
 
Do you mean in one session of Terminal? or from all sessions?

You can change the scrollback buffer to unlimited. (edit: or a specific number of lines)

For an indivual command you can send its output to a file, using " > filename.txt"

example: ls -a > listing.txt
 
I'm not on my mac right now, but just typing 'history' at the prompt will give me a list of past commands and their output?

I will keep that write to file buffer option in mind next time I use the terminal.

(a history of all sessions, or at leat the past four or five).
 
Ah... so there's no way of getting the output of past commands shown without first specifying it to write the output to a file in the first place?

The thing is, I had to reset a friend's password in Windows XP. To do this, I had to make a USB stick bootable, as he did not have a CD drive. The USB stick had to have a bootable version of linux on it, called "Recovery Is Possible" linux. It came on a .iso, which included a shell script to make the USB stick bootable.

I didn't realize that the script was meant to be executed in linux. I used the command as it told me, something like "Computer: ~/Desktop me$ sh mkusb.sh linux.iso". It returned a message stating something like "ERROR: Cannot load modprobe loop without at least a kernel extension!" or something like that. Then it followed with the words "modprobe loop". What does that mean? It said it would automatically find the USB drive, but it couldn't. I even specified the path to /Volume/CRUZERDRIVE and it said "No USB Drive Found".
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.