[SLUG] ident the distro
This may seem like a really daft question, but, how do you tell what distro a box is? I'm working on a server I set up a few years back but I can't remember whether it's mandrake or redhat, let alone work out which version it is. I had a quick look in /proc/sys/ but can only find kernel type info. any ideas? ..S. -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] ident the distro
> This may seem like a really daft question, but, how do you tell what > distro a box is? I'm working on a server I set up a few years back but I > can't remember whether it's mandrake or redhat, let alone work out which > version it is. I had a quick look in /proc/sys/ but can only find kernel > type info. any ideas? See if the following returns anything useful... cat /etc/*{version,release} - Jeff -- "If the Internet really wanted to become sentient, it probably could." - Raph Levien -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] ident the distro
yup, that did it. # cat /etc/*{version,release} cat: /etc/*version: No such file or directory Red Hat Linux release 6.2 (Zoot) i've not seen that syntax before. i shall now have to go and 'man cat' to find out what it is I just did. :-) thanks.. ..S. On Wednesday, March 12, 2003, at 12:46 PM, Jeff Waugh wrote: This may seem like a really daft question, but, how do you tell what distro a box is? I'm working on a server I set up a few years back but I can't remember whether it's mandrake or redhat, let alone work out which version it is. I had a quick look in /proc/sys/ but can only find kernel type info. any ideas? See if the following returns anything useful... cat /etc/*{version,release} - Jeff -- "If the Internet really wanted to become sentient, it probably could." - Raph Levien -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] ident the distro
This one time, at band camp, Stewart wrote: >This may seem like a really daft question, but, how do you tell what >distro a box is? I'm working on a server I set up a few years back but >I can't remember whether it's mandrake or redhat, let alone work out >which version it is. I had a quick look in /proc/sys/ but can only find >kernel type info. any ideas? cat /etc/redhat-release cat /etc/debian_version or something like that. -- [EMAIL PROTECTED] http://spacepants.org/jaq.gpg -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] ident the distro
> # cat /etc/*{version,release} > cat: /etc/*version: No such file or directory > Red Hat Linux release 6.2 (Zoot) > > i've not seen that syntax before. i shall now have to go and 'man cat' > to find out what it is I just did. :-) cat(1) won't tell you, because the interesting things there were just standard shell globbing. man 3 glob will tell you a bit about it, but I'm not sure of the best place (apart from the SLUG mailing list) to find good information on globbing tricks. What I did above meant 'cat all files that match /etc/* and then either "version" or "release"'. On my Debian machine, it gives the following output: $ cat /etc/*{version,release} testing/unstable cat: /etc/*release: No such file or directory In my case, the matched file was debian_version, in your case it was redhat-release (dash or underscore? I don't remember off-hand). A useful trick: ls *.py{c,} I'll leave working it out and posting the "answer" to you. :-) - Jeff -- 100% Pure Slashdot Wisdom: "Source code gives a whole new meaning to free software." -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] ident the distro
On Wed, Mar 12, 2003 at 12:51:31PM +1100, Stewart wrote: > yup, that did it. > > # cat /etc/*{version,release} > cat: /etc/*version: No such file or directory > Red Hat Linux release 6.2 (Zoot) > > i've not seen that syntax before. i shall now have to go and 'man cat' > to find out what it is I just did. :-) You need to "man bash" instead, and read under "Brace Expansion". :-) Chris -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] ident the distro
On Wed, Mar 12, 2003 at 01:07:39PM +1100, Chris Samuel wrote: > On Wed, Mar 12, 2003 at 12:51:31PM +1100, Stewart wrote: > > yup, that did it. > > > > # cat /etc/*{version,release} > > cat: /etc/*version: No such file or directory > > Red Hat Linux release 6.2 (Zoot) > > > > i've not seen that syntax before. i shall now have to go and 'man cat' > > to find out what it is I just did. :-) > > You need to "man bash" instead, and read under "Brace Expansion". :-) I'm sure we're all sick of distro-bashing, but I don't think that man bashing is the way to go. cheers, Woody PS: on a serious note, your shell might not be bash, man `perl -le'print $ENV{SHELL} =~ /(\w*)$/'`, instead. PPS: then perldoc perl :-) -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] ident the distro
>> i've not seen that syntax before. i shall now have to go and 'man cat' >> to find out what it is I just did. :-) > You need to "man bash" instead, and read under "Brace Expansion". :-) Yes, and be careful with "man cat"ing, the rules have recently changed. Once you have begun your bowling stride you have to complete it before you can run the batsman out. You used to be able to "man cat" them at any stage in your bowling action. Sorry, too many late nights watching the world cup :) ***Confidentiality and Privilege Notice*** This email is intended only to be read or used by the addressee. It is confidential and may contain legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you. Qantas Airways Limited ABN 16 009 661 901 Visit Qantas online at http://www.qantas.com.au -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] ident the distro
On Wednesday, March 12, 2003, at 01:04 PM, Jeff Waugh wrote: # cat /etc/*{version,release} cat: /etc/*version: No such file or directory Red Hat Linux release 6.2 (Zoot) i've not seen that syntax before. i shall now have to go and 'man cat' to find out what it is I just did. :-) cat(1) won't tell you, because the interesting things there were just standard shell globbing. i kind of figured that after i thought about it for a bit. :) man 3 glob will tell you a bit about it, but I'm not sure of the best place (apart from the SLUG mailing list) to find good information on globbing tricks. googling for bash shell brace expansion did it for me... A useful trick: ls *.py{c,} I'll leave working it out and posting the "answer" to you. :-) heh. i'd hazard a guess that will list all files ending with .py and .pyc. woo. you learn something new every day. thanks... ..S. -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] ident the distro
> >A useful trick: > > > > ls *.py{c,} > > > >I'll leave working it out and posting the "answer" to you. :-) > > heh. i'd hazard a guess that will list all files ending with .py and > .pyc. Yep! :-) Cool, huh? > woo. you learn something new every day. thanks... Hooray for the SLUG list. :-) - Jeff -- "Jane Austen is the Don Burke of romantic comedy." - Andrew Bennetts -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug