Common commands for Linux file operations

Source: Internet
Author: User
Linux File operation common commands VI interesting commands: 1 replace the command www.2cto. coms -- substitue replacement command to replace the first cici in the current line with titi: s/cici/titi to replace all the cici in the current line with titi: s/cici/titi/g from row n...
Common commands for Linux file operations VI interesting commands: 1 replace www.2cto.com s -- substitue replace command replace the current line with the first cici titi command: s/cici/titi command to replace all the cici in the current line with titi: the command to replace s/cici/titi/g with titi from line n to Line 1 and Line 1 in each line: n, $ s/cici/titi replace all the cici in the n to the last line with the titi command: n, $ s/cici/titi/g the command to replace the first cici in each row with titi from the current row to the last row :., when replacing $ s/cici/titi, you must confirm that the command is followed by the letter c (meaning configuration ): the mingl [root @ localhost doc] # grep-o CREATE cici -. SQL | wc-l 223 view file encoding Method of command file filename.txt: UTF-8 Unicode text 4 using the iconv command for encoding conversion file content encoding conversion iconv-f UTF-8-t gb2312 aaa.txt> bbb.txt character file. ========================================================== ====================================== The iconv command is used to convert the encoding of the specified file, the output file is output to the standard output device by default. you can also specify the output file. Usage: iconv [option...] [File...] input/Output Format Specifications:-f, -- from-code = Name Original text encoding-t, -- to-code = name output encoding information:-l, -- list lists all known character set output control:-c ignores invalid characters-o from the output, -- output = FILE output FILE-s, -- silent close warning -- verbose prints progress information -?, -- Help provides the system's help list -- usage provides brief usage information
Related Article

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.