Timeline for How can I display the contents of a text file on the command line?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 5, 2023 at 16:57 | comment | added | Malcolm |
tail is particularly useful for looking at large log files, since the most recent logs are usually at the bottom
|
|
Jul 16, 2022 at 22:16 | comment | added | b01 |
cat may be simple and easy, but using it like this will not pass Shellcheck.
|
|
Sep 30, 2021 at 3:14 | comment | added | Jovylle |
You can also use the tail command to see the last lines of text.
|
|
Nov 2, 2015 at 17:16 | comment | added | user79560 |
don't forget more and most !
|
|
Aug 11, 2013 at 19:33 | comment | added | user26112 |
@SamWeinberg: less has more features than pg . Take a look at the less(1) and pg(1) manpages. There are other pagers as well. Take a look at unix.stackexchange.com/questions/81129/…. less is probably the most widely-used pager but which one you use comes down to personal preference.
|
|
Aug 11, 2013 at 19:22 | comment | added | Sam Weinberg |
Does less have any clear advantages over other pager programs like pg , or does it just boil down to personal preference?
|
|
Aug 11, 2013 at 13:30 | history | edited | user26112 | CC BY-SA 3.0 |
added 33 characters in body
|
Aug 11, 2013 at 6:42 | comment | added | enzotib |
+1, also sed -n l file could be useful.
|
|
Aug 11, 2013 at 5:28 | vote | accept | Sam Weinberg | ||
Aug 11, 2013 at 4:10 | history | edited | user26112 | CC BY-SA 3.0 |
added 343 characters in body
|
Aug 11, 2013 at 4:03 | history | answered | user26112 | CC BY-SA 3.0 |