Confusion about command lines

General discussion about Celestia that doesn't fit into other forums.
ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #21by ANDREA » 08.09.2006, 16:17

t00fri wrote:Good News:
The latest gzip (1.35) may be trivially installed for Win32 with a setup installer. I tested STDIN/STDOUT redirection and pipe mode under Windos with this native Windows gzip version. Result : Perfect!
That solves the case and gzip can be used universally for all 4 platforms.
Bye Fridger
Hello Fridger, sorry for trouble, but I have the following situation:
I have both the 1,237,539 KB file, and gZip.
I installed gZip.
Launched the srtm_ramp2.world.86400x43200.bin.gz file
but this opened my WinRar and now I have the 7srtm_ramp2.world.86400x43200.bin file, 290,000 KB. 8O
I tried to open gzip.exe but for some reason I don't understand, the Dos window opens and closes immediately (but after a test I see that this happens always, so it's a problem of settings). :cry:
Something wrong here, I suppose. :oops:
So please, can you inform me on the procedure to use gZip?
What do you mean with
I tested STDIN/STDOUT redirection and pipe mode under Windos

Help, please.
Beg your pardon, but I never used DOS (my fault). :oops:
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #22by cartrite » 08.09.2006, 16:50

Andrea Wrote:
but this opened my WinRar and now I have the 7srtm_ramp2.world.86400x43200.bin file, 290,000 KB.


290,000 kb ? Isn't that 290 mb? That is a little small. When I decompressed that file I think it was in the 7 gb range.

And after I ran it thru nm16, the gimp required a pixel cache of around 30+ GB to open the ppm file.
Last edited by cartrite on 08.09.2006, 17:00, edited 1 time in total.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #23by ANDREA » 08.09.2006, 16:56

cartrite wrote:Andrea Wrote:
but this opened my WinRar and now I have the 7srtm_ramp2.world.86400x43200.bin file, 290,000 KB.

290,000 kb ? Isn't that 290 mb? That is a little small. When I decompressed that file I think it was in the 7 gb range.

Sorry, the 7 remained in my pen. :wink:
Obviously its 7,290,000 KB
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #24by t00fri » 08.09.2006, 16:59

ANDREA wrote:So please, can you inform me on the procedure to use gZip?
What do you mean with
I tested STDIN/STDOUT redirection and pipe mode under Windos
Help, please.
Beg your pardon, but I never used DOS (my fault). :oops:
Bye

Andrea :D


Andrea,

I suppose your default association of the .gz file ending is with WinRar. I.e. if you click under Windows on the gz-packed elevation map, WinRar will always be started. That's also fine like this.

gzip is a pure /command-line/ utility. So open a Windows (DOS) console in some arbitrary directory and first type just 'gzip' without any arguments. Then you should get some help text output for gzip in the console. If you get the help, then gzip was properly installed.

Next you do a gz-compression test. First list the files in the respective directory by typing at the console prompt: 'dir'. Choose a not so important file (no matter which one). For definiteness I'll use the file name README.1st. Any other filename will do as well, of course. We compress it with gzip by typing in the console

Code: Select all

gzip README.1st


As a control, type once more 'dir' and look for the compressed file README.1st.gz. Next you unpack it again by typing

Code: Select all

gzip -d README.1st.gz


That restores the file README.1st in your directory.
If that worked you are perfectly ready for action! ;-)

The next exercise is to use STDIN/STDOUT redirection instead of a filename argument to gzip as above. As the names say, STDIN/STDOUT are so called generic input and output "filehandles", respectively. These you may redirect with the '<' and '>' operators to actual filenames as follows

Code: Select all

gzip -c < README.1st > out.gz


Aha, note the option -c is to tell gzip that gzip is to work now with generic STDIN and STDOUT input/output rather than specific filenames as commandline arguments. The command above says to use README.1st as input file, gz-compress it and output the result into a file named out.gz.

You will ask for sure : why all this? Specific filenames are even simpler in syntax...

Well the great benefit comes next, namely the 'pipe' feature that ALL platforms (UNIX/LINUX Windows and MAC-OSX) support and the GUI - (click) users tend to ignore...

Programs supporting STDIN/STDOUT operation can be piped together like "pipe fittings" in the sense that the output of program1 becomes the input of program2 etc, without ever using specific filenames. Typically you then can chain long sequences of programs together by writing

Code: Select all

program1 < <input.file> | program2 | program3 | program4  > <output.file>

Here <input.file> and <output.file> have of course to be replaced by concrete names of files.

I hope this helps...

Cheers,
Fridger
Image

Topic author
danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 3 months

Post #25by danielj » 08.09.2006, 17:07

It is a DOS program.It don??t work with me.I click in gzip.exe and a black screen open and the program is nowhere in the Programs Folder.Altough is a Win32 INSTALLATION,it works like a DOS program.
Then I tried the first link and no executable appeared,only pdf and hlp files.
Anyway,the Arctic Server is offline...


