5.8 pm Outside Classes Linux

Source: Internet
Author: User
Tags bz2

such as creating filesA.txt:$ cat > A.txt #Redirecting standard input to a filemondaytuesdaywednesdaythursdayfridaysaturdaysunday^c$ Cat B.txt #Show file Contentsmondaytuesdaytuesdaythursdayfridaysaturdaysunday$ head-3 a.txt #View Start3Linemondaytuesdaywednesday$ tail-f a.txt #View a growing number of files for log viewingmondaytuesdaywednesdaythursdayfridaysaturdaysunday^c$ Sort A.txt #Sortfridaymondaysaturdaysundaythursdaytuesdaywednesday$ uniq B.txt #Remove Duplicate Rowsmondaytuesdaythursdayfridaysaturdaysunday$ diff-u a.txt b.txt #Compare files,- uShow Different---a.txt 2012-03-08 15:34:00.340179508 +0800+++ b.txt 2012-03-08 15:41:12.404569605 [email protected]@ -1,6 +1, 6 @ @MondayTuesday-wednesday+tuesdaythursdayfridaysaturday$ file A.txt #Viewing file informationa.txt:ascii text$ grep-in--color sat *.txt #find a string,- I.Case insensitive ,- NShow Line NumbersA.txt:6:saturdayb.txt:6:saturdaygrepcommand can be used on a single file- Halways show file names, which can be used for directories- RRecursive lookup. Several utilities have several commonly used such asEcho,Dateand other commands to complete some daily operations. $ date--rfc-3339=s # =datewill only show the date2012-03-08 15:59:57+08:00Compressed ArchiveLinuxThere are many kinds of compression tools, the most common isgzipand thebzip2. General useTarfiles or directories are archived and compressed directly, and they can be used separately. $ tar czf w.tar.gz a.txt b.txt$ tar xzf w.tar.gz$ tar cjf w.tar.bz2 a.txt b.txt$ tar xjf w.tar.bz2generally put throughTarArchive and then directly compress the package named. Tar. XXform, to distinguish it from the individual compressed. GZand the. bz2file. Find command to determine if a command exists, you can use thewhichcommand to find out if it is in the search path, but itDebianThe user does not have command to execute permissions, you can use theWhereisfind on a larger scale. You can also useLocatein the entire file system lookup, it can find any type of file. Locatedatabase is typically made up ofUpdateDBcommands are generated at timed intervals.

5.8 pm Outside Classes Linux

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.