14
submitted 6 months ago* (last edited 6 months ago) by merompetehla@lemmy.ml to c/linux@lemmy.ml

upgrading xubuntu to 24.04, fresh install, but I'd like to copy the output of both dpkg -l and history to a usb stick.

About history: will it copy all commands I executed on all tabs? I work with several tabs simultaneously.

ETA: thank you for all your input, problem has been solved.

you are viewing a single comment's thread
view the rest of the comments
[-] oo1@kbin.social 5 points 6 months ago

in case it's not clear from the comments . and sorry for repeating if it is, but this >> thing is a really useful terminal thing to know in many cases.
>>
will trap and redirect terminal output.

So consider any old commmand and its output:
echo abc

This invokes the echo command and echo outpts "abc" to terminal.

If we add on >> we can catch and redirect the output:

 echo abc >> blah.txt

Will capture the output "abc" into the file.

Note this is an APPEND operation, so run it twice to the same output file and you'll add more and more output to new lines at the end of the same file.

this post was submitted on 28 May 2024
14 points (88.9% liked)

Linux

48376 readers
1395 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS