New commands
I'm going to make a few new command for BoneOS.
- [x] logname - prints current login name
- [ ] man - help manual
- [x] pwd - print current working directory
- [ ] uname - print system info
- [x] watch - execute a program periodically
- [ ] time - get current time for process
- [x] date - get current date
- [ ] whatis - displays a one line description of a command
- [x] whoami - just like logname prints the current user
- [ ] uptime - displays total time since the computer started
- [ ] alias - makes another temporary name for a command till the terminal is closed
- [x] shutdown - already implemented by 'poweroff', but need some more improvements
- [ ] tldr - simplified man pages, not installed by default
If anyone has more ideas for commands, please post a comment, and if possible, I will add it to the list.
time - check and set time
@srifqi I'm afraid that is not possible right now. We have no way to get UTC time in the OS, and if we start the clock once the OS starts, it will be way too inaccurate.
How about RTC?
@sajadbanooie you mean a clock which starts when the OS boots up?
CMOS RTC(real time clock) http://wiki.osdev.org/CMOS#The_Real-Time_Clock
@sajadbanooie I see that, but the current state of the OS is not as advanced to do all that.
it doesn't require any thing specific does it?
@sajadbanooie how exactly will the OS tick the clock when the OS is not running? Most of us run it using vbox or qemu, not on a real computer.
If you can implement it, it'll be great, but AFAIK, it cannot be implemented in the current state of the OS.
AFAIK RTC updates the clock it self.so that is not the job of OS.
@sajadbanooie I really don't know much about an RTC, so it would be great if you could implement it, but I can't.
@Fortunate-MAN and @sajadbanooie rtc is easy not hard. I will implement it after memory man's ger
Or you can implement it by looking at this @Fortunate-MAN https://github.com/levex/osdev/blob/master/drivers/rtc.c
@Fortunate-MAN to get i/o functions just #include<io/io.h> and do outb8 for outportb
@amanuel2 huh, will have a look at that. Thanks
@Fortunate-MAN told you its not hard
@sajadbanooie @srifqi @amanuel2 I have completed the basic function for the Real Time Clock. See the commit I referenced above. It is right now printing the UTC time at least when I run it on my computer.
@Fortunate-MAN no that's noottt how u do uname lol. Not everyone is running 64 bit platform.. Ypu is ill need cpuid
Don't do cpuid yet, since it's arch dépendant and we need to setup Amd64 first.
@Fortunate-MAN added date command, but you add the options so i can work on memory manager and amd64 capability... Thanks .. Here is the manpage for date command : http://man7.org/linux/man-pages/man1/date.1.html .. Ofcourse you can add your twists as it dosent have to follow Linux , but just the *NIX Standard.
Hey, why there's no one say cd when we have pwd?
I want cd command!
@khanh2003 basically we need to implement an actual file system for cd. The current directory is put in a variable so for pwd we just store that variable and print it.. To change it u need to implement a file system (Virtual File system to be previce) whicb we will do.
I have added a bunch of commands to the list of pending commands. If someone wants a new command, or does not like a command in the list of pending commands, please comment.
Finished command watch. The uptime command has some problems so won't check that for now.