I am looking to write the output of
cat /var/log/dpkg.log
to a file rather than viewing on the screen.
I have tried
cat /var/log/dpkg.log | file.txt
without any success.
Ultimately I want this command and
dmesg -T
to run automatically from a batch from a usb.
The usb has the "ID" of 0782:5551
. Is it possible to get the "file.txt" (with the date and time included in filename) to be written to that same USB drive via it's "ID" since it could any "device' depending on its order?
The purpose of this is for a project to ultimately compare the file based on dates.