Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

CTRL+R allows me to reverse search through the command history which is great but can I also find out from which directory that command was run? I am using C-shell in Linux.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

If you type history you will get a history of the commands you issued. You can locate the command you want and look at the entries above to see what cd commands are there. This may give you the information you need.

share|improve this answer

No. I assume you're using bash as a shell. Then the history is stored in ~/.bash_history. And if you cat that file, you'll see, that it only contains the lines as you entered them.

share|improve this answer
    
I am using C-shell –  Geek Jul 31 '13 at 14:58
2  
@Geek - doesn't matter, this isn't possible. –  slm Jul 31 '13 at 15:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.