1. Computing & Technology
Linux / Unix Command: w3m
Command Library

NAME

w3m - a text based Web browser and pager  

SYNOPSIS

w3m [options] [URL or filename]

Use "w3m -h" to display a complete list of current options.  

DESCRIPTION

w3m is a World Wide Web (WWW) text based client. It has English and Japanese help files and an option menu and can be configured to use either language. It will display hypertext markup language (HTML) documents containing links to files residing on the local system, as well as files residing on remote systems. It can display HTML tables and frames. In addition, it can be used as a "pager" in much the same manner as "more" or "less". Current versions of w3m run on Unix (Solaris, SunOS, HP-UX, Linux, FreeBSD, and EWS4800) and on Microsoft Windows 9x/NT.

 

OPTIONS

At start up, w3m will load any local file or remote URL specified at the command line. For help with runtime options, press "H" while running w3m. Command line options are:

-t tab
set tab width
-r
ignore backspace effect
-l line
# of preserved line (default 10000)
-s
Shift_JIS
-j
JIS
-e
EUC-JP
-B
load bookmark
-bookmark file
specify bookmark file
-T type
specify content-type
-m
internet message mode
-v
visual startup mode
-M
monochrome display
-F
automatically render frame
-dump
dump formatted page into stdout
-cols width
specify column width (used with -dump)
-ppc count
specify the number of pixels per character (default 8.0) Larger values will make tables narrower.
-dump_source
dump page source into stdout
-dump_head
dump response of HEAD request into stdout
-dump_both
dump HEAD and source into stdout
-dump_extra
dump HEAD, source, and extra information into stdout
-post file
use POST method with file content
-header string
insert string as a header
+<num>
goto <num> line
-num
show line number
-no-proxy
don't use proxy
-no-mouse
don't use mouse
-pauth user:pass
proxy authentication
-S
squeeze multiple blank lines
-W
toggle wrap search mode
-X
don't use termcap init/deinit
-o opt=value
assign value to config option
-config file
specify config file
-debug
DO NOT USE
 

EXAMPLES

To use w3m as a pager:

$ ls | w3m
To use w3m to translate HTML files:

$ cat foo.html | w3m -T text/html
or

$ cat foo.html | w3m -dump -T text/html >foo.txt
 

Important: Use the man command (% man) to see how a command is used on your particular computer.

>> Linux/Unix Command Library

>> Shell Command Library

Discuss in my forum

©2012 About.com. All rights reserved.

A part of The New York Times Company.