t00fri wrote:Good News:

The latest gzip (1.35) may be trivially installed for Win32 with a setup installer. Download from the official GnuWin32 Sourceforge site:

http://gnuwin32.sourceforge.net/packages/gzip.htm

and gzip homepage

http://www.gzip.org/

I tested STDIN/STDOUT redirection and pipe mode under Windos with this native Windows gzip version. Result : Perfect!

That solves the case and gzip can be used universally for all 4 platforms.

Bye Fridger

rra
Posts: 171
Joined: 17.07.2004
With us: 20 years 4 months
Location: The Netherlands

Post #26by rra » 08.09.2006, 17:23

Maybe you should also say where to start the program:


for windowsXP that is:

go to START,select run, type in cmd .
That should bring you into the good old DOS.
Then normally DOS doesn't know where to find the gzip program so
you either have to move to the directory where gzip is installed ,
or (better) run gzip with its full path-name.
For the default installation that would be something like:

"c:\program files\GNUWin32\bin\gzip.exe -c file_in file_out"

remember to include the quotes, otherwise DOS stumbles over the space between program and files. Also the file__in and file_out should contain the full path ofcourse.

Ren?©

Topic author
danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 3 months

Post #27by danielj » 08.09.2006, 17:27

sO,FORGET it.I don??t know how to operate in DOS.I have 7zip and Winrar and this would be enough.But this is a compression program,anyway.Where can I find a normal map generator?And why NASA Arctic server is offline?

rra wrote:Maybe you should also say where to start the program:


for windowsXP that is:

go to START,select run, type in cmd .
That should bring you into the good old DOS.
Then normally DOS doesn't know where to find the gzip program so
you either have to move to the directory where gzip is installed ,
or (better) run gzip with its full path-name.
For the default installation that would be something like:

"c:\program files\GNUWin32\bin\gzip.exe -c file_in file_out"

remember to include the quotes, otherwise DOS stumbles over the space between program and files. Also the file__in and file_out should contain the full path ofcourse.

Ren?©

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #28by ANDREA » 08.09.2006, 17:42

danielj wrote:...And why NASA Arctic server is offline?

Danielj, now it's working again, just checked. :wink:
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #29by cartrite » 08.09.2006, 17:44

I installed gzip using the link provided by Fridger and did the test he posted above and it did not work. By running the setup for gzip it was not installed correctly. If others have this problem it can be fixed by right clicking on My Computer and chose Properties / Advanced / Environment Variables and edit Path (bottom window) to include

Code: Select all

;C:\Program Files\GnuWin32\bin
I put it at the end of the line and after this as done gzip worked correctly.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #30by ANDREA » 08.09.2006, 17:47

t00fri wrote:
ANDREA wrote: So please, can you inform me on the procedure to use gZip? ... Andrea :D
I hope this helps... Cheers, Fridger

Fridger, a very detailed explanation, I think that I'll be able to obtain the final result in this way. :wink:
Going to try it tomorrow, this evening is for a bear party (yes, in Italy we love bear, not only wine!) 8)
Thanks a lot, very appreciated.
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #31by t00fri » 08.09.2006, 17:50

danielj wrote:It is a DOS program.It don??t work with me.I click in gzip.exe and a black screen open and the program is nowhere in the Programs Folder.Altough is a Win32 INSTALLATION,it works like a DOS program.
Then I tried the first link and no executable appeared,only pdf and hlp files.
Anyway,the Arctic Server is offline...


Daniel,

I certainly won't bother trying to teach YOU anything. You constantly do things different from what I TOLD YOU.

Where did I say you should click on gzip.exe!?

That simply costs too much time. So please go elsewhere and bother other people with all the things that don't work for you.
Image

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #32by ANDREA » 08.09.2006, 17:50

rra wrote:Maybe you should also say where to start the program:
for windowsXP that is:
go to START,select run, type in cmd . .........Ren?©

And thanks a lot to you too, Ren??, I was missing the first step. :wink:
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

rra
Posts: 171
Joined: 17.07.2004
With us: 20 years 4 months
Location: The Netherlands

Post #33by rra » 08.09.2006, 17:53

ANDREA , I sincerely hope you mean "beer" in stead of "bear" :)


Ren?©

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #34by t00fri » 08.09.2006, 17:54

ANDREA wrote:
t00fri wrote:
ANDREA wrote: So please, can you inform me on the procedure to use gZip? ... Andrea :D
I hope this helps... Cheers, Fridger
Fridger, a very detailed explanation, I think that I'll be able to obtain the final result in this way. :wink:
Going to try it tomorrow, this evening is for a bear party (yes, in Italy we love bear, not only wine!) 8)
Thanks a lot, very appreciated.
Bye

Andrea :D


Wish you lots of fun, Andrea!

