[SOLVED] How to show a log file in a scrolling box in a post

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
stumpie92
Level 1
Level 1
Posts: 7
Joined: Mon Jun 11, 2018 6:23 pm

[SOLVED] How to show a log file in a scrolling box in a post

Post by stumpie92 » Tue Jun 19, 2018 12:42 pm

I want to post some outputs from e.g. fdisk, parted - how do I add them to the post in a scrollable box? Can I make the box size so that enough text shows?
If I need to write HTML then please give me an example!
Thanks.
Last edited by stumpie92 on Tue Jun 19, 2018 1:12 pm, edited 1 time in total.

User avatar
xenopeek
Level 24
Level 24
Posts: 22499
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: How to show a log file in a scrolling box in a post

Post by xenopeek » Tue Jun 19, 2018 12:45 pm

You can use the code tags for this. Click the icon in the toolbar when writing a post here to insert the code tags in your post. Then paste your terminal output between the tags.

[code]paste your terminal output here[/code]
Image

Boca
Level 4
Level 4
Posts: 323
Joined: Sun Feb 15, 2015 5:02 am

Re: How to show a log file in a scrolling box in a post

Post by Boca » Tue Jun 19, 2018 12:46 pm

Hi,

if you select all the text then paste within code quotes ( see </> icon above) , it will create the scrollable box you need.


for example..

Code: Select all

tony@tony-Latitude-E6430 ~ $ fdisk

Usage:
 fdisk [options] <disk>      change partition table
 fdisk [options] -l [<disk>] list partition table(s)

Display or manipulate a disk partition table.

Options:
 -b, --sector-size <size>      physical and logical sector size
 -B, --protect-boot            don't erase bootbits when create a new label
 -c, --compatibility[=<mode>]  mode is 'dos' or 'nondos' (default)
 -L, --color[=<when>]          colourise output (auto, always or never)
                                 colors are enabled by default
 -l, --list                    display partitions end exit
 -o, --output <list>           output columns
 -t, --type <type>             recognise specified partition table type only
 -u, --units[=<unit>]          display units: 'cylinders' or 'sectors' (default)
 -s, --getsz                   display device size in 512-byte sectors [DEPRECATED]
     --bytes                   print SIZE in bytes rather than in human readable format

 -C, --cylinders <number>      specify the number of cylinders
 -H, --heads <number>          specify the number of heads
 -S, --sectors <number>        specify the number of sectors per track

 -h, --help     display this help and exit
 -V, --version  output version information and exit

Available columns (for -o):
 gpt: Device Start End Sectors Size Type Type-UUID Attrs Name UUID
 dos: Device Start End Sectors Cylinders Size Type Id Attrs Boot End-C/H/S
      Start-C/H/S
 bsd: Slice Start End Sectors Cylinders Size Type Bsize Cpg Fsize
 sgi: Device Start End Sectors Cylinders Size Type Id Attrs
 sun: Device Start End Sectors Cylinders Size Type Id Flags

For more details see fdisk(8).

Post Reply

Return to “Newbie Questions”