mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-10 22:21:11 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
26258c0d8b
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -0,0 +1,109 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (“We follow a holistic approach to drive open source adoption across the client base at Infosys”)
|
||||
[#]: via: (https://opensourceforu.com/2019/11/we-follow-a-holistic-approach-to-drive-open-source-adoption-across-the-client-base-at-infosys/)
|
||||
[#]: author: (Rahul Chopra https://opensourceforu.com/author/rahul-chopra/)
|
||||
|
||||
“We follow a holistic approach to drive open source adoption across the client base at Infosys”
|
||||
======
|
||||
|
||||
[![][1]][2]
|
||||
|
||||
_As a global services company operating in fiercely competitive environments, Infosys has set up a well-established open source practice. **Gautam Khanna, VP & head – modernization practice, Infosys**, shares with **Rahul Chopra, editorial director, EFY Group**, how the company keeps its employees up-to-date with open source, motivates and helps them to contribute to the open source ecosystem, and more._
|
||||
|
||||
**Q. What are your thoughts about the pace at which open source software (OSS) is being adopted amongst global enterprises (Top 2000 or 5000)? Is it accelerating?**
|
||||
**A.** Open source adoption in enterprises is growing more rapidly than ever. A recent global survey of IT leaders revealed that nearly 90 per cent see open source as necessary to their enterprises. Open source usage is increasingly seen in categories like cloud management, security, analytics and storage, which have historically been more associated with proprietary products. Over two-thirds of the participants in the survey have increased their open source adoption in the last 12 months, and nearly 60 per cent expect to improve adoption levels over the next year as well.
|
||||
|
||||
These numbers reinforce what we have observed among our clients across industry verticals – they are using open source more than ever in their modernization journeys. This is driven by the trifecta of unmatched innovation, quality, and value that open source delivers. However, what we have also observed is that there are differing levels of adoption across verticals. The retail and communication verticals are strategically and consistently adopting open source while financial institutions are a bit more cautious in doing so.
|
||||
|
||||
**Q. Are there any specific countries or geographic regions that are leading this trend?**
|
||||
**A.** We see the growth as pervasive across geographies. India, for example, has some amazing stories of open source adoption in government, in initiatives like Aadhaar.
|
||||
|
||||
**Q. Are you seeing an increase in the number of deals that require systems integrators (SIs) like Infosys to have expertise on various open source stacks?**
|
||||
**A.** As clients look to reduce their dependence on proprietary software, manage costs, and introduce increased agility and innovation, most application modernization deals today have open source as an integral component. We see this trend only getting stronger, so building open source competencies at scale is a must for every global SI.
|
||||
|
||||
**Q. In the earlier days, there were a lot of myths about open source. Some proprietary brands were deliberately spreading FUD (fear, uncertainty and doubt) too. Today, what are the common myths or other inhibiting factors that prevent firms from adopting open source?**
|
||||
**A.** While the awareness and acceptability of open source has certainly increased a lot over the years, we still notice the prevalence of some myths. Most of them are related to open source support, security, enterprise scalability and reliability.
|
||||
|
||||
Clients also face challenges in adopting open source at the enterprise scale – including identifying the best-fit solutions from a plethora of technologies, navigating a complex vendor ecosystem and making their open source journeys cost-neutral. In all our client conversations, we focus on debunking any myths and helping our clients make informed and optimal decisions in their open source journeys.
|
||||
|
||||
**Q. How is Infosys gearing up to become a leading SI in the open source space? What new initiatives has the company taken in the last few years?**
|
||||
**A.** Open source is a strong focus area for Infosys. We have established an open source practice that works with all our services lines to execute client engagements, drive internal innovation, open source contribution and talent enablement. We have a comprehensive set of service offerings – spanning open source advisory services, architecture consulting, implementation, migration and support – to help our clients accelerate open source adoption.
|
||||
|
||||
Our architects bring both depth and breadth across the stack to deliver end-to-end solutions. We have built a suite of in-house tools and accelerators to further speed up open source based modernization and migration initiatives.
|
||||
|
||||
We have a strong ecosystem of more than 25 partners, which helps us offer end-to-end services and a single commercial interface to our clients by bundling product subscription and support along with our application services.
|
||||
|
||||
We have a razor-sharp focus on talent enablement at scale – we have over 330 open source courses, which our employees can access via our ‘learn anywhere’ platforms, and to date, over 65,000 people have been trained on open source.
|
||||
|
||||
**Q. Are there any major open source case studies that you’d like to share with our audience, particularly a case study from India?**
|
||||
**A.** There are several exciting case studies, none more impressive than from our own backyard – the GSTN project and the platform behind the most extensive indirect tax reforms in Indian history. This is also one of the largest and most complex in the world.
|
||||
|
||||
Infosys had the privilege of designing and building this ‘population-scale’ platform using an entirely open source stack, based on fundamental principles like openness, no vendor lock-in, security, reliability, availability and scalability. The system is capable of handling some astonishing volumes – around 50,000 invoices per second and 1.2 billion invoices on the last day of filing, with extremely high availability and performance. The system has been tested to handle up to 135,000 concurrent user filings and 2,000,000 tax returns on a single day. It also collects US$ 3.7 billion of tax revenues on the peak day across 800,000 transactions.
|
||||
|
||||
Case studies like GSTN showcase the power of open source in every aspect and should convince any sceptics about its suitability at the enterprise scale.
|
||||
|
||||
**Q. How does your team empower or enable other teams at Infosys, when it comes to open source?**
|
||||
**A.** Enablement of architects and developers across the company is one of the key responsibilities of our open source practice. There are three pillars of enablement – internal learning systems, partners and hackathons. We have dedicated open source technology trainers within the education, training and assessment team to enable employees at scale. Our partner and open source practice SMEs offer webinars on the latest topics related to their products, every week. Partner training courses and certifications are integrated with our anytime, anywhere, learning system LEX. We have a well-structured refactoring program for employees who may have adjacent skills to follow a defined learning path by getting themselves trained in at least one open source technology followed by certification. It is only after this that we deploy employees on an open source project, and post gaining hands-on experience, we tag them as open source professionals. We also run open source hackathons at the organization level. In these hackathons, that we run for multiple weeks, we do a mass enablement of our employees, post which they work on solving various industry problems using open source technologies.
|
||||
|
||||
**Q. How do you ensure that your team keeps pace with the rapid changes in the open source space, and is ready to offer solutions based on the latest technology stacks?**
|
||||
**A.** We have a strong team of SMEs and full-stack architects in our open source practice. A portion of our architects’ time is dedicated to learning and certifying themselves on new technologies. They are also encouraged to contribute to open source community projects. Open source SMEs participate in various forums and partner summits to share our experiences as well as learn from others experiences. They also monitor the latest trends in the industry.
|
||||
|
||||
We have a strong ecosystem of partners that we work closely with in order to understand the latest enhancements in their products and how to take these forward with clients. In the hackathons that we conduct, we encourage hackers to unleash their imagination, innovate and build new solutions leveraging latest features.
|
||||
|
||||
We believe in building joint solutions with our partners and in solving our clients’ business problems. We have a dedicated engineering team to explore and develop new tools and accelerators to solve client problems by embracing the latest open source technologies. For example, we have built a solution using the offline capability of Couchbase in collaboration with the Couchbase team.
|
||||
|
||||
**Q. Do members of your team contribute back to the open source ecosystem too? Can you share some details?**
|
||||
**A.** Yes, we do. Infosys has a structured contribution process and has created an OS Contribution Portal internally. A contributor builds a contribution and submits it for review and IP checking. Post the IP check, the contribution can be published. Infosys has contributed homegrown products like the Infosys DevOps Platform and tools like Infosys Data Rapid, NIADataRConnector, High Availability Hadoop, HBase to Hive, etc. to the open source ecosystem.
|
||||
|
||||
Infosys has executed a Corporate Contributor License Agreement (CCLA) with the Cloud Native Computing Foundation (CNCF) and is actively participating in the Kubernetes project. We have made over 50 contributions in Kubernetes in the form of bug fixes, blogs and query responses. Apart from Kubernetes, Infosys has also contributed to PostgreSQL, Elastic, Couchbase, Apache Beam and Neo4J communities. Infosys has also collaborated with the Microsoft product engineering team to enable PostgreSQL and MariaDB in Azure Data Services. This is one focus area of our open source practice. There are many more contributions in the pipeline.
|
||||
|
||||
**Q. Does Infosys motivate its employees to contribute back to the open source ecosystem or is it their individual decision?**
|
||||
**A.** It’s both. Infosys motivates employees to contribute to the open source ecosystem. We conduct internal and external events. Kubernetes Day was organized at Infosys Bengaluru this March, where thousands of people participated. We invited some industry-level open source contributors to share their open source journey and experiences. These talks were webcast to all Infoscions across locations. We have a reward and recognition process to acknowledge and appreciate open source contributors.
|
||||
|
||||
**Q. Is there a shortage of skilled professionals? Are there any specific skillsets that are badly needed, even in countries like India?**
|
||||
**A.** The average age of an S&P 500 company is under 20 years, down from 60 years in the 1950s, according to Credit Suisse. This trend is accelerating and the leading reason for this is the disruptive nature of new technologies.
|
||||
|
||||
As per a 2018 Gartner survey, talent shortage ranks third among the Top 5 business risks. Digital transformation initiatives have increased this pressure and companies are finding that retaining and hiring talent with niche skills is a key challenge.
|
||||
|
||||
Today, just 20 per cent of the current workforce has the skills required for 60 per cent of the future jobs – those that will be available in the next five to ten years. The unprecedented scale at which new technologies are getting adopted into the mainstream due to the competitive edge they provide makes it almost impossible to find talent at scale on these technologies.
|
||||
|
||||
Catering to the skills diversity needed in an organization and hiring/retaining people are key challenges. In this new harsh reality, hiring talent that is passionate about learning becomes more important than finding talent with the right skills.
|
||||
At Infosys, we are trying to address this challenge through a combination of hiring and reskilling.
|
||||
|
||||
**Q. What would be your advice to tech professionals who want to benefit from these opportunities but don’t know where to start?**
|
||||
**A.** My advice to tech professionals is straightforward; we are living in exciting times with limitless opportunities. Never before in the history of humanity have we seen such democratization of knowledge and technology, as today. There is no defined starting line, but what is most important is to learn and apply the knowledge in real business problems continuously. Knowledge begets knowledge, if shared with a broader community. So we should also look at sharing knowledge through contributions, participation at various forums and collaboration. At Infosys, we have always believed and invested heavily in learning, and we have enabled our employees to learn anytime, anywhere, through our mobile learning platform, LEX, which has over 40K resources and 600+ courses. Employees are also encouraged to and recognised for sharing their knowledge, both externally and internally. We are collaborating with our strategic partners to contribute to open source communities jointly. As we speak, we are working with one of our partners to launch an open source academy.
|
||||
|
||||
**Q. Has there been an increase in the number of open source related professionals being hired at Infosys?**
|
||||
**A.** We are seeing a huge demand for open source technologies and most of our Top 200 clients are increasingly moving their legacy systems to open source technologies. We use a combination of refactoring our existing talent pool and hiring to meet the demand.
|
||||
|
||||
![Avatar][3]
|
||||
|
||||
[Rahul Chopra][4]
|
||||
|
||||
The author is the Editor-in-Chief of Open Source For You magazine.
|
||||
|
||||
[![][5]][6]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensourceforu.com/2019/11/we-follow-a-holistic-approach-to-drive-open-source-adoption-across-the-client-base-at-infosys/
|
||||
|
||||
作者:[Rahul Chopra][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensourceforu.com/author/rahul-chopra/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Gautam-Khanna-VP-head-modernization-practice-Infosys.jpg?resize=500%2C627&ssl=1 (Gautam Khanna, VP & head - modernization practice, Infosys)
|
||||
[2]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Gautam-Khanna-VP-head-modernization-practice-Infosys.jpg?fit=500%2C627&ssl=1
|
||||
[3]: https://secure.gravatar.com/avatar/372bbe65753ca17bcceb2b0e9692af8f?s=100&r=g
|
||||
[4]: https://opensourceforu.com/author/rahul-chopra/
|
||||
[5]: https://opensourceforu.com/wp-content/uploads/2019/11/assoc.png
|
||||
[6]: https://feedburner.google.com/fb/a/mailverify?uri=LinuxForYou&loc=en_US
|
@ -1,84 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Edit images on Fedora easily with GIMP)
|
||||
[#]: via: (https://fedoramagazine.org/edit-images-on-fedora-easily-with-gimp/)
|
||||
[#]: author: (Mehdi Haghgoo https://fedoramagazine.org/author/powergame/)
|
||||
|
||||
Edit images on Fedora easily with GIMP
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
GIMP (short for GNU Image Manipulation Program) is free and open-source image manipulation software. With many capabilities ranging from simple image editing to complex filters, scripting and even animation, it is a good alternative to popular commercial options.
|
||||
|
||||
Read on to learn how to install and use GIMP on Fedora. This article covers basic daily image editing.
|
||||
|
||||
### Installing GIMP
|
||||
|
||||
GIMP is available in the official Fedora repository. To install it run:
|
||||
|
||||
```
|
||||
sudo dnf install gimp
|
||||
```
|
||||
|
||||
### Single window mode
|
||||
|
||||
Once you open the application, it shows you the dark theme window with toolbox and the main editing area. Note that it has two window modes that you can switch between by selecting _Windows_ -> _Single Window Mode_. By checking this option all components of the UI are displayed in a single window. Otherwise, they will be separate.
|
||||
|
||||
### Loading an image
|
||||
|
||||
![][2]
|
||||
|
||||
To load an image, go to _File_ -> _Open_ and choose your file and choose your image file.
|
||||
|
||||
### Resizing an image
|
||||
|
||||
To resize the image, you have the option to resize based on a couple of parameters, including pixel and percentage — the two parameters which are often handy in editing images.
|
||||
|
||||
Let’s say we need to scale down the Fedora 30 background image to 75% of its current size. To do that, select _Image_ -> _Scale_ and then on the scale dialog, select percentage in the unit drop down. Next, enter _75_ as width or height and press the **Tab** key. By default, the other dimension will automatically resize in correspondence with the changed dimension to preserve aspect ratio. For now, leave other options unchanged and press Scale.
|
||||
|
||||
![][3]
|
||||
|
||||
The image scales to 0.75 percent of its original size.
|
||||
|
||||
### Rotating images
|
||||
|
||||
Rotating is a transform operation, so you find it under _Image_ -> _Transform_ from the main menu, where there are options to rotate the image by 90 or 180 degrees. There are also options for flipping the image vertically or horizontally under the mentioned option.
|
||||
|
||||
Let’s say we need to rotate the image 90 degrees. After applying a 90-degree clockwise rotation and horizontal flip, our image will look like this:
|
||||
|
||||
![Transforming an image with GIMP][4]
|
||||
|
||||
### Adding text
|
||||
|
||||
Adding text is very easy. Just select the A icon from the toolbox, and click on a point on your image where you want to add the text. If the toolbox is not visible, open it from Windows->New Toolbox.
|
||||
|
||||
As you edit the text, you might notice that the text dialog has font customization options including font family, font size, etc.
|
||||
|
||||
![Adding text to image in GIMP][5]
|
||||
|
||||
### Saving and exporting
|
||||
|
||||
You can save your edit as as a GIMP project with the _xcf_ extension from _File_ -> _Save_ or by pressing **Ctrl+S**. Or you can export your image in formats such as PNG or JPEG. To export, go to _File_ -> _Export As_ or hit **Ctrl+Shift+E** and you will be presented with a dialog where you can select the output image and name.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/edit-images-on-fedora-easily-with-gimp/
|
||||
|
||||
作者:[Mehdi Haghgoo][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/powergame/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2019/10/gimp-magazine-816x346.jpg
|
||||
[2]: https://fedoramagazine.org/wp-content/uploads/2019/10/Screenshot-from-2019-10-25-11-00-44-300x165.png
|
||||
[3]: https://fedoramagazine.org/wp-content/uploads/2019/10/Screenshot-from-2019-10-25-11-17-33-300x262.png
|
||||
[4]: https://fedoramagazine.org/wp-content/uploads/2019/10/Screenshot-from-2019-10-25-11-41-28-300x243.png
|
||||
[5]: https://fedoramagazine.org/wp-content/uploads/2019/10/Screenshot-from-2019-10-25-11-47-54-300x237.png
|
@ -1,180 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Displaying dates and times your way)
|
||||
[#]: via: (https://www.networkworld.com/article/3481602/displaying-dates-and-times-your-way-with-linux.html)
|
||||
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
|
||||
|
||||
Displaying dates and times your way
|
||||
======
|
||||
The Linux date command provides more options for displaying dates and times than you can shake a stick at (without hurting your wrist anyway). Here are some of the more useful choices.
|
||||
Thinkstock / Tomislav Jakupec
|
||||
|
||||
The date command on Linux systems is very straightforward. You type “date” and the date and time are displayed in a useful way. It includes the day-of-the-week, calendar date, time and time zone:
|
||||
|
||||
```
|
||||
$ date
|
||||
Tue 26 Nov 2019 11:45:11 AM EST
|
||||
```
|
||||
|
||||
As long as your system is configured properly, you’ll see the date and current time along with your time zone.
|
||||
|
||||
[[Get regularly scheduled insights by signing up for Network World newsletters.]][1]
|
||||
|
||||
The command, however, also offers a lot of options to display date and time information differently. For example, if you want to display dates in the most useful format for sorting, you might want to use a command like this:
|
||||
|
||||
[][2]
|
||||
|
||||
BrandPost Sponsored by HPE
|
||||
|
||||
[Take the Intelligent Route with Consumption-Based Storage][2]
|
||||
|
||||
Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency.
|
||||
|
||||
```
|
||||
$ date "+%Y-%m-%d"
|
||||
2019-11-26
|
||||
```
|
||||
|
||||
In this case, the year, month and day are arranged in that order. Note that we use a capital Y to get a four-digit year. If we use a lowercase y, we’d see only a two-digit year (e.g., 19). Don’t let this induce you into thinking that if %m gives you a numeric month, **%**M might give you the name of the month. No, **%**M will report on minutes. To get the month in abbreviated name format, you would use **%**b and for a fully spelled out month, you would use **%**B.
|
||||
|
||||
```
|
||||
$ date "+%b %B"
|
||||
Nov November
|
||||
```
|
||||
|
||||
Alternately, you might want to display the date in this commonly used format:
|
||||
|
||||
```
|
||||
$ date +%D
|
||||
11/26/19
|
||||
```
|
||||
|
||||
If you need a four-digit year, you can do this:
|
||||
|
||||
```
|
||||
$ date "+%x"
|
||||
11/26/2019
|
||||
```
|
||||
|
||||
Here’s an example that might be useful. Say that you need to create a daily report and have the file name include the date, you could use a command like this to create the file – probably in a script:
|
||||
|
||||
```
|
||||
touch Report-`date "+%Y-%m-%d"`
|
||||
```
|
||||
|
||||
When you list your reports, they’ll list in date order or reverse date order if you add -r.
|
||||
|
||||
```
|
||||
$ ls -r Report*
|
||||
Report-2019-11-26
|
||||
Report-2019-11-25
|
||||
Report-2019-11-22
|
||||
Report-2019-11-21
|
||||
Report-2019-11-20
|
||||
```
|
||||
|
||||
You can add other details to your date strings as well. The variety of options available is surprising. You could show which quarter of the year you’re in by using **date "+%q"** or display the date it was two months ago with a command like this:
|
||||
|
||||
```
|
||||
$ date --date="2 months ago"
|
||||
Thu 26 Sep 2019 09:02:43 AM EDT
|
||||
```
|
||||
|
||||
Want to see what next Thursday’s date will be? You can use a command like **date --date="next thu"**, but understand that, for Linux, next Thursday means whatever Thursday follows today. That’s tomorrow if today is Wednesday – not Thursday of next week. However, you can specify Thursday of next week as in the second command below.
|
||||
|
||||
```
|
||||
$ date --date="next thu"
|
||||
Thu 28 Nov 2019 12:00:00 AM EST
|
||||
$ date --date="next week thu"
|
||||
Thu 05 Dec 2019 12:00:00 AM EST
|
||||
```
|
||||
|
||||
The man page for the date command lists all of its options. The list is fairly mind boggling, but you’ll probably find some date/time display options that work really well for you. Here are some that you might find interesting.
|
||||
|
||||
The date in universal time (UTC):
|
||||
|
||||
```
|
||||
$ date -u
|
||||
Tue 26 Nov 2019 01:13:59 PM UTC
|
||||
```
|
||||
|
||||
The number of seconds since Jan 1, 1970 (related to how dates are stored on Linux systems):
|
||||
|
||||
```
|
||||
$ date +%s
|
||||
1574774137
|
||||
```
|
||||
|
||||
Here's a full listing of the date command's options. As I said, it's a lot more extensive than most of us likely imagine.
|
||||
|
||||
```
|
||||
%% a literal %
|
||||
%a locale's abbreviated weekday name (e.g., Sun)
|
||||
%A locale's full weekday name (e.g., Sunday)
|
||||
%b locale's abbreviated month name (e.g., Jan)
|
||||
%B locale's full month name (e.g., January)
|
||||
%c locale's date and time (e.g., Thu Mar 3 23:05:25 2005)
|
||||
%C century; like %Y, except omit last two digits (e.g., 20)
|
||||
%d day of month (e.g., 01)
|
||||
%D date; same as %m/%d/%y
|
||||
%e day of month, space padded; same as %_d
|
||||
%F full date; same as %Y-%m-%d
|
||||
%g last two digits of year of ISO week number (see %G)
|
||||
%G year of ISO week number (see %V); normally useful only with %V
|
||||
%h same as %b
|
||||
%H hour (00..23)
|
||||
%I hour (01..12)
|
||||
%j day of year (001..366)
|
||||
%k hour, space padded ( 0..23); same as %_H
|
||||
%l hour, space padded ( 1..12); same as %_I
|
||||
%m month (01..12)
|
||||
%M minute (00..59)
|
||||
%n a newline
|
||||
%N nanoseconds (000000000..999999999)
|
||||
%p locale's equivalent of either AM or PM; blank if not known
|
||||
%P like %p, but lower case
|
||||
%q quarter of year (1..4)
|
||||
%r locale's 12-hour clock time (e.g., 11:11:04 PM)
|
||||
%R 24-hour hour and minute; same as %H:%M
|
||||
%s seconds since 1970-01-01 00:00:00 UTC
|
||||
%S second (00..60)
|
||||
%t a tab
|
||||
%T time; same as %H:%M:%S
|
||||
%u day of week (1..7); 1 is Monday
|
||||
%U week number of year, with Sunday as first day of week (00..53)
|
||||
%V ISO week number, with Monday as first day of week (01..53)
|
||||
%w day of week (0..6); 0 is Sunday
|
||||
%W week number of year, with Monday as first day of week (00..53)
|
||||
%x locale's date representation (e.g., 12/31/99)
|
||||
%X locale's time representation (e.g., 23:13:48)
|
||||
%y last two digits of year (00..99)
|
||||
%Y year
|
||||
%z +hhmm numeric time zone (e.g., -0400)
|
||||
%:z +hh:mm numeric time zone (e.g., -04:00)
|
||||
%::z +hh:mm:ss numeric time zone (e.g., -04:00:00)
|
||||
%:::z numeric time zone with : to necessary precision (e.g., -04, +05:30)
|
||||
%Z alphabetic time zone abbreviation (e.g., EDT)
|
||||
```
|
||||
|
||||
Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3481602/displaying-dates-and-times-your-way-with-linux.html
|
||||
|
||||
作者:[Sandra Henry-Stocker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.networkworld.com/newsletters/signup.html
|
||||
[2]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE20773&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
|
||||
[3]: https://www.facebook.com/NetworkWorld/
|
||||
[4]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,231 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Monitoring Linux and Windows hosts with Glances)
|
||||
[#]: via: (https://opensource.com/article/19/11/monitoring-linux-glances)
|
||||
[#]: author: (David Both https://opensource.com/users/dboth)
|
||||
|
||||
Monitoring Linux and Windows hosts with Glances
|
||||
======
|
||||
The Glances tool offers more information about system performance than
|
||||
other sysadmin monitoring tools.
|
||||
![Code going into a computer.][1]
|
||||
|
||||
Sysadmins have many tools to view and manage running processes. For me, these primarily used to be **top**, **atop**, and **htop**. A few years ago, I found [Glances][2], a tool that displays information that none of my other favorites do. All of these tools monitor CPU and memory usage, and most of them list information about running processes (at the very least). However, Glances also monitors filesystem I/O, network I/O, and sensor readouts that can display CPU and other hardware temperatures as well as fan speeds and disk usage by hardware device and logical volume.
|
||||
|
||||
### Glances
|
||||
|
||||
I mentioned Glances in my article [_4 open source tools for Linux system monitoring_][3], but I will delve into it more deeply in this article. If you read my previous article, some of this information may be familiar, but you should also find some new things here.
|
||||
|
||||
Glances is cross-platform because it is written in Python. It can be installed on Windows and other hosts with current versions of Python installed. Most Linux distributions (Fedora in my case) have Glances in their repositories. If not, or if you are using a different operating system (such as Windows), or you just want to get it right from the source, you can find instructions for downloading and installing it in [Glances' GitHub repo][4].
|
||||
|
||||
I suggest running Glances on a test machine while you try the commands in this article. If you don't have a physical host available for testing, you can explore Glances on a virtual machine (VM), but you won't see the hardware sensors section; after all, a VM has no real hardware.
|
||||
|
||||
To start Glances on a Linux host, open a terminal session and enter the command **glances**.
|
||||
|
||||
Glances has three main sections—Summary, Process, and Alerts—as well as a sidebar. I'll explore them and other details for using Glances now.
|
||||
|
||||
### Summary section
|
||||
|
||||
In its top few lines, Glances' Summary section contains much of the same information as you'll find in other monitors' summary sections. If you have enough horizontal space in your terminal, Glances can show CPU usage with both a bar graph and a numeric indicator; otherwise it will show only the number.
|
||||
|
||||
I like Glances' Summary section better than the ones in other monitors (like **top**); I think it provides the right information in an easily understandable format.
|
||||
|
||||
![Glances display][5]
|
||||
|
||||
The Glances display on a busy Linux host. In the interest of clarity, not all possible displays are shown in the left sidebar.
|
||||
|
||||
The Summary section above provides an overview of the system's status. The first line shows the hostname, the Linux distribution, the kernel version, and the system uptime.
|
||||
|
||||
The next four lines display CPU, memory usage, swap, and load statistics. The left column displays the percentages of CPU, memory, and swap space that are in use. It also shows the combined statistics for all CPUs present in the system.
|
||||
|
||||
Press the **1** key to toggle between the consolidated CPU usage display and the display of the individual CPUs. The following image shows the Glances display with individual CPU statistics.
|
||||
|
||||
![Glances display][6]
|
||||
|
||||
Glances showing the individual CPU statistics.
|
||||
|
||||
This view includes some additional CPU statistics. In either display mode, the descriptions of the CPU usage fields can help you interpret the data displayed in the CPU section. Notice that CPUs are numbered starting at 0 (Zero).
|
||||
|
||||
**CPU** | This is the current CPU usage as a percentage of the total available.
|
||||
---|---
|
||||
**user** | These are the applications and other programs running in user space, i.e., not in the kernel.
|
||||
**system** | These are kernel-level functions. It does not include CPU time taken by the kernel itself, just the kernel system calls.
|
||||
**idle** | This is the idle time, i.e., time not used by any running process.
|
||||
**nice** | This is the time used by processes that are running at a positive, nice level.
|
||||
**irq** | These are the interrupt requests that take CPU time.
|
||||
**iowait** | These are CPU cycles that are spent waiting for I/O to occur—this is wasted CPU time.
|
||||
**steal** | The percentage of CPU cycles that a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor.
|
||||
**ctx-sw** | These are the number of context switches per second; it represents the number of times per second that the CPU switches from running one process to another.
|
||||
**inter** | This is the number of hardware interrupts per second. A hardware interrupt occurs when a hardware device, such as a hard drive, tells a CPU that it has completed a data transfer or that a network interface card is ready to accept more data.
|
||||
**sw_int** | Software interrupts tell the CPU that some requested task has completed or that the software is ready for something. These tend to be more common in kernel-level software.
|
||||
|
||||
#### About nice numbers
|
||||
|
||||
Nice numbers are the mechanism used by administrators to affect the priority of a process. It is not possible to change the priority of a process directly, but changing the nice number can modify the results of the kernel scheduler’s priority setting algorithm. Nice numbers run from -20 to +19 where higher numbers are nicer. The default nice number is 0 and the default priority is 20. Setting the nice number higher than zero increases the priority number somewhat, thus making the process nicer and therefore less greedy of CPU cycles. Setting the nice number to a more negative number results in a lower priority number making the process less nice. Nice numbers can be changed using the renice command or from within top, atop, and htop.
|
||||
|
||||
#### Memory
|
||||
|
||||
The Memory portion of the Summary section contains statistics about memory usage.
|
||||
|
||||
**MEM** | This shows the memory usage as a percent of the total amount available.
|
||||
---|---
|
||||
**total** | This is the total amount of RAM memory installed in the host, less any amount assigned to the display adapter.
|
||||
**used** | This is the total amount of memory in use by the system and application programs but not including cache or buffers.
|
||||
**free** | This is the amount of free memory.
|
||||
**active** | This is the amount of actively used memory—inactive memory is subject to swapping to disk should the need arise.
|
||||
**inactive** | This is memory that is in use but that has not been accessed for some time.
|
||||
**buffers** | This is memory that is used for buffer space; it is usually used by communications and I/O such as networking. The data is received and stored until the software can retrieve it for use or it can be sent to a storage device or transmitted out to the network.
|
||||
**cached** | This is the memory used to store data for disk transfer until it can be used by a program or stored to disk.
|
||||
|
||||
The Swap section is self-explanatory if you understand a bit about swap space and how it works. This shows how much total swap space is available, how much is used, and how much is left.
|
||||
|
||||
The Load part of the Summary section displays the one-, five-, and 15-minute load averages.
|
||||
|
||||
You can use the numeric keys **1**, **3**, **4**, and **5** to alter your view of the data in this section. The **2** key toggles the left sidebar on and off.
|
||||
|
||||
#### More about load averages
|
||||
|
||||
Load averages are commonly misunderstood, even though they are a key criterion for measuring CPU usage. But what does it really mean when I say that the one- (or five- or 10-) minute load average is 4.04, for example? Load average can be considered a measure of demand for the CPU; it is a number that represents the average number of instructions waiting for CPU time, so it is a true measure of CPU performance.
|
||||
|
||||
For example, a fully utilized single-processor system CPU would have a load average of 1. This means that the CPU is keeping up exactly with demand; in other words, it has perfect utilization. A load average of less than 1 means the CPU is underutilized, and a load average greater than 1 means the CPU is overutilized and that there is pent-up, unsatisfied demand. For example, a load average of 1.5 in a single-CPU system indicates that one-third of the CPU instructions must wait to be executed until the preceding one has completed.
|
||||
|
||||
This is also true for multiple processors. If a four-CPU system has a load average of 4, then it has perfect utilization. If it has a load average of 3.24, for example, then three of its processors are fully utilized, and one is utilized at about 24%. In the example above, a four-CPU system has a one-minute load average of 4.04, meaning there is no remaining capacity among the four CPUs, and a few instructions are forced to wait. A perfectly utilized four-CPU system would show a load average of 4.00, meaning that the system is fully loaded but not overloaded.
|
||||
|
||||
The optimum load average condition is for the load average to equal the total number of CPUs in a system. That would mean that every CPU is fully utilized, and no instruction must be forced to wait. But reality is messy, and optimum conditions are seldom met. If a host were running at 100% utilization, this would not allow for spikes in CPU load requirements.
|
||||
|
||||
The longer-term load averages indicate overall utilization trends.
|
||||
|
||||
_Linux Journal_ published an excellent article [about load averages][7], the theory, the math behind them, and how to interpret them, in its December 1, 2006, issue. Unfortunately, _Linux Journal_ has ceased publication, and its archives are no longer available directly, so the link is to a third-party archive.
|
||||
|
||||
#### Finding CPU hogs
|
||||
|
||||
One of the reasons for using a tool like Glances is to find processes that are taking up too much CPU time. Open a new terminal session (different from the one running Glances), and enter and start the following CPU-hogging Bash program.
|
||||
|
||||
|
||||
```
|
||||
`X=0;while [ 1 ];do echo $X;X=$((X+1));done`
|
||||
```
|
||||
|
||||
This program is a CPU hog and will use up every available CPU cycle. Allow it to run while you finish this article and experiment with Glances. It will provide you with an idea of what a program that hogs CPU cycles looks like. Be sure to observe the effects on the load averages over time, as well as the cumulative time in the **TIME+** column for this process.
|
||||
|
||||
### Process section
|
||||
|
||||
The Process section displays standard information about each process that is running. Depending upon the viewing mode and the size of the terminal screen, different columns of information will be displayed for the running processes. The default mode with a wide-enough terminal displays the columns listed below. The columns that are displayed change automatically if the terminal screen is resized. The following columns are typically displayed for each process from left to right.
|
||||
|
||||
**CPU%** | This is the amount of CPU time as a percentage of a single core. For example, 98% represents 98% of the available CPU cycles for a single core. Multiple processes can show up to 100% CPU usage.
|
||||
---|---
|
||||
**MEM%** | This is the amount of RAM memory used by the process as a percentage of the total virtual memory in the host.
|
||||
**VIRT** | This is the amount of virtual memory used by the process in human-readable format, such as 12M for 12 megabytes.
|
||||
**RES** | This refers to the amount of physical (resident) memory used by the process. Again, this is in human-readable format, with an indicator of **K**, **M**, or **G**, to specify kilobytes, megabytes, or gigabytes.
|
||||
**PID** | Every process has an identification number, called the PID. This number can be used in commands, such as **renice** and **kill**, to manage the process. Remember that the **kill** utility can send signals to another process besides the “kill” signal.
|
||||
**USER** | This is the name of the user that owns the process.
|
||||
**TIME+** | This indicates the cumulative amount of CPU time accrued by the process since it started.
|
||||
**THR** | This is the total number of threads currently running for this process.
|
||||
**NI** | This is the nice number of the process.
|
||||
**S** | This is the current status; it can be (**R**)unning, (**S**)leeping, (**I**)dle, **T** or **t** when the process is stopped during a debugging trace, or (**Z**)ombie. A zombie is a process that has been killed but has not completely died, so it continues to consume some system resources, such as RAM.
|
||||
**R/s and W/s** | These are the disk reads and writes per second.
|
||||
**Command** | This is the command used to start the process.
|
||||
|
||||
Glances usually determines the default sort column automatically. Processes can be sorted automatically (**a**), or by CPU (**c**), memory (**m**), name (**p**), user (**u**), I/O rate (**i**), or time (**t**). Processes are automatically sorted by the most-used resource. In the images above, the **TIME+** column is highlighted.
|
||||
|
||||
### Alerts section
|
||||
|
||||
Glances also shows warnings and critical alerts, including the time and duration of the event, at the bottom of the screen. This can be helpful when you're attempting to diagnose problems and cannot stare at the screen for hours at a time. These alert logs can be toggled on or off with the **l** (lower-case L) key, warnings can be cleared with the **w** key, while alerts and warnings can all be cleared with **x**.
|
||||
|
||||
### Sidebar
|
||||
|
||||
Glances has a very nice sidebar on the left that displays information that is not available in **top** or **htop**. While **atop** displays some of this data, Glances is the only monitor that displays data about sensors. After all, sometimes it is nice to see the temperatures inside your computer.
|
||||
|
||||
The individual modules, disk, filesystem, network, and sensors can be toggled on and off using the **d**, **f**, **n**, and **s** keys, respectively. The entire sidebar can be toggled using **2**. Docker stats can be displayed in the sidebar with **D**.
|
||||
|
||||
Note that hardware sensors are not displayed when Glances is running on a virtual machine.
|
||||
|
||||
### Getting help
|
||||
|
||||
You can get help by pressing the **h** key; dismiss the help page by pressing **h** again. The Help page is rather terse, but it does show the available interactive options and how to turn them on and off. The [man page][8] has terse explanations of the options that can be used when launching Glances.
|
||||
|
||||
You can press **q** or **Esc** to exit Glances.
|
||||
|
||||
### Configuration
|
||||
|
||||
Glances does not require a configuration file to work properly. If you choose to have one, the system-wide instance of the configuration file will be located in **/etc/glances/glances.conf**. Individual users can have a local instance at **~/.config/glances/glances.conf**, which will override the global configuration. The primary purpose of these configuration files is to set thresholds for warnings and critical alerts. You can also specify whether certain modules are displayed by default or not.
|
||||
|
||||
The file **/usr/local/share/doc/glances/README.rst** contains additional useful information, including optional Python modules you can install to support some optional Glances features.
|
||||
|
||||
### Command-line options
|
||||
|
||||
Glances provides command-line options that allow it to start up in specific viewing modes. For example, the command **glances -2** starts the program with the left sidebar disabled.
|
||||
|
||||
### Remote and more
|
||||
|
||||
By starting it in server mode, you can use Glances to monitor remote hosts:
|
||||
|
||||
|
||||
```
|
||||
`[root@testvm1 ~]# glances -s`
|
||||
```
|
||||
|
||||
You can then connect to the server from the client with:
|
||||
|
||||
|
||||
```
|
||||
`[root@testvm2 ~]# glances -c @testvm1`
|
||||
```
|
||||
|
||||
Glances can show a list of Glances servers along with a summary of their activity. It also has a web interface so you can monitor remote Glances servers from a browser. Recent versions of Glances can also display Docker statistics.
|
||||
|
||||
There are also pluggable modules for Glances that provide measurement data not available in the base program.
|
||||
|
||||
### Limitations
|
||||
|
||||
Although Glances can monitor many aspects of a host, it cannot manage processes. It cannot change the nice number of a process nor kill one, as **top** and **htop** can. Glances is not an interactive tool. It is used strictly for monitoring. External tools like **kill** and **renice** can be used to manage processes.
|
||||
|
||||
Glances can only show the processes that are taking the majority of the resource specified, such as CPU time, in the available space. If there is room to list just 10 processes, that is all you will be able to see. Glances does not provide scrolling or reverse-sort options that would enable you to see any other than the top X processes.
|
||||
|
||||
### The impact of measurement
|
||||
|
||||
The [observer effect][9] is a physics theory that states, "simply observing a situation or phenomenon necessarily changes that phenomenon." This is also true when measuring Linux system performance.
|
||||
|
||||
Merely using a monitoring tool alters the system's use of resources, including memory and CPU time. The **top** utility and most other monitors use perhaps 2% tor 3% of a system's CPU time. The Glances utility has much more impact than the others; it usually uses between 10% and 20% of CPU time, and I have seen it use as much as 40% of one CPU in a very large and active system with 32 CPUs. That is a lot, so consider its impact when you think about using Glances as your monitor.
|
||||
|
||||
My personal opinion is that this is a small price to pay when you need the capabilities of Glances.
|
||||
|
||||
### Summary
|
||||
|
||||
Despite its lack of interactive capabilities, such as the ability to **renice** or **kill** processes, and its high CPU load, I find Glances to be a very useful tool. The complete [Glances documentation][10] is available on the internet, and the Glances man page has startup options and interactive command information.
|
||||
|
||||
* * *
|
||||
|
||||
_Parts of this article are based on David Both's new book, _[Using and Administering Linux: Volume 2 – Zero to SysAdmin: Advanced Topics][11].__
|
||||
|
||||
David Both shares his favorite system monitoring tools for understanding what is going on in any...
|
||||
|
||||
David Both explains the importance of keeping hardware cool and shares some Linux tools that can...
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/11/monitoring-linux-glances
|
||||
|
||||
作者:[David Both][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/dboth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_development_programming.png?itok=4OM29-82 (Code going into a computer.)
|
||||
[2]: https://nicolargo.github.io/glances/
|
||||
[3]: https://opensource.com/life/16/2/open-source-tools-system-monitoring
|
||||
[4]: https://github.com/nicolargo/glances/blob/master/README.rst#installation
|
||||
[5]: https://opensource.com/sites/default/files/uploads/glances-figure-1.png (Glances display)
|
||||
[6]: https://opensource.com/sites/default/files/uploads/glances-figure-2.png (Glances display)
|
||||
[7]: https://archive.org/details/Linux-Journal-2006-12/page/n81
|
||||
[8]: https://linux.die.net/man/1/glances
|
||||
[9]: https://en.m.wikipedia.org/wiki/Observer_effect_(physics)
|
||||
[10]: https://glances.readthedocs.io/en/stable/
|
||||
[11]: https://www.apress.com/us/book/9781484250488
|
@ -0,0 +1,85 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Edit images on Fedora easily with GIMP)
|
||||
[#]: via: (https://fedoramagazine.org/edit-images-on-fedora-easily-with-gimp/)
|
||||
[#]: author: (Mehdi Haghgoo https://fedoramagazine.org/author/powergame/)
|
||||
|
||||
在 Fedora 上使用 GIMP 简单地编辑图像
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
GIMP ( GNU Image Manipulation Program 的缩写) 是自由和开源图像处理软件。有很多的功能,从简单地编辑图像,到复杂的滤镜,脚本,甚至是动画,它是一款很好的流行的商业选项的替代品。
|
||||
|
||||
继续阅读来学习如何在 Fedora 上安装和使用 GIMP 。这篇文章涉及基本的日常图像编辑。
|
||||
|
||||
### 安装 GIMP
|
||||
|
||||
GIMP 在官方 Fedora 存储库中可获得。为安装它,运行:
|
||||
|
||||
```
|
||||
sudo dnf install gimp
|
||||
```
|
||||
|
||||
### 单个窗口模式
|
||||
|
||||
在你打开应用程序后,它显示带有工具箱和主编辑区的暗色主题窗口。注意,它有两种窗口模式,你可以通过选择 _窗口_ -> _单个窗口模式_ 在其中切换。通过选中这个选项,用户界面的所有组件将显示在单个窗口中。否则,它们将是分开的。
|
||||
|
||||
### 加载一个图像
|
||||
|
||||
![][2]
|
||||
|
||||
为加载一个图像,转到 _文件_ -> _打开_ ,然后选择你的文件并选择你的图像文件。
|
||||
|
||||
### 重新调整一个图像的大小
|
||||
|
||||
为重新调整图像大小,你有以一对参数为基础的重新调整大小的选项,包括像素和百分比 — 在编辑图像时,这两个参数很方便。
|
||||
|
||||
让我们假使我们需要缩小 Fedora 30 背景图像到它当前大小的75%。为此,选择 _图像_ -> _比例_ ,然后在比例对话框上,选择在单位下拉列表中的百分比。接下来,输入 _75_ 作为宽度或高度,然后按 **Tab** 键。默认情况下,为保持纵横比,其它尺寸将自动地与更改的尺寸对应来重新调整大小。现在,保存其它选项不变,并按比例。
|
||||
|
||||
![][3]
|
||||
|
||||
该图像缩小到其原始尺寸的75%。
|
||||
|
||||
### 旋转图像
|
||||
|
||||
旋转是一种变换操作,因此,你可以从主菜单下的 _图像_ -> _变换_ 的下面找到它,其中有图像旋转90°或180°的选项。在上述选项下也有垂直或水平翻转图像的选项。
|
||||
|
||||
让我们假使我们需要旋转图像90°。在应用一次90°顺时针旋转和水平翻转后,我们的图像将看起来像这样:
|
||||
|
||||
![Transforming an image with GIMP][4]
|
||||
|
||||
### 添加文本
|
||||
|
||||
添加文本非常简单。只需要从工具箱中选择 A 图标,然后,在你的图像上,单击你想要添加文本的位置上一点。如果工具箱不可见,从 窗口->新建工具箱 打开它。
|
||||
|
||||
当你编辑文本时,你可能注意到,文本对话框有字体自定义选项,包括字体系列,字体大小等等。
|
||||
|
||||
![Adding text to image in GIMP][5]
|
||||
|
||||
### 保存和导出
|
||||
|
||||
你可以从 _文件_ -> _保存_ 或通过按 **Ctrl+S** 来保存你的编辑为一个带有 _xcf_ 扩展名的 GIMP 工程。或者,你可以导出你的图像,例如,以 PNG 或 JPEG 格式。为导出,转到 _文件_ -> _导出为_ 或按 **Ctrl+Shift+E** ,接下来,在你面前将产生一个你可以选择输出图像和名称的对话框。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/edit-images-on-fedora-easily-with-gimp/
|
||||
|
||||
作者:[Mehdi Haghgoo][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/powergame/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2019/10/gimp-magazine-816x346.jpg
|
||||
[2]: https://fedoramagazine.org/wp-content/uploads/2019/10/Screenshot-from-2019-10-25-11-00-44-300x165.png
|
||||
[3]: https://fedoramagazine.org/wp-content/uploads/2019/10/Screenshot-from-2019-10-25-11-17-33-300x262.png
|
||||
[4]: https://fedoramagazine.org/wp-content/uploads/2019/10/Screenshot-from-2019-10-25-11-41-28-300x243.png
|
||||
[5]: https://fedoramagazine.org/wp-content/uploads/2019/10/Screenshot-from-2019-10-25-11-47-54-300x237.png
|
||||
|
@ -119,35 +119,34 @@ Python 3.6.8
|
||||
|
||||
保存并退出文件。
|
||||
|
||||
Once the inventory file (/etc/ansible/hosts) is updated then exchange your user’s ssh public keys with remote systems which are part of “labservers” group.
|
||||
更新清单文件(/etc/ansible/hosts)后,将用户的 ssh 公钥与作为 “”组一部分的远程系统交换。
|
||||
更新清单文件(/etc/ansible/hosts)后,将用户的 ssh 公钥与作为 “labservers” 组一部分的远程系统交换。
|
||||
|
||||
Let’s first generate your local user’s public and private key using ssh-keygen command,
|
||||
让我们首先使用 ssh-keygen 命令生成本地用户的公钥和私钥,
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]$ ssh-keygen
|
||||
```
|
||||
|
||||
Now exchange public key between the ansible server and its clients using the following command,
|
||||
现在使用以下命令在 ansible 服务器及其客户端之间交换公钥,
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]$ ssh-copy-id root@linuxtechi
|
||||
[root@linuxtechi ~]$ ssh-copy-id root@linuxtechi
|
||||
```
|
||||
|
||||
Now let’s try couple of Ansible commands, first verify the connectivity from Ansible server to its clients using ping module,
|
||||
现在,让我们尝试几个 Ansible 命令,首先使用 ping 模块验证 Ansible 服务器与客户端的连接,
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]$ ansible -m ping "labservers"
|
||||
```
|
||||
|
||||
**Note:** If we don’t specify the inventory file in above command then it will refer the default hosts file (i.e /etc/ansible/hosts)
|
||||
**注意:** 如果我们没有在上面的命令中指定清单文件,那么它将引用默认主机文件(即 /etc/ansible/hosts)
|
||||
|
||||
Output,
|
||||
输出:
|
||||
|
||||
![ansible-ping-module-centos8][1]
|
||||
|
||||
Let’s check kernel version of each client using Ansible shell command,
|
||||
让我们使用 Ansible shell 命令检查每个客户端的内核版本,
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]$ ansible -m command -a "uname -r" "labservers"
|
||||
@ -158,7 +157,7 @@ Let’s check kernel version of each client using Ansible shell command,
|
||||
[root@linuxtechi ~]$
|
||||
```
|
||||
|
||||
Use the following ansible command to list all hosts from the inventory file,
|
||||
使用以下命令列出清单文件中的所有主机,
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]$ ansible all -i /etc/ansible/hosts --list-hosts
|
||||
@ -170,7 +169,7 @@ Use the following ansible command to list all hosts from the inventory file,
|
||||
[root@linuxtechi ~]$
|
||||
```
|
||||
|
||||
Use the following ansible command to list only hosts from “labservers” group
|
||||
使用以下 ansible 命令仅列出 “labservers” 组中的主机。
|
||||
|
||||
```
|
||||
root@linuxtechi ~]$ ansible labservers -i /etc/ansible/hosts --list-hosts
|
||||
@ -180,7 +179,7 @@ root@linuxtechi ~]$ ansible labservers -i /etc/ansible/hosts --list-hosts
|
||||
[root@linuxtechi ~]$
|
||||
```
|
||||
|
||||
That’s all from this article, we have successfully demonstrated on how to install and use Ansible on CentOS 8 and RHEL 8 System. Please do you share your feedback and comments.
|
||||
本文就是这些了,我们成功演示了如何在 CentOS 8 和 RHEL 8 系统中安装和使用 Ansible。请分享你的反馈和意见。
|
||||
|
||||
* [Facebook][4]
|
||||
* [Twitter][5]
|
||||
@ -195,7 +194,7 @@ via: https://www.linuxtechi.com/install-ansible-centos-8-rhel-8/
|
||||
|
||||
作者:[Pradeep Kumar][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
166
translated/tech/20191127 Displaying dates and times your way.md
Normal file
166
translated/tech/20191127 Displaying dates and times your way.md
Normal file
@ -0,0 +1,166 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Displaying dates and times your way)
|
||||
[#]: via: (https://www.networkworld.com/article/3481602/displaying-dates-and-times-your-way-with-linux.html)
|
||||
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
|
||||
|
||||
按你的方式显示日期和时间
|
||||
======
|
||||
|
||||
> Linux date 命令提供了很多显示日期和时间的选项,要比你想的还要多。这是一些更有用的选择。
|
||||
|
||||
在 Linux 系统上,`date` 命令非常简单。你键入 `date`,日期和时间将以一种有用的方式显示。它包括星期几、日期、时间和时区:
|
||||
|
||||
```
|
||||
$ date
|
||||
Tue 26 Nov 2019 11:45:11 AM EST
|
||||
```
|
||||
|
||||
只要你的系统配置正确,你就会看到日期和当前时间以及时区。
|
||||
|
||||
但是,该命令还提供了许多选项来以不同方式显示日期和时间信息。例如,如果要显示日期以进行排序,则可能需要使用如下命令:
|
||||
|
||||
```
|
||||
$ date "+%Y-%m-%d"
|
||||
2019-11-26
|
||||
```
|
||||
|
||||
在这种情况下,年、月和日按该顺序排列。请注意,我们使用大写字母 `Y` 来获得四位数的年份。如果我们使用小写的 `y`,则只会看到两位数字的年份(例如 19)。不要让这种想法使你联想到,如果 `%m` 给你一个数字月份,`%M` 可能会给你月份的名称。不,`%M` 将给你分钟数。要以缩写名称格式获得月份,你要使用 `%b`,而对于完全拼写的月份,则要使用 `%B`。
|
||||
|
||||
```
|
||||
$ date "+%b %B"
|
||||
Nov November
|
||||
```
|
||||
|
||||
或者,你可能希望以这种常用格式显示日期:
|
||||
|
||||
```
|
||||
$ date +%D
|
||||
11/26/19
|
||||
```
|
||||
|
||||
如果你需要四位数的年份,则可以执行以下操作:
|
||||
|
||||
```
|
||||
$ date "+%x"
|
||||
11/26/2019
|
||||
```
|
||||
|
||||
下面是一个可能有用的示例。假设你需要创建一个每日报告并在文件名中包含日期,则可以使用以下命令来创建文件(可能用在脚本中):
|
||||
|
||||
```
|
||||
$ touch Report-`date "+%Y-%m-%d"`
|
||||
```
|
||||
|
||||
当你列出你的报告时,它们将按日期顺序或反向日期顺序(如果你添加 `-r`)列出。
|
||||
|
||||
```
|
||||
$ ls -r Report*
|
||||
Report-2019-11-26
|
||||
Report-2019-11-25
|
||||
Report-2019-11-22
|
||||
Report-2019-11-21
|
||||
Report-2019-11-20
|
||||
```
|
||||
|
||||
你还可以在日期字符串中添加其他详细信息。可用的各种选项令人惊讶。你可以使用 `date "+%q"` 来显示你所在的一年中的哪个季度,或使用类似以下命令来显示两个月前的日期:
|
||||
|
||||
```
|
||||
$ date --date="2 months ago"
|
||||
Thu 26 Sep 2019 09:02:43 AM EDT
|
||||
```
|
||||
|
||||
是否想知道下周四的日期?你可以使用类似 `date --date="next thu"` 的命令,但是要理解,对于Linux,下个周四意味着今天之后的周四。如果今天是星期三,那就是明天,而不是下周的星期四。但是,你可以像下面的第二个命令一样指定下周的星期四。
|
||||
|
||||
```
|
||||
$ date --date="next thu"
|
||||
Thu 28 Nov 2019 12:00:00 AM EST
|
||||
$ date --date="next week thu"
|
||||
Thu 05 Dec 2019 12:00:00 AM EST
|
||||
```
|
||||
|
||||
`date` 命令的手册页列出了其所有选项。该列表令人难以置信,但是你可能会发现一些日期/时间显示选项非常适合您。以下是一些你可能会发现有趣的东西。
|
||||
|
||||
世界标准时间(UTC):
|
||||
|
||||
```
|
||||
$ date -u
|
||||
Tue 26 Nov 2019 01:13:59 PM UTC
|
||||
```
|
||||
|
||||
自 1970 年 1 月 1 日以来的秒数(与 Linux 系统上日期的存储方式有关):
|
||||
|
||||
```
|
||||
$ date +%s
|
||||
1574774137
|
||||
```
|
||||
|
||||
这是 `date` 命令选项的完整列表。正如我所说,它比我们大多数人想象的要广泛得多。
|
||||
|
||||
- `%%` 字母 %
|
||||
- `%a` 语言环境的缩写星期名称(例如,日 / Sun)
|
||||
- `%A` 语言环境的完整星期名称(例如,星期日 / Sunday)
|
||||
- `%b` 语言环境的缩写月份名称(例如 一 / Jan)
|
||||
- `%B` 语言环境的完整月份名称(例如,一月 / January)
|
||||
- `%c` 语言环境的日期和时间(例如 2005年3月3日 星期四 23:05:25 / Thu Mar 3 23:05:25 2005)
|
||||
- `%C` 世纪;类似于 `%Y`,但省略了后两位数字(例如,20)
|
||||
- `%d` 月份的天(例如,01)
|
||||
- `%D` 日期;与 `%m/%d/%y` 相同
|
||||
- `%e` 月份的天,填充前缀空格;与 `%_d` 相同
|
||||
- `%F` 完整日期;与 `%Y-%m-%d` 相同
|
||||
- `%g` ISO 周号的年份的后两位数字(请参见 `%G`)
|
||||
- `%G` ISO 周号的年份(请参阅 `%V`);通常仅配合 `%V`有用
|
||||
- `%h` 与 `%b` 相同
|
||||
- `%H` 小时(00..23)
|
||||
- `%I` 小时(01..12)
|
||||
- `%j` 一年的天(001..366)
|
||||
- `%k` 小时,填充前缀空格( 0..23);与 `%_H` 相同
|
||||
- `%l` 小时,填充前缀空格( 1..12);与 `%_I` 相同
|
||||
- `%m` 月份(01..12)
|
||||
- `%M` 分钟(00..59)
|
||||
- `%n` 换行符
|
||||
- `%N` 纳秒(000000000..999999999)
|
||||
- `%p` 语言环境中等同于 AM 或 PM 的字符串;如果未知,则为空白
|
||||
- `%P` 像 `%p`,但使用小写
|
||||
- `%q` 季度(1..4)
|
||||
- `%r` 语言环境的 12 小时制时间(例如,晚上 11:11:04 / 11:11:04 PM)
|
||||
- `%R` 24 小时制的小时和分钟;与 `%H:%M` 相同
|
||||
- `%s` 自 1970-01-01 00:00:00 UTC 以来的秒数
|
||||
- `%S` 秒(00..60)
|
||||
- `%t` 制表符
|
||||
- `%T` 时间;与 `%H:%M:%S` 相同
|
||||
- `%u` 星期(1..7);1 是星期一
|
||||
- `%U` 年的周数,以星期日为一周的第一天(00..53)
|
||||
- `%V` ISO 周号,以星期一为一周的第一天(01..53)
|
||||
- `%w` 星期(0..6);0 是星期日
|
||||
- `%W` 年的周数,星期一为一周的第一天(00..53)
|
||||
- `%x` 语言环境的日期表示形式(例如,1999年12月31日 / 12/31/99)
|
||||
- `%X` 语言环境的时间表示形式(例如,23:13:48)
|
||||
- `%y` 年的最后两位数字(00..99)
|
||||
- `%Y` 年
|
||||
- `%z` +hhmm 格式的数字时区(例如,-0400)
|
||||
- `%:z` +hh:mm 格式的数字时区(例如,-04:00)
|
||||
- `%::z` +hh:mm:ss 格式的时区(例如 -04:00:00)
|
||||
- `%:::z` 数字时区,带有 `:` 达到必要的精度(例如 -04,+05:30)
|
||||
- `%Z` 字母时区缩写(例如,EDT)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3481602/displaying-dates-and-times-your-way-with-linux.html
|
||||
|
||||
作者:[Sandra Henry-Stocker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.networkworld.com/newsletters/signup.html
|
||||
[2]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE20773&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
|
||||
[3]: https://www.facebook.com/NetworkWorld/
|
||||
[4]: https://www.linkedin.com/company/network-world
|
Loading…
Reference in New Issue
Block a user