Linux Learning Note (ASCII/CAL/XXD/SSH) man

Source: Internet
Author: User
Tags julian day

The commands under Linux usually come with a lot of options, so it looks more complicated, but there are actually one or two of them, so all we have to remember is the most common usage.

1, man ASCII

This command prints out eight hexadecimal and decimal ASCII tables for easy viewing when needed.

2. Cal

Common Parameters

The CAL command displays only the calendar for the current month without parameters.

-1 Displays the one month calendar (display single month output. This is the default.)
-3 Display System The first one months, the current month, the next one months of the monthly calendar (display Prev/current/next month output.)
-S displays Sunday for the first day of the one week, the default format (display Sunday as the week. This is the default.)
-M displays Monday for the first day of one weeks (display Monday as the the week.)
-J Displays the Julian Day (one year date by day, starting from January 1, the number of days of the current month in a year by default) (display Julian dates, numbered from January 1).
-y Displays the calendar of the current years (display a calendar for the present year.)

You can also display a calendar for a specified year or year, such as:

[[email protected] ~]# Cal 10 2009

3, Xxd

XXD can generate a hexadecimal copy of the given file, or you can restore the edited hexadecimal copy to binary format. It is also convenient to output a hexadecimal copy to an array of C.

xxd [Options] [infile [outfile]]
Xxd-r[evert] [options] [infile [outfile]]

The XXD command is used to display the contents of a file in binary or hexadecimal order, if the outfile parameter is not specified, the result is displayed on the screen, if outfile is specified, the result is output to outfile, if the infile parameter is-or no infile parameter is specified, The default is read in from standard input.

Common options:

-B: Go to bit (binary number) mode instead of hexadecimal mode. In this mode, each character is represented as a eight-0/1 number, rather than a generic 16-binary form. Each row is preceded by a line number in the form of 16, followed by the form ASCII (or EBCDIC). Command-line option-r,-P does not work in this mode.

-H (--help): Exits after displaying help information.

-L N: only n characters are output.

-R: Reverse operation: Convert the hexadecimal output of xxd back to the binary contents of the original file.

This command is also commonly used to compare two binary files by comparing the hexadecimal copies of two files. To see more information, please refer to the XXD manual page.

4. SSH

In addition to logging in to the remote machine, SSH has many other uses.

SSH and the tools it comes with can be used to:

1 Passing files between computers (using SCP)

The 2 x-forwarding– is connected to the remote machine and opens a GUI application that looks like it was opened locally, even if the remote machine did not provide X services.

3 Port Forwarding – forwards the connection to the local port to the port on the remote machine, or forwards the connection to the remote machine port to the local port

4 SOCKS Proxy – allows you to forward all connections on an app that supports the socket agent to the remote machine. This is useful for how to use public WiFi more securely to browse the network and bypass strict firewalls.

5 Enter the password once on the local machine, then you can use the SSH key agent to log on to the remaining remote machine using secure identity, without having to re-enter your password.

To see more information, please refer to the SSH manual page.

Linux Learning Note (ASCII/CAL/XXD/SSH) man

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.