bash
BASH - Display date/time, hostname and current directory
Submitted by ravisagar on Mon, 04/28/2008 - 08:32.To display date/time, hostname and current directory use the following command in your BASH prompt and press enter.
PS1="[\d \t \u@\h:\w ] $ "
After pressing enter your BASH prompt will look like this.
[Mon Apr 28 14:04:48 ravisa@incgnddw0062:/cygdrive/e/myfiles/] $
I used this command on Cygwin running on Window XP. The hostname and current directory will be different in your case.
»
- ravisagar's blog
- Add new comment
- 341 reads
Current working directory in BASH
Submitted by ravisagar on Sun, 04/27/2008 - 06:31.For all those newbies in the world of Linux here is a very useful linux command.
[root@localhost practice]# pwd
/home/ravi/windows/d/myfiles/tutorials/c++/practice
/home/ravi/windows/d/myfiles/tutorials/c++/practice
pwd will print the current working directory in the konsole.
»
- ravisagar's blog
- Add new comment
- 218 reads

Recent comments
4 weeks 5 days ago
7 weeks 6 days ago
8 weeks 3 days ago
8 weeks 3 days ago
20 weeks 4 days ago
20 weeks 4 days ago
21 weeks 3 days ago
25 weeks 6 days ago