From 9c77afd218fe788085eee5d0a6e83d5170180a17 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 24 Sep 2014 10:35:09 +0800 Subject: [PATCH] =?UTF-8?q?20140924-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...loses nginx Exploit in Ubuntu 14.04 LTS.md | 36 ++++++ ...ie to Have GNOME as the Default Desktop.md | 42 ++++++ ...the Line for Red Hat Enterprise Linux 5.md | 29 +++++ ...E Plasma 5 Arrives with Lots of Changes.md | 38 ++++++ ...4 7 killer open source monitoring tools.md | 65 ++++++++++ ...24 How To Install Vmware 10 On CentOS 7.md | 59 +++++++++ ...ly opened files history in ubuntu 14.04.md | 26 ++++ ...are as a ddclient provider under Ubuntu.md | 72 +++++++++++ .../20140924 Unix----stat -- more than ls.md | 122 ++++++++++++++++++ 9 files changed, 489 insertions(+) create mode 100644 sources/news/20140924 Canonical Closes nginx Exploit in Ubuntu 14.04 LTS.md create mode 100644 sources/news/20140924 Debian 8 Jessie to Have GNOME as the Default Desktop.md create mode 100644 sources/news/20140924 End of the Line for Red Hat Enterprise Linux 5.md create mode 100644 sources/news/20140924 Second Bugfix Release for KDE Plasma 5 Arrives with Lots of Changes.md create mode 100644 sources/talk/20140924 7 killer open source monitoring tools.md create mode 100644 sources/tech/20140924 How To Install Vmware 10 On CentOS 7.md create mode 100644 sources/tech/20140924 How to delete recently opened files history in ubuntu 14.04.md create mode 100644 sources/tech/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md create mode 100644 sources/tech/20140924 Unix----stat -- more than ls.md diff --git a/sources/news/20140924 Canonical Closes nginx Exploit in Ubuntu 14.04 LTS.md b/sources/news/20140924 Canonical Closes nginx Exploit in Ubuntu 14.04 LTS.md new file mode 100644 index 0000000000..5fc412d2b5 --- /dev/null +++ b/sources/news/20140924 Canonical Closes nginx Exploit in Ubuntu 14.04 LTS.md @@ -0,0 +1,36 @@ +Canonical Closes nginx Exploit in Ubuntu 14.04 LTS +================================================================================ +> Users have to upgrade their systems to fix the issue + +![Ubuntu 14.04 LTS](http://i1-news.softpedia-static.com/images/news2/Canonical-Closes-Nginx-Exploit-in-Ubuntu-14-04-LTS-459677-2.jpg) + +Ubuntu 14.04 LTS + +**Canonical has published details in a security notice about an nginx vulnerability that affected Ubuntu 14.04 LTS (Trusty Tahr). The problem has been identified and fixed.** + +The Ubuntu developers have fixed a small nginx exploit. They explain that nginx could have been made to expose sensitive information over the network. + +According to the security notice, “Antoine Delignat-Lavaud and Karthikeyan Bhargavan discovered that nginx incorrectly reused cached SSL sessions. An attacker could possibly use this issue in certain configurations to obtain access to information from a different virtual host.” + +For a more detailed description of the problems, you can see Canonical's security [notification][1]. Users should upgrade their Linux distribution in order to correct this issue. + +The problem can be repaired by upgrading the system to the latest nginx package (and dependencies). To apply the patch, you can simply run the Update Manager application. + +If you don't want to use the Software Updater, you can open a terminal and enter the following commands (you will need to be root): + + sudo apt-get update + sudo apt-get dist-upgrade + +In general, a standard system update will make all the necessary changes. You don't have to restart the PC in order to implement this fix. +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Canonical-Closes-Nginx-Exploit-in-Ubuntu-14-04-LTS-459677.shtml + +作者:[Silviu Stahie][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://www.ubuntu.com/usn/usn-2351-1/ \ No newline at end of file diff --git a/sources/news/20140924 Debian 8 Jessie to Have GNOME as the Default Desktop.md b/sources/news/20140924 Debian 8 Jessie to Have GNOME as the Default Desktop.md new file mode 100644 index 0000000000..8130d7701d --- /dev/null +++ b/sources/news/20140924 Debian 8 Jessie to Have GNOME as the Default Desktop.md @@ -0,0 +1,42 @@ +Debian 8 "Jessie" to Have GNOME as the Default Desktop +================================================================================ +> The Debian GNOME team has made a real effort + +![The GNOME 3.14 desktop](http://i1-news.softpedia-static.com/images/news2/Debian-8-quot-Jessie-quot-to-Have-GNOME-as-the-Default-Desktop-459665-2.jpg) + +The GNOME 3.14 desktop + +**Developers from the Debian project have been trying to decide for quite a while whether to implement Xfce, GNOME, or a few other DEs by default, and it looks like GNOME has won, at least for the time being.** + +[We wrote a couple of days ago][1] that the GNOME 3.14 packages were being uploaded to the repositories for Debian Testing or Debian 8 "Jessie," which was a nice surprise. Usually, GNOME maintainers are not all that quick to add the latest packages for any kind of software, let alone a desktop environment. + +As it turns out, the debate about the default desktop that will be implemented in the upcoming Debian 8 release has been raging on, although that word might be a little bit too strong. In any case, some of the developers wanted Xfce, others wanted GNOME, and it looks like MATE was also in the cards. + +### GNOME will be default in Debian 8 "Jessie," most likely ### + +We say most likely because an agreement hasn't been quite reached yet, but it looks like GNOME is way ahead of everyone else. Debian maintainer and developer Joey Hess explains why this is happening. + +"Based on preliminary results from https://wiki.debian.org/DebianDesktop/Requalification/Jessie Some desired data is not yet available, but at this point I'm around 80% sure that gnome is coming out ahead in the process. This is particularly based on accessibility and to some extent systemd integration. Accessibility: Gnome and Mate are ahead by a large margin. Some of the other desktops have had their accessability integration in Debian improved, partly driven by this process, but still need significant upstream work." + +"Systemd/etc integration: Xfce, Mate, etc are stuck paying catch-up to ongoing changes in this area. There will be time to hopefully iron these issues out during the freeze once the tech stack stops changing out from under them, so this is not a complete blocker for those desktops, but going by the current status, Gnome is ahead," [adds][2] Joey Hess. + +The developer says in the email that the Debian GNOME team has made [a really passionate case][3] for their maintained project and that the Debian Xfce team was actually ambivalent about having the desktop as default. + +In any case, Debian 8 "Jessie" doesn't have a launch date set yet and there is no indication when it might get released. On the other hand, GNOME 3.14 is out today (maybe it will have already launched by the time you read the news) and it will soon be ready for testing in Debian. + +We should also thank Jordi Mallach, one of the maintainers of the GNOME packages in Debian, for reaching out and pointing us in the right direction. + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Debian-8-quot-Jessie-quot-to-Have-GNOME-as-the-Default-Desktop-459665.shtml + +作者:[Silviu Stahie][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://news.softpedia.com/news/Debian-8-quot-Jessie-quot-to-Get-GNOME-3-14-459470.shtml +[2]:http://anonscm.debian.org/cgit/tasksel/tasksel.git/commit/?id=dce99f5f8d84e4c885e6beb4cc1bb5bb1d9ee6d7 +[3]:http://news.softpedia.com/news/Debian-Maintainer-Says-that-Xfce-on-Debian-Will-Not-Meet-Quality-Standards-GNOME-Is-Needed-454962.shtml \ No newline at end of file diff --git a/sources/news/20140924 End of the Line for Red Hat Enterprise Linux 5.md b/sources/news/20140924 End of the Line for Red Hat Enterprise Linux 5.md new file mode 100644 index 0000000000..207e7ac2a4 --- /dev/null +++ b/sources/news/20140924 End of the Line for Red Hat Enterprise Linux 5.md @@ -0,0 +1,29 @@ +End of the Line for Red Hat Enterprise Linux 5 +================================================================================ +In March of 2007, Red Hat first announced its [Red Hat Enterprise Linux 5][1]( RHEL) platform. Though it might seem quant today, RHEL 5 was particularly notable in that it was the first major release for Red Hat to emphasize virtualization, which is a feature all modern distros now take for granted. + +Originally the plan was for RHEL 5 to have seven years of life, but that plan changed in 2012 when when Red Hat [extended][2] its standard support for RHEL 5 to 10 years. + +This past week, Red Hat released RHEL 5.11 which is the final minor milestone release for RHEL 5.X. RHEL now enters what Red Hat calls it production 3 support which will last for another three years. During the production three phase no new functionality is added to the platform and Red Hat will only provide critical impact security fixes and urgent priority bug fixes. + +"Red Hat’s commitment to a long, stable product lifecycle is a key benefit for enterprise customers who rely on Red Hat Enterprise Linux for their critical applications," Jim Totton, vice president and general manager, Platform Business Unit, Red Hat said in a statement. " While Red Hat Enterprise Linux 5.11 is the final minor release of the Red Hat Enterprise Linux 5 platform, the enhancements it offers in terms of security and reliability are designed to maintain the platform’s viability for years to come." + +The new enhancements include security and stability updates including improvements to the way that Red Hat can help users to debug a system. + +There are also new storage drivers to support newer storage adapters and improved support for RHEL running on VMware ESXi. + +On the security front the big improvement is an update to OpenSCAP version 1.0.8. Red Hat first provided support for OpenSCAP in May of 2011 with the [RHEL 5.7 milestone update][3]. OpenSCAP is an open source implementation of the Security Content Automation Protocol (SCAP) framework for creating a standardized approach for maintaining secure systems. + +-------------------------------------------------------------------------------- + +via: http://www.linuxplanet.com/news/end-of-the-line-for-red-hat-enterprise-linux-5.html + +作者:Sean Michael Kerner +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.internetnews.com/ent-news/article.php/3665641 +[2]:http://www.serverwatch.com/server-news/red-hat-extends-linux-support.html +[3]:http://www.internetnews.com/skerner/2011/05/red-hat-enterprise-linux-57-ad.html \ No newline at end of file diff --git a/sources/news/20140924 Second Bugfix Release for KDE Plasma 5 Arrives with Lots of Changes.md b/sources/news/20140924 Second Bugfix Release for KDE Plasma 5 Arrives with Lots of Changes.md new file mode 100644 index 0000000000..df696e4f0e --- /dev/null +++ b/sources/news/20140924 Second Bugfix Release for KDE Plasma 5 Arrives with Lots of Changes.md @@ -0,0 +1,38 @@ +Second Bugfix Release for KDE Plasma 5 Arrives with Lots of Changes +================================================================================ +> The new Plasma 5 desktop is out with a new version + +![KDE Plasma 5](http://i1-news.softpedia-static.com/images/news2/Second-Bugfix-Release-for-KDE-Plasma-5-Arrives-with-Lots-of-Changes-459688-2.jpg) + +KDE Plasma 5 + +### The KDE Community has announced that the second bugfix release for Plasma 5 is now out and available for download. ### + +Bugfix releases for the KDE Plasma 5, the new desktop experience that will be an integral part of the KDE ecosystem, have started to arrive very often. + +"This release, versioned plasma-5.0.2, adds a month's worth of new translations and fixes from KDE's contributors. The bugfixes are typically small but important such as fixing text which couldn't be translated, using the correct icons and fixing overlapping files with KDELibs 4 software. It also adds a month's hard work of translations to make support in other languages even more complete," reads the [announcement][1]. + +This particular desktop is not yet implemented by default in any Linux distro and it will be a while until we are able to test it properly. + +The developers also explain that the updated packages can be reviewed in the development versions of Kubuntu Plasma 5. + +You can also download the source packages, if you need them individually. + +- [KDE Plasma Packages][2] +- [KDE Plasma Sources][3] + +You also have to keep in mind that KDE Plasma 5.0.2 is a sophisticated piece of software and you really need to know what you are doing if you decide to compile it. +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Second-Bugfix-Release-for-KDE-Plasma-5-Arrives-with-Lots-of-Changes-459688.shtml + +作者:[Silviu Stahie][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://kde.org/announcements/plasma-5.0.2.php +[2]:https://community.kde.org/Plasma/Packages +[3]:http://kde.org/info/plasma-5.0.2.php \ No newline at end of file diff --git a/sources/talk/20140924 7 killer open source monitoring tools.md b/sources/talk/20140924 7 killer open source monitoring tools.md new file mode 100644 index 0000000000..ac06defd7c --- /dev/null +++ b/sources/talk/20140924 7 killer open source monitoring tools.md @@ -0,0 +1,65 @@ +7 killer open source monitoring tools +================================================================================ +Looking for greater visibility into your network? Look no further than these excellent free tools + +Network and system monitoring is a broad category. There are solutions that monitor for the proper operation of servers, network gear, and applications, and there are solutions that track the performance of those systems and devices, providing trending and analysis. Some tools will sound alarms and notifications when problems are detected, while others will even trigger actions to run when alarms sound. Here is a collection of open source solutions that aim to provide some or all of these capabilities. + +### Cacti ### + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_02-netmon-cacti-100448914-orig.jpg) + +Cacti is a very extensive performance graphing and trending tool that can be used to track just about any monitored metric that can be plotted on a graph. From disk utilization to fan speeds in a power supply, if it can be monitored, Cacti can track it -- and make that data quickly available. + +### Nagios ### + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_03-netmon-nagios-100448915-orig.jpg) + +Nagios is the old guard of system and network monitoring. It is fast, reliable, and extremely customizable. Nagios can be a challenge for newcomers, but the rather complex configuration is also its strength, as it can be adapted to just about any monitoring task. What it may lack in looks it makes up for in power and reliability. + +### Icinga ### + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_04-netmon-icinga-100448916-orig.jpg) + +Icinga is an offshoot of Nagios that is currently being rebuilt anew. It offers a thorough monitoring and alerting framework that\u2019s designed to be as open and extensible as Nagios is, but with several different Web UI options. Icinga 1 is closely related to Nagios, while Icinga 2 is the rewrite. Both versions are currently supported, and Nagios users can migrate to Icinga 1 very easily. + +### NeDi ### + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_05-netmon-nedi-100448917-orig.jpg) + +NeDi may not be as well known as some of the others, but it\u2019s a great solution for tracking devices across a network. It continuously walks through a network infrastructure and catalogs devices, keeping track of everything it discovers. It can provide the current location of any device, as well as a history. + +NeDi can be used to locate stolen or lost devices by alerting you if they reappear on the network. It can even display all known and discovered connections on a map, showing how every network interconnect is laid out, down to the physical port level. + +### Observium ### + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_06-netmon-observium-100448918-orig.jpg) + +Observium combines system and network monitoring with performance trending. It uses both static and auto discovery to identify servers and network devices, leverages a variety of monitoring methods, and can be configured to track just about any available metric. The Web UI is very clean, well thought out, and easy to navigate. + +As shown, Observium can also display the physical location of monitored devices on a geographical map. Note too the heads-up panels showing active alarms and device counts. + +### Zabbix ### + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_07-netmon-zabbix-100448919-orig.jpg) + +Zabbix monitors servers and networks with an extensive array of tools. There are Zabbix agents for most operating systems, or you can use passive or external checks, including SNMP to monitor hosts and network devices. You'll also find extensive alerting and notification facilities, and a highly customizable Web UI that can be adapted to a variety of heads-up displays. In addition, Zabbix has specific tools that monitor Web application stacks and virtualization hypervisors. + +Zabbix can also produce logical interconnection diagrams detailing how certain monitored objects are interconnected. These maps are customizable, and maps can be created for groups of monitored devices and hosts. + +### Ntop ### + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/09/22/12/slide_08-netmon-ntop-100448920-orig.jpg) + +Ntop is a packet sniffing tool with a slick Web UI that displays live data on network traffic passing by a monitoring interface. Instant data on network flows is available through an advanced live graphing function. Host data flows and host communication pair information is also available in real-time. + +-------------------------------------------------------------------------------- + +via: http://www.networkworld.com/article/2686794/asset-management/164219-7-killer-open-source-monitoring-tools.html + +作者:[Paul Venezia][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.networkworld.com/author/Paul-Venezia/ \ No newline at end of file diff --git a/sources/tech/20140924 How To Install Vmware 10 On CentOS 7.md b/sources/tech/20140924 How To Install Vmware 10 On CentOS 7.md new file mode 100644 index 0000000000..96f92552a4 --- /dev/null +++ b/sources/tech/20140924 How To Install Vmware 10 On CentOS 7.md @@ -0,0 +1,59 @@ +How To Install Vmware 10 On CentOS 7 +================================================================================ +I will give you my experience install of vmware 10.0.3 on centos 7. Normally it will not work with centos 7, because it’s running with lower kernel version 3.10. + +1 – Download and install with normal way( no problem about this ). The only problem is when you try vmware program later. + +### How to fix this? ### + +**1 – Go to /usr/lib/vmware/modules/source.** + + cd /usr/lib/vmware/modules/source + +**2 – Decompress vmnet.tar.** + + tar -xvf vmnet.tar + +**3 – Go to vmnet-only directory.** + + cd vmnet-only + +**4 – Edit filter.c file.** + + vi filter.c + +On line 206 and 259 replace string from: + + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + +to + + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0) + +Save and exit. + +**5 – Back to folder before.** + + cd ../ + +**6 – Compress the folder again.** + + tar -uvf vmnet.tar vmnet-only + +**7 – Remove the old directory.** + + rm -fr vmnet-only + +**8 – Start your vmware and Enjoy.** + +![](http://180016988.r.cdn77.net/wp-content/uploads/2014/09/Selection_008.png) + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-vmware-10-centos-7/ + +作者: M.el Khamlichi +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20140924 How to delete recently opened files history in ubuntu 14.04.md b/sources/tech/20140924 How to delete recently opened files history in ubuntu 14.04.md new file mode 100644 index 0000000000..e77289c352 --- /dev/null +++ b/sources/tech/20140924 How to delete recently opened files history in ubuntu 14.04.md @@ -0,0 +1,26 @@ +How to delete recently opened files history in ubuntu 14.04 +================================================================================ +This simple tutorial explains How to delete recently opened files in ubuntu 14.04.This tutorial is for beginners. + +To delete your history from dash search use the following procedure + +Go to System Settings and Open Security & Privacy + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/09/14.png) + +Under Files and Applications tab click on Clear Usage Data + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/09/26.png) + +You can also turn off the "Record file and Application usage" to prevent system to record your recent files and applications. + +![](http://www.ubuntugeek.com/wp-content/uploads/2014/09/36.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/how-to-delete-recently-opened-files-history-in-ubuntu-14-04.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md b/sources/tech/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md new file mode 100644 index 0000000000..c67ece5c77 --- /dev/null +++ b/sources/tech/20140924 How to use CloudFlare as a ddclient provider under Ubuntu.md @@ -0,0 +1,72 @@ +How to use CloudFlare as a ddclient provider under Ubuntu +================================================================================ +DDclient is a Perl client used to update dynamic DNS entries for accounts on Dynamic DNS Network Service Provider. It was originally written by Paul Burry and is now mostly by wimpunk. It has the capability to update more than just dyndns and it can fetch your WAN-ipaddress in a few different ways. + +CloudFlare, however, has a little known feature that will allow you to update your DNS records via API or a command line script called ddclient. This will give you the same result, and it's also free. + +Unfortunately, ddclient does not work with CloudFlare out of the box. There is a patch available and here is how to hack it up on Debian or Ubuntu, also works in Raspbian with Raspberry Pi. + +### Requirements ### + +Make sure you have a domain name that you own and Sign up to CloudFlare ,add your domain name. Follow the instructions, the default values it gives should be fine.You'll be letting CloudFlare host your domain so you need to adjust the settings at your registrar.If you'd like to use a subdomain, add an ‘A' record for it. Any IP address will do for now. + +### Install ddclient on ubuntu ### + +Open the terminal and run the following command + + sudo apt-get install ddclient + +Now you need to install the patch using the following commands + + sudo apt-get install curl sendmail libjson-any-perl libio-socket-ssl-perl + + curl -O http://blog.peter-r.co.uk/uploads/ddclient-3.8.0-cloudflare-22-6-2014.patch + + sudo patch /usr/sbin/ddclient < ddclient-3.8.0-cloudflare-22-6-2014.patch + +The above commands completes the ddclient and patch + +### Configuring ddclient ### + +You need to edit the ddclient.conf file using the following command + + sudo vi /etc/ddclient.conf + +Add the following information + + ## + ### CloudFlare (cloudflare.com) + ### + ssl=yes + use=web, web=dyndns + protocol=cloudflare, \ + server=www.cloudflare.com, \ + zone=domain.com, \ + login=you@email.com, \ + password=api-key \ + host.domain.com + + Comment out: + + #daemon=300 + +Your api-key comes from the cloudflare account page + +ssl=yes might already be in that file + +use=web, web=dyndns will use dyndns to check IP (useful for NAT) + +You're done. Log in to https://www.cloudflare.com and check that the IP listed for your domain matches http://checkip.dyndns.com + +To verify your settings using the following command + + sudo ddclient -daemon=0 -debug -verbose -noquiet + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/how-to-use-cloudflare-as-a-ddclient-provider-under-ubuntu.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20140924 Unix----stat -- more than ls.md b/sources/tech/20140924 Unix----stat -- more than ls.md new file mode 100644 index 0000000000..a4df6071c3 --- /dev/null +++ b/sources/tech/20140924 Unix----stat -- more than ls.md @@ -0,0 +1,122 @@ +Unix: stat -- more than ls +================================================================================ +> Tired of ls and want to see more interesting information on your files? Try stat! + +![](http://www.itworld.com/sites/default/files/imagecache/large_thumb_150x113/stats.jpg) + +The ls command is probably one of the first commands that anyone using Unix learns, but it only shows a small portion of the information that is available with the stat command. + +The stat command pulls information from the file's inode. As you might be aware, there are actually three sets of dates and times that are stored for every file on your system. These include the date the file was last modified (i.e., the date and time that you see when you use the ls -l command), the time the file was last changed (which includes renaming the file), and the time that file was last accessed. + +View a long listing for a file and you will see something like this: + + $ ls -l trythis + -rwx------ 1 shs unixdweebs 109 Nov 11 2013 trythis + +Use the stat command and you see all this: + + $ stat trythis + File: `trythis' + Size: 109 Blocks: 8 IO Block: 262144 regular file + Device: 18h/24d Inode: 12731691 Links: 1 + Access: (0700/-rwx------) Uid: ( 263/ shs) Gid: ( 100/ unixdweebs) + Access: 2014-09-09 19:27:58.000000000 -0400 + Modify: 2013-11-11 08:40:10.000000000 -0500 + Change: 2013-11-11 08:40:10.000000000 -0500 + +The file's change and modify dates/times are the same in this case, while the access time is fairly recent. We can also see that the file is using 8 blocks and we see the permissions in each of the two formats -- the octal (0700) format and the rwx format. The inode number, shown in the third line of the output, is 12731681. There are no additional hard links (Links: 1). And the file is a regular file. + +Rename the file and you will see that the change time will be updated. + +This, the ctime information, was originally intended to hold the creation date and time for the file, but the field was turned into the change time field somewhere a while back. + + $ mv trythis trythat + $ stat trythat + File: `trythat' + Size: 109 Blocks: 8 IO Block: 262144 regular file + Device: 18h/24d Inode: 12731691 Links: 1 + Access: (0700/-rwx------) Uid: ( 263/ shs) Gid: ( 100/ unixdweebs) + Access: 2014-09-09 19:27:58.000000000 -0400 + Modify: 2013-11-11 08:40:10.000000000 -0500 + Change: 2014-09-21 12:46:22.000000000 -0400 + +Changing the file's permissions would also register in the ctime field. + +You can also use wilcards with the stat command and list your files' stats in a group: + + $ stat myfile* + File: `myfile' + Size: 20 Blocks: 8 IO Block: 262144 regular file + Device: 18h/24d Inode: 12731803 Links: 1 + Access: (0640/-rw-r-----) Uid: ( 263/ shs) Gid: ( 100/ unixdweebs) + Access: 2014-08-23 03:00:36.000000000 -0400 + Modify: 2014-08-22 12:02:12.000000000 -0400 + Change: 2014-08-22 12:02:12.000000000 -0400 + File: `myfile2' + Size: 20 Blocks: 8 IO Block: 262144 regular file + Device: 18h/24d Inode: 12731806 Links: 1 + Access: (0640/-rw-r-----) Uid: ( 263/ shs) Gid: ( 100/ unixdweebs) + Access: 2014-08-23 03:00:36.000000000 -0400 + Modify: 2014-08-22 12:03:30.000000000 -0400 + Change: 2014-08-22 12:03:30.000000000 -0400 + File: `myfile3' + Size: 40 Blocks: 8 IO Block: 262144 regular file + Device: 18h/24d Inode: 12730533 Links: 1 + Access: (0640/-rw-r-----) Uid: ( 263/ shs) Gid: ( 100/ unixdweebs) + Access: 2014-08-23 03:00:36.000000000 -0400 + Modify: 2014-08-22 12:03:59.000000000 -0400 + Change: 2014-08-22 12:03:59.000000000 -0400 + +We can get some of this information with other commands if we like. + +Add the "u" option to a long listing and you'll see something like this. Notice this shows us the last access time while adding "c" shows us the change time (in this example, the time when we renamed the file). + + $ ls -lu trythat + -rwx------ 1 shs unixdweebs 109 Sep 9 19:27 trythat + $ ls -lc trythat + -rwx------ 1 shs unixdweebs 109 Sep 21 12:46 trythat + +The stat command can also work against directories. + +In this case, we see that there are a number of links. + + $ stat bin + File: `bin' + Size: 12288 Blocks: 24 IO Block: 262144 directory + Device: 18h/24d Inode: 15089714 Links: 9 + Access: (0700/drwx------) Uid: ( 263/ shs) Gid: ( 100/ unixdweebs) + Access: 2014-09-21 03:00:45.000000000 -0400 + Modify: 2014-09-15 17:54:41.000000000 -0400 + Change: 2014-09-15 17:54:41.000000000 -0400 + +Here, we're looking at a file system. + + $ stat -f /dev/cciss/c0d0p2 + File: "/dev/cciss/c0d0p2" + ID: 0 Namelen: 255 Type: tmpfs + Block size: 4096Fundamental block size: 4096 + Blocks: Total: 259366 Free: 259337 Available: 259337 + Inodes: Total: 223834 Free: 223531 + +Notice the Namelen (name length) field. Good luck if you had your heart set on file names with greater than 255 characters! + +The stat command can also display some of its information a field at a time for those times when that's all you want to see, In the example below, we just want to see the file type and then the number of hard links. + + $ stat --format=%F trythat + regular file + $ stat --format=%h trythat + 1 + +In the examples below, we look at permissions -- in each of the two available formats -- and then the file's SELinux security context. + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/operating-systems/437351/unix-stat-more-ls + +作者:[Sandra Henry-Stocker][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.itworld.com/sandra-henry-stocker \ No newline at end of file