Linux Common Commands-echo/printf/file

Source: Internet
Author: User

Echo: Display text

NAME
Echo-display a line of text


Synopsis
echo [Short-option] ... [STRING] ...
Echo long-option


-N

[Email protected] doc]# echo-n
[Email protected] doc]# Echo


[Email protected] doc]#

[Email protected] doc]# Echo-n "This was 2017,\n the day is Feb 11"
This was 2017,\n the day was 11[[email protected] doc]#



-E: text Open escape character

[[email protected] doc]# echo "This is 2017,\n, the day is Feb 11"
This was 2017,\n the day was Feb 11
[Email protected] doc]# ECHO-E "This was 2017,\n the day is Feb 11"
This is 2017,
The day is Feb 11


printf: Formatting and displaying text

printf (1) User Commands printf (1)


NAME
Printf-format and print data


Synopsis
printf FORMAT [ARGUMENT] ...
printf OPTION



[[email protected] doc]# printf "This year was 2017,the day is Feb 11"
This was 2017,the day was Feb 11[[email protected] doc]#

File type determination

This command is used to identify file types and to identify the encoding format of some files. It does this by looking at the header information of the file to get the file type, rather than identifying the file type as Windows does by extension.


NAME
File-determine file type


Synopsis
file [-bchiklnnprsvz0] [--apple] [--mime-encoding] [--mime-type] [-e testname] [-F separator]
[-F NameFile] [-M magicfiles] file ...
file-c [-M magicfiles]
file [--help]


ELF: Executable Link file

[Email protected] ~]$ File/bin/ls
/bin/ls:elf 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for Gnu/linux 2.6.18, Stripped





Linux Common Commands-echo/printf/file

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.