When working in the LXTerminal, using the command line:
ls -al
What do the different colors of the file names mean?
From man ls
(reference manual page for ls
)
Using color to distinguish file types
You can use dircolors -p
to print the colors for various file types. The output isn’t that user-friendly, the numbers represent the escape codes that that control terminal colors.
Thank you, That was very helpful. Iḿ really starting to like this system. Lots of neat hidden features.
One other question, How do you print the info in the LXTerminal window?
print the info
Do you mean print to a printer? If that’s what you mean I haven’t done that in probably decades (back when we had real line printers, (think dot-matrix) and I used > (redirect) the output to the printer device. I wouldn’t do that today with laser printers (but I guess it’s still possible).
lp
will print files, and
lpq
will display the printer queue.
For ages I’ve tended to copy/paste (using mouse) OR re-direct output (using “>” or tee
) to a file which I massage/edit in a text editor, then print from the editor, or lp
the saved file from terminal.
eg.
ls -ltrha >my_ls_output.txt
will re-direct the ls -ltrha
directory output to the file called “my_ls_output.txt”. Because you re-directed the output nothing appeared on screen, so you could use
ls -ltrha |tee my_ls_output.txt
which does the same thing, but creates two outputs - one you see as normal, the second is routed to the “my_ls_output.txt” file which is what I’d use for later editing & printing when I’m ready.
fyi: “>” will erase prior contents in the file, use “>>” to append to an existing file
Thanks! I do remember the (Dot-Matrix) days.
Now I am showing my age. LOL
There are times when Iḿ in LXTerminal that I would like to print off info to read at a later time. Or even save some command line options for later use.
Thank you again for your time.
This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.