What do you prefer: Brown or White "Bear" ;-) ?

Image

Cheers,
Fridger
Image

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #35by ANDREA » 08.09.2006, 17:55

cartrite wrote:I installed gzip using the link provided by Fridger and did the test he posted above and it did not work. By running the setup for gzip it was not installed correctly. If others have this problem it can be fixed by right clicking on My Computer and chose Properties / Advanced / Environment Variables and edit Path (bottom window) to include

Code: Select all

;C:\Program Files\GnuWin32\bin
I put it at the end of the line and after this as done gzip worked correctly.
cartrite

Wow, this is my third "Thanks a lot" in a very short while. :D
Is it possible to post cumulative thanks? :wink:
I'm joking, obviously, thank you cartrite.
I'm sure that with all your information I'll obtain the file I need.
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #36by t00fri » 08.09.2006, 17:58

ANDREA wrote:
cartrite wrote:I installed gzip using the link provided by Fridger and did the test he posted above and it did not work. By running the setup for gzip it was not installed correctly. If others have this problem it can be fixed by right clicking on My Computer and chose Properties / Advanced / Environment Variables and edit Path (bottom window) to include

Code: Select all

;C:\Program Files\GnuWin32\bin
I put it at the end of the line and after this as done gzip worked correctly.
cartrite
Wow, this is my third "Thanks a lot" in a very short while. :D
Is it possible to post cumulative thanks? :wink:
I'm joking, obviously, thank you cartrite.
I'm sure that with all your information I'll obtain the file I need.
Bye

Andrea :D


Yes that's good that Cartrite checked that. In my case it was not necessary to add the gzip path to the executable PATH. Probably since I had done that during some previous installation already.

Bye Fridger
Image

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #37by ANDREA » 08.09.2006, 18:07

t00fri wrote: Wish you lots of fun, Andrea!
What do you prefer: Brown or White "Bear" ;-) ?
Cheers, Fridger

Well, shame and cinder on my head.
But I have a valid excuse: I just finished to drink a couple beers (!), just to be sure my friends will appreciate them. :wink:
BTW, thank you for the wish, I hope we'll have it!
Bye (hic!!!) :oops:

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Post #38by Chuft-Captain » 08.09.2006, 18:08

rra wrote:Then normally DOS doesn't know where to find the gzip program so you either have to move to the directory where gzip is installed ,
or (better) run gzip with its full path-name.
For the default installation that would be something like:

"c:\program files\GNUWin32\bin\gzip.exe -c file_in file_out"

remember to include the quotes, otherwise DOS stumbles over the space between program and files. Also the file__in and file_out should contain the full path ofcourse.

Ren?©


For lazy (WINDOZE only) GUI users, who don't mind a bit of Registry editing, here's a useful little enhancement for your registry...

Create the following KEYS:
Image

then..

Image

You'll now be able to Right-Click -> "CMD Prompt here" on any directory/folder in Windows Explorer to open a CMD console already positioned in that directory.

Enjoy.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Post #39by Malenfant » 08.09.2006, 18:16

Or you could just not mess about with the registry (which is risky if you don't know what you're doing,so I really don't recommend it) and download and install the "Open Command Window Here" Powertoy for Windows XP from the microsoft website, which sets this up automatically:

http://www.microsoft.com/windowsxp/down ... rtoys.mspx
(it's in the list on the right of the screen)

This was available for earlier versions of windows too, so if you can find the powertoys for whatever version you use it should be there.
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #40by t00fri » 08.09.2006, 18:22

rra wrote:Maybe you should also say where to start the program:


for windowsXP that is:

go to START,select run, type in cmd .
That should bring you into the good old DOS.
Then normally DOS doesn't know where to find the gzip program so
you either have to move to the directory where gzip is installed ,
or (better) run gzip with its full path-name.
For the default installation that would be something like:

"c:\program files\GNUWin32\bin\gzip.exe -c file_in file_out"

remember to include the quotes, otherwise DOS stumbles over the space between program and files. Also the file__in and file_out should contain the full path ofcourse.

Ren?©


Thanks, Rene,

but the correct and simpler solution is cartrite's. I would have mentioned to add the gzip path to the PATH environment variable, but thought that the installation would do that automatically...

Also, I was surprised that experienced windows users would not know how to call the Windows console!? You dont have to do things via RUN etc.

+++++++++++++++++++++++++
The Windows console program is in the STANDARD Windows location, namely C:\WINDOWS\System32\cmd.exe

One conveniently pulls an icon for it onto the Desktop and then can use it for ALL future commandline tasks with a click.
+++++++++++++++++++++++++

Wow. I feel kind of funny/embarrassed, spelling out these VERY basic things for "experts " of an operating system (Windows) that I personally use rarely ;-)

Cheers,
Fridger
Last edited by t00fri on 08.09.2006, 18:25, edited 1 time in total.
Image


Return to “Celestia Users”