Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Help for using commands in Linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

First, get help

Multi-level help

Whatis

When querying this command, it depends on the background database, which stores a simple description of the executed command. This database is generated under specific circumstances, and it is possible that a newly installed system does not exist. The system will be automatically created after a period of time.

The command of man-f is used the same way as whatis

Displays a short description of the command

Use one database update every night

Cannot be used immediately after installation

Makewhatis | mandb to create a database

Whatiscal or man-fcal

Makewhatis

Generate database

Whatis cannot see the information related to the command when creating the database.

This command does not exist on Centos7, it uses mandb to make a database

Command help Internal command: # help COMMAND

# man bash

List all internal commands and various uses of bash

There is a problem when Man commands view internal commands.

History:

History is put in a file on the machine.

Each user has his own history in the home directory, which is a hidden file, .bash_history

.bash _ history: history commands are written to this file only when the user logs out.

All internal commands are loaded into memory when the / bin/bash user logs in, so all commands can be found in the

Found in manbash

External command: (1) # COMMAND-help

Ls: display in long format and short format

-A: not listed "." And ";". Represents the current directory, ".." Represents a subdirectory

There are long format and short format display, the effect is the same

-- list the author of each file when author is used with-l

-l: only short and long formats are not displayed

-- help option

1. Display usage summary and parameter list

2. Most of them are used, but not all

3. $date-help

Usage: date [option]... [+ FORMAT] or:date [- u |-- utc |-- universal] [MMDDhhmm [[CC] YY] [.ss]]

[] is optional

CAPS or variable

... Represents a list

X | y | z means "x or y or z"

-abc means-a-b-c

-d: displays the current time of yesterday

Show the year of this year

Show year and month

Year Month Day

Generate a file with the current date suffixed with .log

% s: seconds that have elapsed since 00:00:00 UTC time 1970-01-01 (unix's birthday)

The most or less days of this year

Displays the current date, format: 2016-08-08

Show what day it was the day before yesterday.

Set the current date to 2008-08-0808virtual 00

Show the year, month and day of the first 10 days

Show the year, month and day of the last 20 days

# COMMAND-h

Only a small number of commands are supported

(2) user manual (manual)

# man COMMAND

Man command

1. Files that provide command help

2. The man pages are stored in / usr/share/man

3. Almost every command has a "page" of man

4. Man pages are grouped into different "chapters"

5. Collectively referred to as the Linux manual

6. Man [chapter] command

7. Configuration file of man command: / etc/man.config | man_db.conf

8. MANPATH/PATH/TO/SOMEWHERE: indicate the search location of the new manual file

9. # man-M/PATH/TO/SOMEWHERE COMMAND: search the command command under the specified location

The manual page of the order and displays the

Where man help is located

Man help is all compressed files.

View the chapter number of the command

Man chapter

1: user command

2: system call

3Rank C library call

4: equipment files and special documents

5: configuration file format

6: games

7: miscellaneous

8: commands for managing classes

9:Linux kernel API

(3) Information page

# info COMMAND

(4) help documentation of the program itself

README

INSTALL

ChangeLog

(5) official documentation of the program

Official site: Documentation

(6) official documents of the distribution version

(7) Google

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report