Re: Questions about -current (Linuxism's)
Leif Neland wrote: > > While I realize you can't emulate the switches on any command on any os, I > found a few "linuxism's" missing. > > Eg: I find it illogical, that "route" can change, and also display the > route to a single host, but route can not display the entire route table. > In linux it is simply "route", in windows it is "route print", but in > FreeBSD it is "netstat -r" I love the fact that Linux shell scripts aren't portable to UNIX machines because their /bin/sh based scripts end up with bash-isms and Linux-isms out the wazoo. Apparently they never read the 1978 bell labs technical journal article on how you build commands out of lesser commands, rather than jamming all the functionality into every command. On the other hand, I've often found it annoying that the 'ls' command doesn't display 'ps' information, like it does on Linux... not. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Questions about -current (Linuxism's)
While I realize you can't emulate the switches on any command on any os, I found a few "linuxism's" missing. Eg: I find it illogical, that "route" can change, and also display the route to a single host, but route can not display the entire route table. In linux it is simply "route", in windows it is "route print", but in FreeBSD it is "netstat -r" It is simple to add an information "Sorry Dave, I can not do that. Try netstat -r instead" for "route print" (I just did), or adding similar information when no proper keyword is given. Similarly on linux "netstat -ap"; the p gives the pid which has the connection open. On FreeBSD, this option is not available, instead sockstat provides similar (better; it shows the path to the command) information. As the -p is not used for netstat, it could print "use sockstat instead". It could help in heterogenious environments. Or perhaps this would just start a slide down a slippery slope... There is always diffence between commands on different os's. Some are even "dangerous". Eg. if you type "hostname -f" on a sun, you change the hostname to "-f"... Leif To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Questions about -current
Giorgos Keramidas wrote: > On 2002-01-21 09:22:08, [EMAIL PROTECTED] wrote: > >>5) In -current would it be possible to have a few command line >>switches added to certain userland utilities? I noticed -h made it >>into `ls` now, but `cp` still doesn't have -a or -x which I used to >>use all the time in Linux. I know -a isn't a big deal but - x was >>definitely nice from time to time. >> > > What does the -a or -x option do for the ls(1) command of Linux? > Perhaps equivalent options do already exist in FreeBSD ls(1). > Sorry for the confusion there :-) The -a and -x options are meant for cp(1). The -a (--archive) option in cp(1) for linux (which I am fairly certain is the gnu version) is essentially an easy way to safely do -dpR automatically. So effectively -a (--archive) preserves links, tries to preserve permissions, and also does a recursive copy. The -x (--one-file-system) option in cp(1) for linux says that if you have multiple file systems mounted on top of / and you do a `cp -ax / /mnt/copy/of/root/.` it should only copy the directory stubs for the mounts instead of the mounts themselves. I have found both of these options to be extremely useful at times. > >>`date` having a --date option to tell you when a specified date is >>in Linux is also very nice. Just some thoughts. >> > > If I haven't misunderstood you on this, FreeBSD's date(1) can already > do what you want, although I have to admit that it works a bit > differently than Linux's date(1). > > I've recently used date(1) -j and -f options to convert arbitrary > dates to the local timezone in a script I wrote to print the > modification date of problem reports. You might want to check the > scripts at: > > http://people.FreeBSD.org/~keramida/pr/feedback/ > > for samples of using date(1) to convert between timezones and date > representations. A small example that will probably help you > understand how this is done (combined with the description of the -j > and -f options in the date(1) manual page) is shown below: > > hades!charon:[/home/charon]% date '+%s => %T %Z' > 1011645430 => 22:37:10 EET > hades!charon:[/home/charon]% TZ=UTC date -j -f '%s' 1011645328 '+%s => %T %Z' > 1011645328 => 20:35:28 GMT > Again, sorry for the misunderstanding and not providing enough information upfront. In linux date(1) is the gnu version of date, which means you can do the following `date --date 'Jan 22 2002'` and it would output the following: Tue Jan 22 00:00:00 CST 2002 Or I could do a `date --date '2 days ago'` and it would output: Sun Jan 20 00:46:30 CST 2002 Again, this option might not be the most useful thing in the world but I know that I have used it many times at home and at work to make scripts less complicated. > Cheers, > > -- > Giorgos Keramidas . . . . . . . . . keramida@{ceid.upatras.gr,freebsd.org} > FreeBSD Documentation Project . . . http://www.freebsd.org/docproj/ > FreeBSD: The power to serve . . . . http://www.freebsd.org/ > > Thank you for the response and let me know if you need any further information to be able to tell what the options I was refering to for cp(1) and date(1) actually do. Jordan To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Questions about -current
On 2002-01-21 09:22:08, [EMAIL PROTECTED] wrote: > 5) In -current would it be possible to have a few command line > switches added to certain userland utilities? I noticed -h made it > into `ls` now, but `cp` still doesn't have -a or -x which I used to > use all the time in Linux. I know -a isn't a big deal but - x was > definitely nice from time to time. What does the -a or -x option do for the ls(1) command of Linux? Perhaps equivalent options do already exist in FreeBSD ls(1). > `date` having a --date option to tell you when a specified date is > in Linux is also very nice. Just some thoughts. If I haven't misunderstood you on this, FreeBSD's date(1) can already do what you want, although I have to admit that it works a bit differently than Linux's date(1). I've recently used date(1) -j and -f options to convert arbitrary dates to the local timezone in a script I wrote to print the modification date of problem reports. You might want to check the scripts at: http://people.FreeBSD.org/~keramida/pr/feedback/ for samples of using date(1) to convert between timezones and date representations. A small example that will probably help you understand how this is done (combined with the description of the -j and -f options in the date(1) manual page) is shown below: hades!charon:[/home/charon]% date '+%s => %T %Z' 1011645430 => 22:37:10 EET hades!charon:[/home/charon]% TZ=UTC date -j -f '%s' 1011645328 '+%s => %T %Z' 1011645328 => 20:35:28 GMT Cheers, -- Giorgos Keramidas . . . . . . . . . keramida@{ceid.upatras.gr,freebsd.org} FreeBSD Documentation Project . . . http://www.freebsd.org/docproj/ FreeBSD: The power to serve . . . . http://www.freebsd.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Questions about -current
First off, you sent this to the wrong list. Most of the questions you bring up in here should have been directed at -questions. On Mon, Jan 21, 2002 at 09:22:08AM +, [EMAIL PROTECTED] wrote: > I just upgraded to -current today to get a couple of > features including devfs working. In the process I > have run into a few questions (mainly things to do with > the fact that up until a few days ago I was only using > linux 2.4.x): If you are new to FreeBSD, -CURRENT might not be a wise place to start. > 1) Will either the in kernel or oss sound driver for an ... > 3) Will USB keyboards work as the system console > keyboard any time soon, right now I can't seem to get > my Sun Type 6 USB keyboard to work even though it shows > up in dmesg. If you have both a PS/2 and USB keyboard, you need to make use of `kbdcontrol -k`. > 4) Is there anyone actively maintaining dri for XFree86 > on FreeBSD, I couldn't get my Radeon 7500 to work with See /usr/ports/graphics/drm-kmod or http://gladstone.uoregon.edu/~eanholt/dri/ ... > 6) I have found the pages for hardware monitoring > support in the FreeBSD kernel and have a few questions > about it: Will the updated code which supports newer > AMD and VIA monitoring chips be rolled into -current > soon? And if so what userland utility does one use in > FreeBSD to pull values from the driver like lm-sensors > does for Linux? I've got /usr/ports/sysutils/xmbmon/ working perfectly with my setup. -- Sean Kelly | PGP KeyID: 77042C7B [EMAIL PROTECTED] | http://www.zombie.org For PGP key, send e-mail with subject "send pgp key" msg33724/pgp0.pgp Description: PGP signature