• 个性签名
  • 格言大全
  • 名言大全
  • 笑话大全
  • 知识问答
  • 生活家居
  • 星座运势
  • 宝宝起名
  • 休闲爱好
  • 百科大全
  • deepininode的简单介绍)

    栏目: 房产 日期:2023-01-29 12:12:06 浏览量(来源:小施

    [摘要]deepininode的简单介绍),关于《deepininode的简单介绍)》的内容介绍。linux deepin版系统如何安装程序 make 要有 makefile 要么你自己写一个makefile...

    deepininode的简单介绍),关于《deepininode的简单介绍)》的内容介绍。

    deepininode的简单介绍)

    linux deepin版系统如何安装程序 make 要有 makefile 要么你自己写一个makefile 要么 你下载的软件中自带makefile.在Linux中...

    linux deepin版系统如何安装程序

    make 要有 makefile 要么你自己写一个makefile 要么 你下载的软件中自带makefile.

    在Linux中如何查看文件的修改日期

    有时候可能需要检查有关文件的详细信息,例如文件的修改日期。当你要检查文件的最后编辑时间时,本文可能会派上用场。在本文将学习4种方法查看文件的修改日期。

    使用stat 命令

    stat 命令 可以显示文件属性的详细信息,比如最近一次访问和修改文件的时间、文件大小等信息,使用起来比较简单,命令后面只需要加上文件名就可以:

    [[email protected] ~]# stat hello_script.sh

      File: ‘hello_script.sh’

      Size: 31        Blocks: 8          IO Block: 4096  regular file

    Device: fd00h/64768d Inode: 67169379    Links: 1

    Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)  Gid: (    0/    root)

    Context: unconfined_u:object_r:admin_home_t:s0

    Access: 2020-10-15 19:13:24.628009932 +0800

    Modify: 2020-10-15 19:07:18.266426499 +0800

    Change: 2020-10-15 19:11:48.227856412 +0800

    Birth: -

    从上面的输出中,我们可以看到文件的访问日期、文件的修改日期、文件权限的修改日期以及其他参数。

    如果只希望查看文件的修改日期,而不考虑所有其他信息,运行以下命令:

    [[email protected] ~]# stat -c %y hello_script.sh

    2020-10-15 19:07:18.266426499 +0800

    -c选项用于指定自定义格式代替默认的输出,而"%y"标志显示上次修改时间。对于文件夹,语法保持不变。只需将文件名替换为文件夹名称即可。

    使用date命令

    date命令的用法是显示当前日期。但是当与-r选项一起使用时,可以显示文件的最后修改日期,如下所示:

    [[email protected] ~]# date -r hello_script.sh

    Thu Oct 15 19:07:18 CST 2020

    使用ls -l命令

    ls -l命令通常用于使用长列表显示有关文件的其他信息,例如文件权限和所有者,大小和创建日期。可以添加-t选项,这样就可以按照文件的修改时间来排列:

    [[email protected] ~]# ls -lt

    或者

    [[email protected] ~]# ll -t

    total 288

    drwxr-xr-x. 2 root root    177 Oct 16 14:36 b

    drwxr-xr-x. 2 root root    177 Oct 16 14:36 a

    -rwxr-xr-x. 1 root root    119 Oct 15 19:20 backup_script.sh

    -rwxr-xr-x. 1 root root    31 Oct 15 19:07 hello_script.sh

    -rw-r--r--. 1 root root    227 Oct 13 16:39 content.txt

    -rw-r--r--. 1 root root 277159 Oct 12 14:37 a.txt

    drwxr-xr-x. 2 root root    195 Aug  6 14:12 Files

    -rw-------. 1 root root  1284 Dec 29  2019 anaconda-ks.cfg

    使用httpie工具

    另一种检查文件的修改日期的方法是使用httpie ,是HTTP命令行客户端工具。该工具通常用于与HTTP服务器和API交互,还可以检查驻留在web服务器上文件的修改时间。

    首先需要确保安装了python的pip包管理工具,然后安装httpie工具:

    在 Centos 7/RHEL7中,运行以下命令安装httpie:

    [[email protected] ~]# yum -y install python-pip

    [[email protected] ~]# pip install --upgrade pip

    [[email protected] ~]# pip install httpie

    在Ubuntu / Deepin / Debian中运行以下命令安装httpie:

    $ sudo apt install httpie

    安装完成之后,那么如何查看web服务器上文件的修改时间呢?语法如下:

    http -h  [url] | grep "Last-Modified"

    例如,从网站中,查看一张.png格式的图片修改时间:

    [[email protected] ~]# http -h | grep -i "Last-Modified"

    Last-Modified: Fri, 05 Jun 2020 14:26:11 GMT

    总结

    在本文中,介绍了各种方法,可以使用这些方法列出文件的最后修改日期,甚至可以使用httpie工具列出web服务器上的文件的最后修改日期。

    兰花的英文文章

    Orchidaceae, also called the Orchid family, is the largest family of the flowering plants (Angiospermae). Its name is derived from the genus Orchis.

    The Royal Botanical Gardens of Kew list 880 genera and nearly 22,000 accepted species, but the exact number is unknown since classification differs greatly in the academic world. About 800 new species are added each year. The largest genera are Bulbophyllum (2,000 species), Epidendrum (1,500 species), Dendrobium (1,400 species) and Pleurothallis (1,000 species). The family also includes the Vanilla (the genus of the vanilla plant), Orchis (type genus) and many commonly cultivated plants like some Phalaenopsis or Cattleya.

    Moreover, since the introduction of tropical species in the 19th century, horticulturists have more than 100,000 hybrids and cultivars.

    Orchidaceae are cosmopolitan, occurring in almost every habitat apart from deserts and glaciers. The great majority are to be found in the tropics, mostly Asia, South America and Central America. They are found above the Arctic Circle, in southern Patagonia and even on Macquarie Island, close to Antarctica.

    The following list gives a rough overview of their distribution:

    tropical America: 300 to 350 genera

    tropical Asia: 250 to 300 genera

    tropical Africa: 125 to 150 genera

    Oceania: 50 to 70 genera

    Europe and temperate Asia: 40 to 60 genera

    North America: 20 to 30 genera

    A majority of species are perennial epiphytes; they are found in tropical moist broadleaf forests or mountains and subtropics. These are anchored on other plants, mostly trees, sometimes shrubs.

    A few are lithophytes, growing naturally on rocks or on very rocky soil.

    Others are terrestrial. This group includes nearly all temperate orchids.

    Some orchids, like Neottia and Corallorhiza, lack chlorophyll and are myco-heterotrophs (formerly incorrectly called saprophytes). These achlorophyllous (i.e. nonphotosynthetic) orchids live on an ectomycorrhizal symbiosis and are completely dependent on soil fungi feeding on decaying plant matter, such as fallen leaves, to provide them nutrients.

    Orchids are easily distinguished, as they share some very evident apomorphies. Among these: bilaterally symmetric (zygomorphic) and resupinate, a petal (labellum) is always highly modified, stamens and carpels are fused and the seeds are extremely small.

    Like most monocots, orchids generally have simple leaves with parallel veins, although some Vanilloideae have a reticulate venation. They may be ovate, lanceolate, or orbiculate and very variable in size. Their characteristics are often diagnostic. They are normally alternate on the stem, often plicate, and have no stipules. Orchids leaves often have siliceous bodies called stegmata in the vascular bundle sheaths (not present in the Orchidoideae) and are fibrous.

    The structure of the leaves corresponds to the specific habitat of the plant. Species that typically bask in sunlight, or grow on sites which can be occasionally very dry, have thick, leathery leaves and the laminas are covered by a waxy cuticle to retain their necessary water supply. Shade species, on the other hand, have long, thin leaves.

    The leaves of most orchids are perennial, that is they live for several years, while others, especially those with plicate leaves, shed them annually and develop new leaves together with new pseudobulbs, as in Catasetum.

    The leaves of some orchids are considered ornamental. The leaves of the Macodes sanderiana, a semiterrestrial or lithophyte, show a sparkling silver and gold veining on a light green background. The cordate leaves of Psychopsiella limminghei are light brownish green with maroon-puce markings, created by flower pigments. The attractive mottle of the leaves of Lady"s Slippers from temperate zones (Paphiopedilum) is caused by uneven distribution of chlorophyll. Also Phalaenopsis schilleriana is a lovely pastel pink orchid with leaves spotted dark green and light green. The Jewel Orchid (Ludisia discolor) is grown more for its colorful leaves than its fairly inconspicuous white flowers.

    Some orchids, as Polyrrhiza lindenii (Ghost Orchid), Aphyllorchis and Taeniophyllum depend on their green roots for photosynthesis and lack normally developed leaves, as of course do all of the heterotrophic species.

    All orchids are perennial herbs and lack any permanent woody structure. Orchids can grow according to two patterns:

    Monopodial: The stems grows from a single bud, leaves are added from the apex each year and the stem grows longer accordingly. The stem of orchids with a monopodial growth can reach several meters in length, as in Vanda and Vanilla.

    Sympodial: The plant produces a series of adjacent shoots which grow to a certain size, bloom and then stop growing, to be then replaced. Sympodial orchids grow laterally rather than vertically, following the surface of their support. The growth continues by development of new leads, with their own leaves and roots, sprouting from or next to those of the previous year, as in Cattleya. While a new lead is developing, the rhizome may start its growth again from a so-called "eye", an undeveloped bud, thereby branching.

    Terrestrial orchids may be rhizomatous or forme corms or tubers. The root caps of terrestrials are smooth and white.

    Some sympodial terrestrials, such as Orchis and Ophrys, have two subterranean tuberous roots. One is used as a food reserve for wintery periods, and provides for the development of the other one, from which visible growth develops.

    In warm and humid climates, many terrestrial orchids do not need pseudobulbs.

    Epiphytic orchids have modified aerial roots that can sometimes be a few meters long. In the older parts of the roots, a modified spongy epidermis called velamen has the function to absorbe humidity. It is made of dead cells and can have a silvery-grey, white or brown appearance.

    The cells of the root epidermis grow at a right angle to the axis of the root to allow them to get a firm grasp on their support. Nutrients mainly come from animal droppings on their supporting tree.

    The base of the stem of sympodial epiphytes, or in some species essentially the entire stem, may be thickened to form what is called a pseudobulb that contains nutrients and water for drier periods.

    The pseudobulb has a smooth surface with lengthwise grooves and can have different shapes, often conical or oblong. Its size is very variable; in Bulbophyllum (black orchids) it is no longer than two millimeters, while in the largest orchid in the world, Grammatophyllum speciosum (giant orchid), it can reach three meters. Some Dendrobium have long, canelike pseudobulbs with short, rounded leaves over the whole length, some other orchids have hidden or extremely small pseudobulbs, completely included inside the leaves.

    With ageing the pseudobulb sheds its leaves and becomes dormant. At this stage it is often called a backbulb. A pseudobulb then takes over, exploiting the last reserves accumulated in the backbulb, which eventually dies off too. A pseudobulb typically lives for about five years.

    Orchidaceae are well known for the many structural variations in their flowers.

    Some orchids have single flowers but most have a racemose inflorescence, sometimes with a large number of flowers. The flowering stem can be basal, that is produced from the base of the tuber, like in Cymbidium, apical, meaning it grows from the apex of the main stem, like in Cattleya, or axillary, from the leaf axil, as in Vanda.

    As an apomorphy of the clade, orchid flowers are primitively zygomorphic (bilaterally symmetrical), although in some genera like Mormodes, Ludisia, Macodes this kind of symmetry may be difficut to notice.

    The orchid flower, like most flowers of monocots has two whorls of sterile elements. The outer whorl has three sepals and three petals are in the inner whorl. The sepals are usually very similar to the petals (an thus called tepals, 1), but may be completely distinct.

    The upper medial petal, called the labellum or lip (6),, is always modified and enlarged. The inferior ovary (7) or the pedicel is rotated 180 degrees, so that the labellum, goes on the lower part of the flower, thus becoming suitable to form a platform for pollinators. This characteristic, called the resupination occours primitively in the family and is considered apomorphic (the torsion of the ovary is very evident from the picture). Some orchids have secondarily lost the resupination, like some Zygopetalum".

    The normal form of the sepals can be found in Cattleya, where they form a triangle. In Paphiopedilum (Venus slippers) the lower two sepals are fused together into a synsepal, while the lip has taken the form of a slipper. In Masdevallia all the sepals are fused.

    Orchid flowers with abnormal numbers of petals or lips are called peloric. Peloria is a genetic trait, but its expression is environmentally influenced and may appear random.

    Orchid flowers primitively had three stamens, but this situation is now limited to the genus Neuwiedia. Apostasia and the Cypripedioideae have two stamens, the central one being strile and reduced to a staminode. All of the other orchids, the clade called Monandria, retain only the central stamen, the others being reduced to staminodes (4). The filaments of the stamens are always adnate (fused) to the style to form cylindrical structure called the gynostemium or column (2). In the primitive Apostasioideae this fusion is only partial, in the Vanilloideae it is more deep, while in Orchidoideae and Epidendroideae it is total. The stigma (9) is very asymmetrical as all of its lobes are bent towards the centre of the flower and lay on the bottom of the column.

    Pollen is released as single grains, like in most other plants, in the Apostasioideae, Cypripedioideae and Vanilloideae. In the other subfamilies, that comprise the great majority of orchids, the anther (3), carries and two pollinia.

    A pollinium is a waxy mass of pollen grains held together by the glue-like alkaloid viscin, containing both cellulosic stands and mucopolysaccharides. Each pollinium is connected to a a filament which can take the form of a caudicle, like in Dactylorhiza or Habenaria or a stipe, like in Vanda. Caudicles or stipes hold the pollinia to the viscidium, a sticky pad which sticks the pollinia to the body of pollinators.

    At the upper edge of the stigma of single-anthered orchids, in front of the anther cap, there is the rostellum (5), a slender extension involved in the complex pollination mechanism.

    As aforementioned, the ovary is always inferior (located behind the flower). It is three-carpelate and one or, more rarely, three-partitioned, with parietal placentation (axile in the Apostasioideae).

    Orchids have developed highly specialized pollination systems and thus the chances of being pollinated are often scarce. This is why orchid flowers usually remain receptive for very long periods and why most orchids deliver pollen in a single mass: each time pollination succeeds thousands of ovules can be fertilized.

    Pollinators are often visually attracted by the shape and colours of the labellum. The flowers may produce attractive odours. Although absent in most species, nectar may be produced in a spur (8) of the labellum, on the point of the sepals or in the septa of the ovary, the most typical position amongst the Asparagales.

    In orchids that produce pollinia, pollination happens as some variant of the following. When the pollinator enters into the flower, it touches a viscidium, which promptly sticks to its body, generally on the head or abdomen. While leaving the flower, it pulls the pollinium out of the anther, as it is connected to the viscidium by the caudicle or stipe. The caudicle then bends and the pollinium is moved forwards and downwards. When the pollinator enters another flower of the same species, the pollinium has taken such position that it will stick to the stigma of the second flower, just below the rostellum, pollinating it. The possessors of orchids may be able to reproduce the process with a pencil or similar device.

    Some orchids mainly or totally rely on self-pollination, especially in colder regions where pollinators are particularly rare. The caudicles may dry up if the flower hasn"t been visited by any pollinator and the pollina then fall directly on the stigma. Otherwise the anther may rotate and then enter the stigma cavity of the flower (as in Holcoglossum amesianum).

    The labellum of the Cypripedioideae is poke-shaped and has the function to trap visiting insects. The only exit leads to the anthers that deposit pollen on the visitor.

    In some extremely specialized orchids, like the Eurasian genus Ophrys, the labellum is adapted to have a colour, shape and odour which attracts male insects via mimicry of a receptive female. Pollination happens as the insect attempts to mate with flowers.

    Many neotropical orchids are pollinated by male orchid bees, which visit the flowers to gather volatile chemicals they require to synthesize pheromonal attractants. Each type of orchid places the pollinia on a different body part of a different species of bee, so as to enforce proper cross-pollination.

    An underground orchid in Australia, Rhizanthella slateri, never sees the light of day and depends on ants and other terrestrial insects to pollinate it.

    Catasetum, a genus discussed briefly by Darwin actually launches its viscid pollinia with explosive force when an insect touches a seta.

    After pollination the sepals and petals fade and wilt, but they usually remain attached to the ovary.

    A study in the scientific journal Nature [1] has shown that the origin of orchids goes back much longer than originally expected. A fossilized stingless bee Proplebeia dominicana, an extinct species trapped in Miocene amber about 15-20 million years ago, carried pollen of the orchid Meliorchis caribea (a new genus and species, as of this study) on its wings. This indicates that orchids may have an ancient origin and have arisen 76 to 84 million years ago during the Late Cretaceous, in other words : they may have co-existed with dinosaurs. It shows also that at that time, insects were already active pollinators of orchids.

    Using the so-called molecular clock method, scientist were able to determine the age of the major branches of the orchid family. This also confirmed that the subfamily Vanilloideae is a branch at the basal dichotomy of the monandrous orchids, and must have evolved very early in the evolution of the family. Since this genus occurs worldwide in tropical and subtropical regions, from tropical America to tropical Asia, New Guinea and West Africa, and the continents began to split about 100 million years ago, significant biotic exchange must have occurred after this split (since the age of Vanilla is estimated at 60 to 70 million years).

    Up to this find, recovered by a private collector in the Dominican Republic in 2000, there was no definite fossil record of orchids

    The extinct orchid M. caribea has been placed within the extant tribe Cranichideae, subtribe Goodyerinae (subfamily Orchidoideae).

    One orchid genus, Vanilla, is commercially important, used as a foodstuff flavouring.

    The underground tubers of terrestrial orchids (mainly Orchis mascula) are ground to a powder and used for cooking, such as in the hot beverage salep or the so-called "fox-testicle ice cream" salepi dondurma.

    The scent of orchids is frequently analysed by perfumists (using Gas-liquid chromatography) to identify potential fragrance chemicals.

    The other important use of orchids is their cultivation for the enjoyment of the flowers. Most cultivated orchids are tropical or subtropical, but quite a few which grow in colder climates can be found on the market. Temperate species available at nurseries include Ophrys apifera (bee orchid), Gymnadenia conopsea (fragrant orchid), Anacamptis pyramidalis (pyramidal orchid) and Dactylorhiza fuchsii (common spotted orchid).

    The term botanical orchid loosely denotes those small flowered tropical orchids belonging to several genera (not necessarily related to each other) that don"t fit into the "Florist" orchid category. A few of these genera contain enormous numbers of species. Some, such as Pleurothallis and Bulbophyllum, contain approximately 1700 and 2000 species, respectively, and are often extremely vegetatively diverse. The primary use of the term is among orchid hobbyists wishing to describe unusual species they grow, though it is also used to distinguish naturally occurring orchid species from horticulturally created hybrids.

    Taiwan, the biggest orchid exporter in the world, establishes the Taiwan Orchid Plantation, a science-based industrial park, in 2004, to explore novel ways of growing and distributing orchids. The renowned Taiwanese International Orchid Show, usually held in early March each year, is amongst the top three orchid exhibition in the world [1]. Taiwan is particularly famous for the production of Phalaenopsis, and is a member of the International Phalaenopsis Alliance (IPA). The Taiwan Orchid Growers Association (TOGA), a NPO established in 2001, acts as a bridge between the government and the local orchid producers and distributors.

    The National Orchid Garden in the Singapore Botanic Gardens is considered by some to be among the finest collections of orchids in cultivation open to the public.

    Orchids, like tulips, have become a major market throughout the world. Buyers now bid hundreds of dollars on new hybrids or improved ones. Because of their apparent ease in hybridization, they are now becoming one of the most popular cut-flowers on the market.

    linux查看文件修改前后差别的代码

    在这里,我们将看到如何使用C ++程序在Linux平台上列出修改后的文件以及旧的和新创建的文件。

    任务很简单。我们可以使用Linux shell命令以所需顺序获取文件。ls –l命令用于获取长列表格式的所有文件。在这里,我们将添加更多选项以根据时间对它们进行排序。(升序和降序)。–t命令用于根据时间排序,并且–r可添加以反转顺序。

    该命令将如下所示:ls –lt

    ls –ltr

    我们将使用system()C ++中的函数使用这些命令,以从C ++代码获取结果。

    范例程式码#include

    using namespace std;

    main(){

    //显示存储在当前目录中的文件的修改时间降序

    cout

    system("ls -lt"); //use linux command to show the file list, sorted on time

    cout

    system("ls -ltr"); //use the previous command -r is used for reverse order

    }

    输出结果Files List (First one is newest)

    total 32

    -rwxr-xr-x 1 soumyadeep soumyadeep 8984 May 11 15:19 a.out

    -rw-r--r-- 1 soumyadeep soumyadeep 424 May 11 15:19 linux_mod_list.cpp

    -rw-r--r-- 1 soumyadeep soumyadeep 1481 May 4 17:03 test.cpp

    -rw-r--r-- 1 soumyadeep soumyadeep 710 May 4 16:51 caught_interrupt.cpp

    -rw-r--r-- 1 soumyadeep soumyadeep 557 May 4 16:34 trim.cpp

    -rw-r--r-- 1 soumyadeep soumyadeep 1204 May 4 16:24 1325.test.cpp

    Files List (First one is oldest)

    total 32

    -rw-r--r-- 1 soumyadeep soumyadeep 1204 May 4 16:24 1325.test.cpp

    -rw-r--r-- 1 soumyadeep soumyadeep 557 May 4 16:34 trim.cpp

    -rw-r--r-- 1 soumyadeep soumyadeep 710 May 4 16:51 caught_interrupt.cpp

    -rw-r--r-- 1 soumyadeep soumyadeep 1481 May 4 17:03 test.cpp

    -rw-r--r-- 1 soumyadeep soumyadeep 424 May 11 15:19 linux_mod_list.cpp

    -rwxr-xr-x 1 soumyadeep soumyadeep 8984 May 11 15:19 a.out

    相关资源:高性能跨平台(WinLinux;)网络通信框架HP-Socket_易语言hpsocket...

    文章知识点与官方知识档案匹配

    CS入门技能树Linux入门创建一个空白文件

    23936 人正在系统学习中

    打开CSDN,阅读体验更佳

    每天一个新知识之linux下利用diff比较两个文件的差异并使用patch进行差异...

    1、首先我们先来了解下diff和patch这两个命令的使用方式diff 选项 旧文件 新文件 #作用比较新旧文件的不同常用选项用途-a将文档当作文本文档来处理-b忽略空格造成的差异-B忽略空白行造成的差异-I忽略大小写造成的差异-N当比较两个目录...

    继续访问

    Linux下 用cmp工具备份,文件比较工具:diff,cmp_贾少女的博客-CSDN博 ...

    补充说明:patch指令让用户利用设置修补文件的方式,修改,更新原始文件。倘若一次仅修改一个文件,可直接在指令列中下达指令依序执行。如果配合修补文件的方式则能一次修补大批文件,这也是Linux系统核心的升级方法之一。

    继续访问

    新旧文件对比软件、文件对比

    一款不可多得的专业级的文件夹和文件对比工具。使用他可以很方便的对比出两个文件夹或者文件的不同之处。并把相差的每一个字节用颜铯加以表示,查看方便。并且支持多种规则对比。 对软件汉化者来说,这绝对是一款不可多得的工具。

    linux查找最老文件,linux find命令查找比某个文件新或旧的文件

    如果希望查找更改时间比某个文件新但比另一个文件旧的所有文件,可以使用-newer选项。它的一般形式为:复制代码代码如下:newest_file_name ! oldest_file_name---其中,!是逻辑非符号。$ find . / -newer age.txt ! -newer belts.txt -exec ls -l {} /;例如:查找2012年17日17:00到17:40更新的文件...

    继续访问

    linux 那些文本工具,linux之文本比较工具_weixin_39839541的博客-CSDN...

    新建的passwd.old和passwd.new之间是两个不同的版本,如果要软件升级怎么办?就是将旧的文件升级为新的文件,可以先比较新旧版本,再将区别文件制作成不定文件,再由补丁文件更新旧文件 [root @localhost vitest]#diff -Naur passwd.old ...

    继续访问

    Linux 检查文件与比较两个文件(非常详细)_i鲸落i的博客_linu...

    Linux 检查文件与比较两个文件(非常详细) linux中如何去检查文件 ,看文件是否存在呢? 今天我们用到命令是test命令,这个命令最关键的作用就是用来检查/比较文件 目录

    继续访问

    [C/C++][文件操作] 对比目录并列出同名较新文件、较旧文件 0.1

    作者 [email protected],转载请注明出处:[C/C++][文件操作]目录/文件夹对比并列出同名较新文件、较旧文件 V1 主要是模仿robocopy的部分功能 (robocopy /L 参数可以列出本地目录和备份目录中的异同之处,主要是标记出:较新的、较旧的、多出的文件 ) 现在还不会写GUI,打算后面自己做目录树diff,可以手动点选要复制的文件。 同时我也...

    继续访问

    linux下的文件比对工具,Linux - 文件比对工具

    通常一个软件包的不同版本之间,比较配置文件与原始档的差异时,经常用到一些文件比对的工具。这里就讲一下diff和cmp。1. 以行为单位对比的diff由于是以行为比对的单位,因此diff常常是用在同一文件(或软件)的新旧版本差异上。工作模式:diff [-bBi] file1 file2选项与参数-- file1 :作为原始比对文件的文档名-- file2 :作为目的比对文件的文档名注意,file1...

    继续访问

    linux下文件比较工具diff|cmp使用小结_wangww631的博客_cmp...

    diff是Unix系统的一个很重要的工具程序。它用来比较两个文本文件的差异,是代码版本管理的基石之一。 2.diff使用格式 (1)比较文件 [plain]view plaincopy diff filename_1 filename_2 diff filename_1 filename_2 ...

    继续访问

    Linux命令详解1--文件和目录管理之文件查找和比较_dijiao1273的博客-CSD...

    locate命令其实是find -name的另一种写法,但是要比后者快得多,原因在于它不搜索具体目录,而是搜索一个数据库/var/lib/locatedb,这个数据库中含有本地所有文件信息。Linux系统自动创建这个数据库,并且每天自动更新一次,所以使用locate命令查...

    继续访问

    Shell条件测试之文件比较

    文件比较(文件测试运算符): -d file : file是否为目录,directory简写d -f file : file是否为文件,file简写为f -e file :file是否存在,exist简写为e -r file :file是否可读,read简写r -w file : file是否可写,write简写为w -x file : file是否可执行,execute执行简写为x ...

    继续访问

    linux对比文件更新

    比较服务器本地差异文件上传 rsync-c-n-I-vzrtopg-P--excludeRuntime/--exclude".git""--exclude"Menu""--exclude"Application/Common/Common/function.php"--exclude"Application/Home/Controller/CabinetController.class.php"--exclude"Application/Home/Model/Cabin...

    继续访问

    Linux文本比较指令(diff,cmp)详解_siasjack的博客

    一、文本文件比较命令diff 1diff命令的功能 Linux中diff命令的功能为逐行比较两个文本文件,列出其不同之处。它对给出的文件进行系统的检查,并显示出两个文件中所有不同的行,不要求事先对文件进行排序。

    继续访问

    linux下文件比较工具diff|cmp使用小结

    1.diff diff是Unix系统的一个很重要的工具程序。它用来比较两个文本文件的差异,是代码版本管理的基石之一。 2.diff使用格式 (1)比较文件 diff filename_1 filename_2(2)比较目录 diff dir_1 dir_2diff命令常用的选项: -b —— 忽略一行中的空字符的区别(例如“Hello World!!” 与 “Hello

    继续访问

    热门推荐 Linux 比较两个文件的差异并显示

    Linux 中 diff 用于比较文件的内容,特别是比较两个版本不同的文件以找到改动的地方。可以用来比较单个文件或者目录内容。根据不同的选项进行比较并且显示。

    继续访问

    在 Linux 上比较文件的聪明方法

    自 Linux 早期以来,用于比较文件的命令已经激增。在这篇文章中,我们将介绍一组可用于比较文件的命令,并重点介绍一些较新的命令所提供的优势。 差异 diff命令是用于检测和报告文件差异的最古老且仍然流行的命令之一。比较两个与会者列表,diff命令将简单而清晰地向您显示差异。 $ diff 出勤-2020 出勤-2021 10,12c10 门罗·兰德里 乔纳森·穆迪 唐纳尔摩尔 --- 桑德拉·亨利-斯托克 仅显示不同的行。输出位于仅在第一个文件中带有lt

    继续访问

    Linux命令 - diff 命令(比较文件的差异)

    Linux diff 命令 文章目录Linux diff 命令简介输出结果解释实例实例1:比较两个文件实例2:并排格式输出常用参数 简介 Linux diff 命令用于比较文件的差异。 diff 以逐行的方式,比较文本文件的异同处。如果指定要比较目录,则 diff 会比较目录中相同文件名的文件,但不会比较其中子目录。 输出结果解释 diff 比较结果的含义,diff 描述两个文件不同的方式是告诉我们怎么样改变第一个文件之后与第二个文件匹配。 a = add c = change d = d

    继续访问

    文件新旧判断和字符串判断

    两个文件之间进行比较 文件1 -nt 文件2 判断文件1的修改时间是否比文件2的新 文件1 -ot 文件2 判断文件1的修改时间是否比文件2的旧 文件1 -ef 文件2 判断文件1是否和文件2的inode号一致,可以理解为两个文件是否为同一个文件。这个判断用于判断硬链接是很好的方法。 字符串的判断 -z 字符串 判断字符串是否为空 -n 字符串 判断字符串是...

    继续访问

    Linux diff 比较文件差异

    作者:解琛 时间:2020 年 8 月 28 日 diff 为 Linux 命令,用于比较文本或者文件夹差异,可以通过 man 来查询其功能以及参数的使用。 使用 patch 命令可以对文件或者文件夹应用修改。 diff -r -u -P proj_a_original proj_a_mine diff.patch 递归的比较文件夹差异,并将结果重定向输出到 diff.patch 文件中。 proj_a_original 指 proj_a 的源文件,即未经修改的源码包,proj_a_mine.

    继续访问

    每天一个新知识之linux下利用diff比较两个文件的差异并使用patch进行差异文件同步

    1、首先我们先来了解下diff和patch这两个命令的使用方式 diff 选项 旧文件 新文件 #作用比较新旧文件的不同 常用选项 用途 -a 将文档当作文本文档来处理 -b 忽略空格造成的差异 -B 忽略空白行造成的差异 -I 忽略大小写造成的差异 -N 当比较两个目录时,如果某个文件只在一个目录中,则在另一个目录中将视为空文件 -r 比较目录时递归比较子目录 -u 使用统一的输出格式 patch 选项 修补文件 #用于修补文件。 常用

    继续访问

    Linux文件对比

    diff /etc/rc0.d/ /etc/rc5.d/ Only in /etc/rc0.d/: K90network Only in /etc/rc5.d/: S10network 文件对比工具:Kompare Kompare是一种比较GUI包装器,让用户可以查看文件之间的差异,并且合并文件。 它的一些功能包括如下: 支持多种diff格式 支持目录比较 支持读取diff文件 可...

    继续访问

    Linux系列九-文件比较diff、patch

    一、diff 文件比较 diff [-bBi] sourcefile targetfile -b 忽略行中的多个空白的区别,如 about me 与about me相同 -B 忽略空白行 -i 忽略大小写 二、patch 结合diff使用,由比较得出的差异内容,可向文件中补充差异内容 patch -pN patchfile patch -...

    继续访问

    Linux对比文件差异

    方法一 使用diff # 最简单的 diff file1 file2 显示的结果怎么看? "|"表示前后2个文件内容有不同; ""表示后面文件比前面文件少了1行内容; ""表示后面文件比前面文件多了1行内容。 方法二(直观,推荐) 使用vimdiff 首先要注意,vimdiff是基于diff的 # 最简单的 vimdiff file1 file2 # 也可以 vim -d file1 file2 显示的结果怎么看? 比较文件连续的相同行被折叠; 只在某一文件存的行

    继续访问

    最新发布 Shell命令比较2个文件的差异

    1、测试创建文件a.txt touch a.txt vim a.txt shift+i插入数据 aaa bbb ccc 2、测试创建文件b.txt touch b.txt vim b.txt shift+i插入数据 111 bbb aaa 3、比较2个文件的差异 4、排序后再比较 cat a.txt|sort|uniq|sorta_u.txt cat b.txt|sort|uniq|sortb_u.txt 5、比较排序后的a_u.txt和b_u.txt文件的差 6、个人认为以后比较2个文

    继续访问

    linux比较文件的新旧

    linux中文件新旧怎么比

    ceph 块存储rbd的使用,使用普通户创建和挂载rbd

    [email protected]:~/ceph-cluster$ ceph osd pool create rbd1-data 32 32

    pool "rbd1-data" created

    [email protected]:~/ceph-cluster$ ceph osd pool ls

    device_health_metrics

    mypool

    .rgw.root

    default.rgw.log

    default.rgw.control

    default.rgw.meta

    myrbd1

    cephfs-metadata

    cephfs-data

    rbd1-data

    在存储池启用rbd:

    [email protected]:~/ceph-cluster$ ceph osd pool application enable rbd1-data rbd

    enabled application "rbd" on pool "rbd1-data"

    初始化存储池:

    [email protected]:~/ceph-cluster$ rbd pool init -p rbd1-data

    创建存储池映像文件:

    映像文件的管理都是rbd命令来执行,rbd可对映像执行创建,查看,删除,以及创建快照,克隆映像,删除快照,查看快照,快照回滚等管理操作

    [email protected]:~/ceph-cluster$ rbd create data-img1 --size 3G --pool rbd1-data --image-format 2 --image-feature layering

    [email protected]:~/ceph-cluster$ rbd create data-img2 --size 5G --pool rbd1-data --image-format 2 --image-feature layering

    查看存储池映像文件

    [email protected]:~/ceph-cluster$ rbd list --pool rbd1-data

    data-img1

    data-img2

    列出映像更多信息

    [email protected]:~/ceph-cluster$ rbd list --pool rbd1-data -l

    NAME      SIZE  PARENT  FMT  PROT  LOCK

    data-img1  3 GiB            2           

    data-img2  5 GiB            2

    [email protected]:~/ceph-cluster$ rbd --image data-img1 --pool rbd1-data info

    rbd image "data-img1":

    size 3 GiB in 768 objects

    order 22 (4 MiB objects)

    snapshot_count: 0

    id: 3ab91c6a62f5

    block_name_prefix: rbd_data.3ab91c6a62f5

    format: 2

    features: layering

    op_features:

    flags:

    create_timestamp: Thu Sep  2 06:48:11 2021

    access_timestamp: Thu Sep  2 06:48:11 2021

    modify_timestamp: Thu Sep  2 06:48:11 2021

    [email protected]:~/ceph-cluster$ rbd --image data-img1 --pool rbd1-data info --format json --pretty-format

    {

        "name": "data-img1",

        "id": "3ab91c6a62f5",

        "size": 3221225472,

        "objects": 768,

        "order": 22,

        "object_size": 4194304,

        "snapshot_count": 0,

        "block_name_prefix": "rbd_data.3ab91c6a62f5",

        "format": 2,

        "features": [

            "layering"

        ],

        "op_features": [],

        "flags": [],

        "create_timestamp": "Thu Sep  2 06:48:11 2021",

        "access_timestamp": "Thu Sep  2 06:48:11 2021",

        "modify_timestamp": "Thu Sep  2 06:48:11 2021"

    }

    镜像(映像)特性的启用和禁用

    特性包括:

    layering支持分层快照特性  默认开启

    striping条带化

    exclusive-lock:支持独占锁  默认开启

    object-map 支持对象映射,加速数据导入导出及已用空间特性统计等  默认开启

    fast-diff 快速计算对象和快找数据差异对比  默认开启

    deep-flatten  支持快照扁平化操作  默认开启

    journaling  是否记录日志

    开启:

    [email protected]:~/ceph-cluster$ rbd feature enable object-map --pool rbd1-data --image data-img1

    [email protected]:~/ceph-cluster$ rbd feature enable fast-diff --pool rbd1-data --image data-img1

    [email protected]:~/ceph-cluster$ rbd feature enable exclusive-lock --pool rbd1-data --image data-img1

    禁止:

    [email protected]:~/ceph-cluster$ rbd feature disable object-map --pool rbd1-data --image data-img1

    [email protected]:~/ceph-cluster$ rbd feature disable fast-diff --pool rbd1-data --image data-img1

    [email protected]:~/ceph-cluster$ rbd feature disable exclusive-lock --pool rbd1-data --image data-img1

    客户端使用块设备:

    首先要安装ceph-comman,配置授权

    [[email protected] ceph_data]# yum install -y

    [[email protected] ceph_data]# yum install ceph-common -y 

    授权,

    [email protected]:/etc/ceph$ sudo -i

    [email protected]:~# cd /etc/ceph/           

    [email protected]:/etc/ceph# scp ceph.conf ceph.client.admin.keyring [email protected]:/etc/ceph

    ubuntu系统:

    [email protected]:/var/lib/ceph# apt install -y ceph-common

    [email protected]:/etc/ceph# sudo scp ceph.conf ceph.client.admin.keyring [email protected]:/tmp

    [email protected]"s password:

    ceph.conf                                                                                                                  100%  270  117.7KB/s  00:00   

    ceph.client.admin.keyring

    [email protected]:/var/lib/ceph# cd /etc/ceph/

    [email protected]:/etc/ceph# cp /tmp/ceph.c" /etc/ceph/

    [email protected]:/etc/ceph# ll /etc/ceph/

    total 20

    drwxr-xr-x  2 root root 4096 Aug 26 07:58 ./

    drwxr-xr-x 84 root root 4096 Aug 26 07:49 ../

    -rw-------  1 root root  151 Sep  2 07:24 ceph.client.admin.keyring

    -rw-r--r--  1 root root  270 Sep  2 07:24 ceph.conf

    -rw-r--r--  1 root root  92 Jul  8 07:17 rbdmap

    -rw-------  1 root root    0 Aug 26 07:58 tmpmhFvZ7

    客户端映射镜像

    [email protected]:/etc/ceph# rbd -p rbd1-data map data-img1

    rbd: sysfs write failed

    RBD image feature set mismatch. You can disable features unsupported by the kernel with "rbd feature disable rbd1-data/data-img1 object-map fast-diff".

    In some cases useful info is found in syslog - try "dmesg | tail".

    rbd: map failed: (6) No such device or address

    [email protected]:/etc/ceph# rbd feature disable rbd1-data/data-img1 object-map fast-diff

    [email protected]:/etc/ceph# rbd -p rbd1-data map data-img1

    /dev/rbd0

    [email protected]:/etc/ceph# rbd -p rbd1-data map data-img2

    格式化块设备admin映射映像文件

    查看块设备

    [email protected]:/etc/ceph# lsblk

    NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT

    sda      8:0    0  20G  0 disk

    └─sda1  8:1    0  20G  0 part /

    sr0    11:0    1 1024M  0 rom 

    rbd0  252:0    0    3G  0 disk

    rbd1  252:16  0    5G  0 disk

    [email protected]:/etc/ceph# mkfs.ext4 /dev/rbd1

    mke2fs 1.44.1 (24-Mar-2018)

    Discarding device blocks: done                           

    Creating filesystem with 1310720 4k blocks and 327680 inodes

    Filesystem UUID: 168b99e6-a3d7-4dc6-9c69-76ce8b42f636

    Superblock backups stored on blocks:

    32768, 98304, 163840, 229376, 294912, 819200, 884736

    Allocating group tables: done                           

    Writing inode tables: done                           

    Creating journal (16384 blocks): done

    Writing superblocks and filesystem accounting information: done

    挂在挂设备

    [email protected]:/etc/ceph# mkdir /data/data1 -p

    [email protected]:/etc/ceph# mount /dev/rbd1 /data/data1/

    验证写入数据:

    [email protected]:/etc/ceph# cd /data/data1/

    [email protected]:/data/data1# cp /var/log/ . -r

    [email protected]:/data/data1# ceph df

    --- RAW STORAGE ---

    CLASS    SIZE    AVAIL    USED  RAW USED  %RAW USED

    hdd    220 GiB  213 GiB  7.4 GiB  7.4 GiB      3.37

    TOTAL  220 GiB  213 GiB  7.4 GiB  7.4 GiB      3.37

    --- POOLS ---

    POOL                  ID  PGS  STORED  OBJECTS    USED  %USED  MAX AVAIL

    device_health_metrics  1    1      0 B        0      0 B      0    66 GiB

    mypool                  2  32  1.2 MiB        1  3.5 MiB      0    66 GiB

    .rgw.root              3  32  1.3 KiB        4  48 KiB      0    66 GiB

    default.rgw.log        4  32  3.6 KiB      209  408 KiB      0    66 GiB

    default.rgw.control    5  32      0 B        8      0 B      0    66 GiB

    default.rgw.meta        6    8      0 B        0      0 B      0    66 GiB

    myrbd1                  7  64  829 MiB      223  2.4 GiB  1.20    66 GiB

    cephfs-metadata        8  32  563 KiB      23  1.7 MiB      0    66 GiB

    cephfs-data            9  64  455 MiB      129  1.3 GiB  0.66    66 GiB

    rbd1-data              10  32  124 MiB      51  373 MiB  0.18    66 GiB

    创建普通用户并授权

    [email protected]:/etc/ceph# ceph auth add client.huahualin mon "allow rw"  osd "allow rwx pool=rbd1-data"

    added key for client.huahualin

    [email protected]:/etc/ceph# ceph-authtool --create-keyring ceph.client.huahualin.keyring

    creating ceph.client.huahualin.keyring

    [email protected]:/etc/ceph# ceph auth  get client.huahualin -o ceph.client.huahualin.keyring

    exported keyring for client.huahualin

    使用普通用户创建rbd

    [email protected]:/etc/ceph# scp ceph.conf ceph.client.huahualin.keyring  [email protected]:/etc/ceph/

    普通用户映射镜像

    [[email protected] ~]# rbd --user huahualin --pool rbd1-data map data-img2

    /dev/rbd0

    使用普通用户挂载rbd

    [[email protected] ~]# mkfs.ext4 /dev/rbd0

    [[email protected] ~]# fdisk -l /dev/rbd0

    [[email protected] ~]# mkdir /data

    [[email protected] ~]# mount  /dev/rbd0 /data

    [[email protected] ~]# df -Th

    Filesystem              Type      Size  Used Avail Use% Mounted on

    devtmpfs                devtmpfs  475M    0  475M  0% /dev

    tmpfs                  tmpfs    487M    0  487M  0% /dev/shm

    tmpfs                  tmpfs    487M  7.7M  479M  2% /run

    tmpfs                  tmpfs    487M    0  487M  0% /sys/fs/cgroup

    /dev/mapper/centos-root xfs        37G  1.7G  36G  5% /

    /dev/sda1              xfs      1014M  138M  877M  14% /boot

    tmpfs                  tmpfs      98M    0  98M  0% /run/user/0

    192.168.241.12:6789:/  ceph      67G  456M  67G  1% /ceph_data

    /dev/rbd0              ext4      4.8G  20M  4.6G  1% /data

    挂载rbd后会自动加载模块libceph.ko

    [[email protected] ~]# lsmod |grep ceph

    ceph                  363016  1

    libceph              306750  2 rbd,ceph

    dns_resolver          13140  1 libceph

    libcrc32c              12644  4 xfs,libceph,nf_nat,nf_conntrack

    [[email protected] ~]# modinfo libceph

    filename:      /lib/modules/3.10.0-1160.el7.x86_64/kernel/net/ceph/libceph.ko.xz

    license:        GPL

    description:    Ceph core library

    author:        Patience Warnick [email protected]

    author:        Yehuda Sadeh [email protected]

    author:        Sage Weil [email protected]

    retpoline:      Y

    rhelversion:    7.9

    srcversion:    D4ABB648AE8130ECF90AA3F

    depends:        libcrc32c,dns_resolver

    intree:        Y

    vermagic:      3.10.0-1160.el7.x86_64 SMP mod_unload modversions

    signer:        CentOS Linux kernel signing key

    sig_key:        E1:FD:B0:E2:A7:E8:61:A1:D1:CA:80:A2:3D:CF:0D:BA:3A:A4:AD:F5

    sig_hashalgo:  sha256

    如果镜像空间不够用了,我们可以做镜像空间的拉伸,一般不建议减小

    查看rdb1-data存储池的镜像

    [[email protected] ~]# rbd ls -p rbd1-data -l

    NAME      SIZE  PARENT  FMT  PROT  LOCK

    data-img1  3 GiB            2           

    data-img2  5 GiB            2 

    比如data-img2空间不够了,需要拉伸,将data-img2扩展到8G

    [[email protected] ~]# rbd resize --pool rbd1-data --image data-img2 --size  8G

    Resizing image: 100% complete...done.

    可以通过fdisk -l查看镜像空间大小,但是通过df -h就看不到

    [[email protected] ~]# lsblk

    NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT

    sda              8:0    0  40G  0 disk

    ├─sda1            8:1    0    1G  0 part /boot

    └─sda2            8:2    0  39G  0 part

      ├─centos-root 253:0    0  37G  0 lvm  /

      └─centos-swap 253:1    0    2G  0 lvm  [SWAP]

    sr0              11:0    1 1024M  0 rom 

    rbd0            252:0    0    8G  0 disk /data

    [[email protected] ~]# fdisk -l /dev/rbd0

    Disk /dev/rbd0: 8589 MB, 8589934592 bytes, 16777216 sectors

    Units = sectors of 1 " 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 4194304 bytes / 4194304 bytes

    将挂载设置开机启动

    [[email protected] ~]# vi /etc/rc.d/rc.local

    rbd --user huahualin --pool rbd1-data map data-img2

    mount /dev/rbd0 /data

    [[email protected] ~]# chmod a+x  /etc/rc.d/rc.local

    [[email protected] ~]# reboot

    上一页12下一页