#Can I redirect or pipe output from GNOME Terminal to a text file?

15 messages · Page 1 of 1 (latest)

craggy escarp
#

In DOS/Windows Command Prompt, I can send the output of any command-line input to a text file with a command like curl https://wttr.in >> C:\Users\[Username]\Desktop\wttr.txt . What would the equivalent command be in GNOME Terminal to append the output from curl into a text file on my desktop?

Thanks!

pearl oasis
#

That, but with a single >

steep musk
#

i think it's > , or echo

pearl oasis
#

curl [url] > [file location]

#

Should do it

steep musk
#

or command | cat yourfiletoappendto.txt

craggy escarp
#

Awesome, thank you! And it's weird, every time I run into something logical in Linux command line that makes sense to me, it's because it's one of the deprecated functions in DOS. I still say that I pipe the output even though I don't use the pipe character; and cat vs. append was literally PC-DOS vs MS-DOS (and DR-DOS). If I could just have it organize the drive like DOS (lettered names starting with A: for the 5.25" floppy, B: for the 3.5" floppy, C: for the internal boot partition, D: for optical, etc), I'd be absolutely golden.

steep musk
#

best you can do in linux to familiarize yourself with the various disks or partitions & volumes is type lsblk in terminal

#

and set volume labels up easily with the gnome-disks app

#

save this command too:
lsblk -o NAME,TYPE,MODEL,FSSIZE,FSTYPE,OWNER,MOUNTPOINT

craggy escarp
#

Ooh, thank you! Will that only show physical devices, or will it show logical partiitions as drives?

steep musk
#

both the graphical package gnome-disk-utility aka gnome disks, or simply "Disks" will show both physical and logical drives

#

so will lsblk command

pearl oasis
steep musk
#

especially in the explicit way shown above