diff options
author | Azamat H. Hackimov <azamat.hackimov@gmail.com> | 2010-10-22 00:31:00 +0600 |
---|---|---|
committer | Azamat H. Hackimov <azamat.hackimov@gmail.com> | 2010-10-22 00:31:00 +0600 |
commit | b82dd0340dab9d29f11002e7fbb50da83dcc55a9 (patch) | |
tree | dd574d9159ef6868f7dce12f3b082333730012a7 /article | |
parent | Fix to build XML files (diff) | |
download | gentoo-doc-translations-b82dd0340dab9d29f11002e7fbb50da83dcc55a9.tar.gz gentoo-doc-translations-b82dd0340dab9d29f11002e7fbb50da83dcc55a9.tar.bz2 gentoo-doc-translations-b82dd0340dab9d29f11002e7fbb50da83dcc55a9.zip |
Articles
Diffstat (limited to 'article')
95 files changed, 62336 insertions, 0 deletions
diff --git a/article/Makefile b/article/Makefile new file mode 100644 index 0000000..feee0e3 --- /dev/null +++ b/article/Makefile @@ -0,0 +1,58 @@ +# (c) 2010 gentoo-doc-ru team +# # https://projects.gentoo.ru/projects/gentoo-doc-ru + +include Makefile.config + +XML := $(foreach dir, $(BASEDIR), $(wildcard $(dir)/*.xml)) + +xml: $(addprefix xml-, $(LANGS)) +$(addprefix xml-, $(LANGS)): $(addprefix po-, $(LANGS)) + +po: $(addprefix po-, $(LANGS)) +$(addprefix po-, $(LANGS)): pot + +pot: $(addprefix $(POTDIR)/, $(addsuffix .pot, $(notdir $(XML)))) + +define xml-lang-template +lang:=$(subst xml-,,$(1)) +$(1): $(addprefix $(XML_OUT)/$(lang)/, $(notdir $(XML)) ) + +$(XML_OUT)/$(lang)/%: $(POTDIR)/$(lang)/%.po + @if [ ! -d $(XML_OUT)/$(lang)/ ]; then \ + mkdir -p $(XML_OUT)/$(lang)/; \ + fi; + $(XML2PO) -p $$? $(BASEDIR)/$$(@F) > $$@ +endef + +$(foreach lang, $(LANGS), $(eval $(call xml-lang-template, xml-$(lang)))) + +define po-lang-template +lang:= $(subst po-,,$(1)) +$(1): $(addprefix $(POTDIR)/$(lang)/, $(addsuffix .po, $(notdir $(XML)))) + +$(POTDIR)/$(lang)/%.po: $(POTDIR)/%.pot + @if [ ! -d $(POTDIR)/$(lang)/ ]; then \ + mkdir -p $(POTDIR)/$(lang)/; \ + fi; + if [ -f $$@ ]; then \ + msgmerge --quiet --backup=none -U $$@ $$?; \ + msgattrib --no-obsolete $$@ --output $$@; \ + touch $$@; \ + else \ + msginit -l $(lang) --no-translator -i $$? -o $$@; \ + fi; +endef + +$(foreach lang, $(LANGS), $(eval $(call po-lang-template, po-$(lang)))) + +$(POTDIR)/%.pot: $(BASEDIR)/% + @if [ ! -d $(POTDIR) ]; then \ + mkdir -p $(POTDIR); \ + fi; + $(XML2PO) -o $@ $? + +help: + @echo "" + @echo " Supported targets: pot po-<LANG> xml xml-<LANG>" + @echo " Substitude LANG with yours. Don't forget edit Makefile.config" + @echo "" diff --git a/article/gettext/afig-ct-ext3-intro.xml.pot b/article/gettext/afig-ct-ext3-intro.xml.pot new file mode 100644 index 0000000..8d22b25 --- /dev/null +++ b/article/gettext/afig-ct-ext3-intro.xml.pot @@ -0,0 +1,209 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(guide:link):4 +msgid "/doc/en/articles/afig-ct-ext3-intro.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):6 +msgid "Advanced Filesystem Implementor's Guide : Introducing ext3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(abstract):20 +msgid "With the 2.4 release of Linux come a host of new filesystem possibilities, including Reiserfs, XFS, GFS, and others. These filesystems sound cool, but what exactly can they do, what are they good at, and exactly how do you go about safely using them in a production Linux environment? Daniel Robbins answers these questions by showing you how to set up these new advanced filesystems under Linux 2.4. In this installment, Daniel takes a look at ext3, a new improved version of ext2 with journaling capabilities." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(version):30 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(date):31 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):34 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):38 +msgid "In the past few installments, we've taken a bit of a detour by looking at non-traditional filesystems such as tmpfs and devfs. Now, it's time to get back to disk-based filesystems, and we do this by taking a look at ext3. The ext3 filesystem, designed by Dr. Stephen Tweedie, is built on the framework of the existing ext2 filesystem; in fact, ext3 is very similar to ext2 except for one small (but important) difference -- it supports journaling. Yet even with this small addition, I think you'll find that that ext3 has several surprising and intriguing capabilities. In this article, I'll give you a good understanding of how ext3 compares to the other journaling filesystems currently available. In my next article, we'll get ext3 up and running." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):56 +msgid "Understanding Ext3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):60 +msgid "So, how does ext3 compare to ReiserFS? In previous articles, I explained how ReiserFS is well suited to handling small files (under 4K), and in certain situations, ReiserFS' small file performance is ten to fifteen times greater than that of ext2 and ext3. However, while ReiserFS has many strengths, it also has weaknesses. In the current implementation of ReiserFS (version 3.6), certain file access patterns can actually result in significantly worse performance than ext2 and ext3, particularly when reading large mail directories. Also, ReiserFS doesn't have a good track record of NFS compatibility and has poor sparse file performance. In contrast, ext3 is a very well-rounded filesystem. It's a lot like ext2; it's not going to give you the blazingly fast small-file performance that ReiserFS gives you, but it's not going to give you any unexpected performance or functionality hiccups either." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):75 +msgid "One of the nice things about ext3 is that because it is based on the ext2 code, ext2 and ext3's on-disk format is identical; this means that a cleanly unmounted ext3 filesystem can be remounted as an ext2 filesystem with absolutely no problems. And that's not all. Thanks to the fact that ext2 and ext3 use identical metadata, it's possible to perform in-place ext2 to ext3 filesystem upgrades. Yes, you read that right. By upgrading a few key system utilities, installing a modern 2.4 kernel and typing in a single tune2fs command per filesystem, you can convert your existing ext2 servers into journaling ext3 systems. You can even do this while your ext2 filesystems are mounted. The transition is safe, reversible, and incredibly easy, and unlike a conversion to XFS, JFS, or ReiserFS, you don't need to back up and recreate your filesystems from scratch. Now, for a moment, consider the thousands of production ext2 servers in existence that are just minutes away from an ext3 upgrade; then, you'll have a good grasp of ext3's importance to the Linux community." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):93 +msgid "If I had to describe ext3 in one word, I'd call it \"comfortable\". It's incredibly easy to ext3-enable an existing ext2 system, and after you do, you're not going to run into any unexpected performance quirks. And there's yet another way that ext3 excels in the comfort department; ext3 happens to be one of the most reliable journaled filesystems available for Linux, as I explain below." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):107 +msgid "Ext3 reliability" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):112 +msgid "In addition to being ext2-compatible, ext3 inherits other benefits by sharing ext2's metadata format. For one, ext3 users gain access to a rock-solid fsck tool. You'll recall that one of the points of using a journaling filesystem is to avoid the need for an exhaustive fsck in the first place; however if you do end up getting corrupt metadata, either from a flaky kernel, bad hard drive, or something else, you'll greatly appreciate the fact that ext3 inherits ext2's fsck. In contrast, ReiserFS' fsck is in its infancy, and fixing flaky metadata when it does show up can be a difficult and dangerous process." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):127 +msgid "Metadata-only journaling" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):130 +msgid "Interestingly, ext3 handles journaling very differently than ReiserFS and other journaling filesystems do. With ReiserFS, XFS, and JFS, the filesystem driver journals metadata, but makes no provisions for journaling data. With metadata-only journaling, your filesystem metadata is going to be rock solid, and you will probably never need to perform an exhaustive fsck. However, unexpected reboots and system lock-ups can result in significant corruption of recently-modified data. Ext3 uses a couple of innovative solutions to avoid these problems, which we'll look at in a bit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):141 +msgid "But first, it's important to understand exactly how metadata-only journaling could end up biting you. As an example, let's say that you were modifying a file called /tmp/myfile.txt when the machine unexpectedly locked up, forcing a reboot. If you were using a metadata-only journaling filesystem such as ReiserFS, XFS or JFS, your filesystem metadata would be easily repaired, thanks to the metadata journal, and you wouldn't need to sit through a laborious fsck." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):150 +msgid "However, there's the distinct possibility that when you load /tmp/myfile.txt into a text editor, your file will not simply be missing recent changes, but will contain a good amount of garbage and may even be completely unreadable. This isn't something that will always happen, but it could happen and often does." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):158 +msgid "Here's why. Typical journaled filesystems like ReiserFS, XFS, and JFS take extra special care of metadata, but don't pay too much attention to data. In our above example, the filesystem driver was in the process of modifying several filesystem blocks. The filesystem driver updated the appropriate metadata, but didn't have time to flush the data from its caches to the new blocks on disk. Thus, when you loaded up /tmp/myfile.txt into a text editor, part or all of the file contained garbage -- blocks of data that didn't get initialized in time before the system locked up." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):175 +msgid "The ext3 approach" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):179 +msgid "Now that we have a good general understanding of this problem, let's look how ext3 implements journaling. In ext3, the journaling code uses a special API called the Journaling Block Device layer, or JBD. The JBD has been designed for the express purpose of implementing a journal on any kind of block device. Ext3 implements its journaling by \"hooking in\" to the JBD API. For example, the ext3 filesystem code will inform the JBD of modifications it is performing, and will also request permission from the JBD before modifying certain data on disk. By doing so, the JBD is given the appropriate opportunities to manage the journal on behalf of the ext3 filesystem driver. It's quite a nice arrangement, and because the JBD is being developed as a separate, generic entity, it could be used to add journaling capabilities to other filesystems in the future." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):194 +msgid "Here are a couple of neat things about the JBD-managed ext3 journal. For one, ext3's journal is stored in an inode -- a file, basically. Depending on how you \"ext3-enable\" your filesystem, you may or may not be able to see this file, located at /.journal. Of course, by storing the journal in an inode, ext3 is able to add the needed journal to the filesystem without requiring incompatible extensions to the ext2 metadata. This is one of the key ways that an ext3 filesystem maintains backwards compatibility with ext2 metadata, and in turn, the ext2 filesystem driver." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):210 +msgid "Different journaling approaches" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):214 +msgid "Not surprisingly, it turns out that there are a number of ways to implement a journal. For example, a filesystem developer could design a journal that stores spans of bytes that need to be modified on the host filesystem. The advantage of this approach is that your journal would be able to store lots of tiny little modifications to the filesystem in a very efficient way, since it would only record the individual bytes that need to be modified and nothing more." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):223 +msgid "JBD takes another, and in some ways better, approach. Rather than recording spans of bytes that must be changed, JBD stores the complete modified filesystem blocks themselves. The ext3 filesystem driver also uses this approach and stores complete replicas of the modified blocks (either 1K, 2K, or 4K) in memory to track pending IO operations. At first, this may seem a bit wasteful. After all, complete blocks contain modified data but may also contain unmodified (already on disk) data as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):233 +msgid "The approach that the JBD uses is called physical journaling, which means that the JBD uses complete physical blocks as the underlying currency for implementing the journal. In contrast, the approach of only storing modified spans of bytes rather than complete blocks is called logical journaling, and is the approach used by XFS. Because ext3 uses physical journaling, an ext3 journal will have a larger relative on-disk footprint than, say, an XFS journal. But because ext3 uses complete blocks internally and in the journal, ext3 doesn't deal with as much complexity as it would if it were to implement logical journaling. In addition, the use of full blocks allows ext3 to perform some additional optimizations, such as \"squishing\" multiple pending IO operations within a single block into the same in-memory data structure. This, in turn, allows ext3 to write these multiple changes to disk in a single write operation, rather than many. In addition, because the literal block data is stored in memory, little or no massaging of the in-memory data is required before writing it to disk, greatly reducing CPU overhead." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):256 +msgid "Ext3, protector of data" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):260 +msgid "And now, we finally get to see how the ext3 filesystem effectively provides both metadata and data journaling, avoiding the data corruption problem I described earlier in this article. In fact, ext3 actually has two methods to ensure data and metadata integrity." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):267 +msgid "Originally, ext3 was designed to perform full data and metadata journaling. In this mode (called \"data=journal\" mode), the JBD journals all changes to the filesystem, whether they are made to data or metadata. Because both data and metadata are journaled, JBD can use the journal to bring both metadata and data back to a consistent state. The drawback of full data journaling is that it can be slow, although you can reduce the performance penalty by setting up a relatively large journal." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):277 +msgid "Recently, a new journaling mode has been added to ext3 that provides the benefits of full journaling but without introducing a severe performance penalty. This new mode works by journaling metadata only. However, the ext3 filesystem driver keeps track of the particular data blocks that correspond with each metadata update, grouping them into a single entity called a transaction. When a transaction is applied to the filesystem proper, the data blocks are written to disk first. Once they are written, the metadata changes are then written to the journal. By using this technique (called \"data=ordered\" mode), ext3 can provide data and metadata consistency, even though only metadata changes are recorded in the journal. ext3 uses this mode by default." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):295 +msgid "Conclusion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):299 +msgid "These days, a lot of people are trying to determine which Linux journaling filesystem is \"best\". In truth, there is no one \"right\" filesystem for every application; each one has its own strengths. This is one of the benefits from having so many next-generation Linux filesystems from which to choose. So, instead of picking an arbitrary \"best\" filesystem and using it for every conceivable application, it's far preferable to understand each filesystem's strengths and weaknesses so that you can make an educated decision as to which one to use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):310 +msgid "Ext3 has a number of strengths. It has been designed to be extremely easy to deploy. It's based on the solid ext2 filesystem code and it inherits a great fsck tool. And ext3's journaling capabilities have been specially designed to ensure the integrity of both metadata and data. All in all, ext3 is a truly great filesystem, and a worthy successor to the now-venerable ext2 filesystem. Join me in my next article, when we get ext3 up and running. Until then, you may want to check out the following resources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):325 +msgid "Resources" +msgstr "" + +#. Let's link to parts 1-6 once they've been GuideXMLified +#. <p> +#. Read Daniel's other articles in this series, where he describes: +#. </p> +#. +#. <ul> +#. <li>The benefits of journaling and ReiserFS (Part 1)</li> +#. <li>Setting up a ReiserFS system (Part 2) </li> +#. <li>Using the tmpfs virtual memory filesystem and bind mounts (Part 3)</li> +#. <li>The benefits of devfs, the device management filesystem (Part 4) </li> +#. <li>Beginning the conversion to devfs (Part 5) </li> +#. <li>Completing the conversion to devfs using an init wrapper (Part 6)</li> +#. </ul> +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):344 +msgid "Read a <uri link=\"http://olstrans.sourceforge.net/release/OLS2000-ext3/OLS2000-ext3.html\">complete transcript</uri> of Dr. Stephen Tweedie's Ext3, Journaling Filesystem presentation, which was featured at the Ottawa Linux Symposium in July 2000." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):352 +msgid "Find out more about using ext3 with 2.4 kernels at Andrew Morton's <uri link=\"http://www.zip.com.au/~akpm/linux/ext3/index.html\">ext3 for 2.4</uri> page. Andrew Morton is the man responsible for porting ext3 to the 2.4 kernel, and provided invaluable assistance in writing this article. If you can't wait until my next article, Andrew has a very nice <uri link=\"http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html\">ext3 and 2.4 usage page</uri> that will show you how to get ext3 up and running on your system in no time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):363 +msgid "To keep abreast of the latest ext3 developments, be sure to visit the <uri link=\"https://listman.redhat.com/archives/ext3-users/\">ext3-users mailing list archive</uri>. Of course, you can also <uri link=\"https://listman.redhat.com/mailman/listinfo/ext3-users\">subscribe</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):370 +msgid "Take Daniel Robbins' free <uri link=\"http://www-128.ibm.com/developerworks/edu/os-dw-linuxjfs-i.html\">JFS fundamentals tutorial</uri> on developerWorks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):376 +msgid "Browse <uri link=\"http://www-130.ibm.com/developerworks/linux/?article=lr\">more Linux resources</uri> on developerWorks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):381 +msgid "Browse <uri link=\"http://www-130.ibm.com/developerworks/opensource/?article=osr\">more Open source resources</uri> on developerWorks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):392 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):396 +msgid "Residing in Albuquerque, New Mexico, Daniel Robbins is the President/CEO of Gentoo Technologies, Inc., the creator of Gentoo Linux, an advanced Linux for the PC, and the Portage system, a next-generation ports system for Linux. He has also served as a contributing author for the Macmillan books Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade, when he was first exposed to the Logo programming language as well as a potentially dangerous dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife, Mary, and their daughter, Hadassah. You can contact Daniel at <mail link=\"drobbins@gentoo.org\">drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/autotools-practices.xml.pot b/article/gettext/autotools-practices.xml.pot new file mode 100644 index 0000000..e27b6c7 --- /dev/null +++ b/article/gettext/autotools-practices.xml.pot @@ -0,0 +1,156 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(guide:link):5 +msgid "/doc/en/articles/autotools-practices.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(title):6 ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(title):25 +msgid "Best practices with autotools" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(mail:link):9 +msgid "flameeyes@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(mail):9 +msgid "Diego Pettenò" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(abstract):12 +msgid "This article covers some of the most common errors people make when using autotools and ways to achieve better results." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(version):21 +msgid "1.0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(date):22 +msgid "2005-12-16" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):29 +msgid "The core of GNU's compile chain -- the set of tools used to build GNU software packages -- is the so-called \"autotools,\" a term that refers to the autoconf and automake programs, as well as libtool, autoheader, pkg-config, and sometimes gettext. These tools let you compile GNU software on a wide variety of platforms and Unix and Unix-like operating systems, providing developers a framework to check for the presence of the libraries, functions, and tools that they want to use. While autotools are great in the hands of an experienced developer, they can be quite a handful for the first-time user, and it's not so rare that packages are shipped with working-but-broken autotools support. This article will cover some of the most common errors people make when using autotools and ways to achieve better results." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):43 +msgid "Regardless of anyone's opinion about them, we currently have no valid alternative for autotools. Projects such as Scons are not as portable as autotools, and they don't embody enough knowledge to be useful yet. We have tons of automatic checks with autotools, and a lot of libraries come with an m4 library with macros to check for their presence." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):51 +msgid "The basic structure of an autotooled project is simple. Autoconf takes help of an <path>aclocal.m4</path> file (created by aclocal using the m4 libraries on its search path and <path>acinclude.m4</path> file) to parse the <path>configure.ac</path> file (formerly <path>configure.in</path>) and transform it into a \"configure\" script. For every directory there should exist an <path>Makefile.am</path>, which automake uses to create Makefile.in templates. The Makefile.in templates are then processed and transformed by the <path>configure</path> script into real Makefiles. You can avoid avoid using automake and just write your own Makefile.in files, but this is quite complex, and you lose a few features of autotools." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):64 +msgid "In a <path>configure.ac</path> file you can use macros you define yourself, the default ones provided by autoconf and aclocal, or external macros provided, for instance, by other packages. In such a case aclocal will create the <path>aclocal.m4</path> file adding the library files it finds on the system's library with the defined macros; this is a critical step to have a working autotooled project, as we'll see in a moment." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):73 +msgid "A <path>Makefile.am</path> is mainly a declaration of intents: you can fill some targets variables with the name of the targets you want to build. These variables are structured in a format like placetoinstall_TYPEOFTARGET. The place is the location in a hierarchical Unix filesystem (bin, lib, include, ...), a non-used keyword that can be defined with an arbitrary path (using the keyworddir variable), or the special keyword noinst that marks the targets that need not to be installed (for example private headers, or static libraries used during build). After naming the target, you can use the name (replacing dots with underscores) as the prefix for the variables that affects its build. In this way you can provide special CFLAGS, LDFLAGS, and LDADD variables used during the build of a single target, instead of changing them for all the targets. You can also use variables collected during configure phase, if you passed them to the AC_SUBST macro in <path>configure.ac</path>, so that they are replaced inside makefiles. Also, though defining CFLAGS and LDFLAGS on a per-target basis seems useful, adding static flags in Makefile.am is a bad thing for portability, as you can't tell if the compiler you're using supports them, or if you really need them (-ldl put in LDFLAGS is a good example of a flag needed on Linux but not on FreeBSD); in such cases you should use <path>configure.ac</path> to add these flags." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):95 +msgid "The most commonly used macros in configure.ac are AC_CHECK_HEADERS, AC_CHECK_FUNCS, and AC_CHECK_LIB, which test for the presence of, respectively, some header files, some library functions, and a given library (with a specific function in it). They are important for portability as they provides a way to check which headers are present and which are not (for example system headers that have different locations in different operating systems), and to check whether a function is present in the system library (asprintf() is missing in OpenBSD for example, while it's present on GNU C library and FreeBSD), and finally to check for the presence of some third-party library or to see if a specific link to a library is needed to get some functions (for example dlopen() function is in libdl library on GNU systems, while it's provided by the system's C library on FreeBSD)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):110 +msgid "Along with testing for the presence or absence of functions or headers (and sometimes libraries) you usually need to change the code's path (for example to avoid the use of missing functions, or to define a drop-in replacement for them). Autoconf is commonly coupled with another tool, autoheader, which creates a <path>config.h.in</path> template, used by configure script to create a <path>config.h</path> header in which are defined a few preprocessor macros in form of HAVE_givenfunction or HAVE_givenheader_H which can be tested with #ifdef/#ifndef directives inside a C or C++ source file to change the code according to the features present." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):122 +msgid "Here are some practices to keep in mind to help you use autotools to create the most portable code possible." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):127 +msgid "<b>The config.h header file should be considered to be an internal header file</b>, so it should be used just by the single package in which it's created. You should avoid editing the <path>config.h.in</path> template to add your own code there, as this requires you to manually update it according to the <path>configure.ac</path> you're writing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):135 +msgid "Unfortunately a few projects, such as Net-SNMP, export this header file with other libraries' headers, which requires any projects that use their libraries to include them (or provide their own copy of the internal Net-SNMP structures). This is a bad thing, as the autotools structure of a library project should be invisible to software using it (which might not use autotools at all). Also, changes in autotools behavior are anything but rare, so you can have two identical checks with different results due to changes in the way they are executed. If you need to define your own wrappers or replacements in case something is not in the environment you're compiling for, you should do that in private headers that do not get installed (declared as noinst_HEADERS in <path>Makefile.am</path> files)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):149 +msgid "<b>Always provide the m4 files you used</b>. As autotools have been in use for years, many packages (for example libraries) that can be reused by other programs provide an m4 library file in <path>/usr/share/aclocal</path> that makes it possible to check for their presence (for example using the -config scripts) with a simple macro call. These files are used by aclocal to create the <path>aclocal.m4</path> file, and they usually are present on the developers' systems where aclocal is executed to create the release, but when they are for optional dependencies, they can be missing on users' systems. While this is usually not a problem, because users rarely executes aclocal, it's a problem for source distributions, such as Gentoo, where sometimes you need to patch a Makefile.am or the <path>configure.ac</path> and then re-run autoconf without having all the optional dependencies installed (or having different versions, which can be incompatible or bugged, of the same m4 file)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):165 +msgid "To avoid this problem, you should create an m4 subdirectory in your package's directory and then put there the m4 library files you are using. You must then call aclocal with aclocal -I m4 options to search in that directory before the system library. You can then choose whether to put that directory under revision control (CVS, SVN, or whatever else you are using) or just create it for the releases. The latter case is the bare minimum requirement for a package. It minimizes the amount of revision-controlled code and ensures that you're always using the latest m4 version, but has the drawback that anyone who checks out your repository won't be able to execute autoconf without having to look on a release tarball to take the m4 from (and that might not work, as you can have updated the configure.ac to suit a newer macro or added more dependencies). On the other hand, putting the m4 directory under revision control sometimes tempts the developers to change the macros to suit their needs. Although this seems logical, as the m4 files are under your revision control, it will upset many package maintainers, as sometimes new versions of m4 files fix bugs or support newer options and installation paths (for example multilib setups), and having the m4 files modified makes it impossible to just replace them with updated versions. It also mean that when you're going to update an m4 file you must redo the modification against the original." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):187 +msgid "m4 files are always a problem to work with. They must replicate almost the same code from library to library (depending on the way you need to provide CFLAGS/LDFLAGS: with tests or with a -config script). To avoid this problem, the GNOME and FreeDesktop projects developed a tool called pkg-config, which provides both an executable binary and an m4 file to include in configure.ac files, and lets developers check for the presence of a given library (and/or package), provided that the package itself installed a pkg-config .pc data file. This approach simplifies the work of maintaining configure.ac scripts, and requires a lot less time to be processed during execution of configure script, as it uses the information provided by the installed package itself instead of just trying if it's present. On the other hand, this approach means that an error the developers make concerning a dependency can break the user program, as they just hardcode the compiler and linker flags in the data file and the configure script doesn't actually check whether the library works. Fortunately, this doesn't happen too often." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):205 +msgid "To create the configure file, you need PKG_CHECK_MODULES, contained in the <path>pkg.m4</path> library. You should add that file to your m4 directory. If pkg-config dependency is mandatory (as the tool is run by the configure script) you can't be sure that the m4 file you are using is the same as one on users' systems, nor you can be sure that it does not include extra bugs, as it can be older than yours." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):214 +msgid "<b>Always check for the libraries you're going to link to</b>, if you have them as mandatory dependencies. Usually autoconf macros or pkg-config data files define prerequisite libraries that you need to successfully link to your library. Also, some functions that are in extra libraries in some systems (like dlopen() in libdl on Linux and Mac OS X) can be in the libc of another system (the same function is in libc on FreeBSD). In these cases you need to check whether the function can be found without linking to anything, or if you need to use a specific library (for example to avoid linking to a non-existent libdl that would fail where it's not needed)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):226 +msgid "<b>Be careful with GNU extensions</b>. One of the things that makes portability a big pain is the use of extension functions, which are provided by GNU libc but aren't present on other C libraries like BSD's or uClibc. When you use such functions, you should always provide a \"drop-in replacement,\" a function that can provide the same functionality as the library function, maybe with less performance or security, which can be used when the extension function is not present on system's C library. Those functions must be protected by a #ifdef HAVE_function ... #endif block, so that they don't get duplicated when they are already present. Make sure that these functions are not exported by the library to the external users; they should be declared inside an internal header, to avoid breaking other libraries that may be doing similar tricks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):240 +msgid "<b>Avoid compiling OS-specific code when not needed</b>. When a program optionally supports specific libraries or specific operating systems, it's not rare to have entire source files that are specific to that code path. To avoid compiling them when they're not needed, use the AM_CONDITIONAL macro inside a configure.ac file. This automake macro (usable only if you're using automake to build the project) allows you to define if .. endif blocks inside a Makefile.am file, inside which you can set special variables. You can, for example, add a \"platformsrcs\" variable that you set to the right source file for the platform to build for, then use in a _SOURCES variable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):252 +msgid "However, there are two common errors developers make when using AM_CONDITIONAL. The first is the use of AM_CONDITIONAL in an already conditional branch (for example under an info or in a case switch), which leads to automake complaining about a conditional defined only conditionally (AM_CONDITIONAL must be called on global scope, out of every if block, so you must define a variable to contain the status of the conditions and then test against when calling the AM_CONDITIONAL). The other one is that you can't change the targets' variables directly, and you must define \"commodity\" variables, whose results empty out of the conditional, to add or remove source files and targets." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):264 +msgid "Many projects, to avoid compiling code for specific code paths, add the entire files in #ifdef ... #endif preprocessor conditionals. While this usually works, it makes the code ugly and error-prone, as a single statement out of the conditional block can be compiled where the source file is not needed. It also misleads users sometimes, as the source files seem to be compiled in situations where they don't make sense." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):273 +msgid "<b>Be smart in looking for operating system or hardware platform</b>. Sometimes you need to search for a specific operating system or hardware platform. The right way to do this depends on where you need to know this. If you must know it to enable extra tests on configure, or you must add extra targets on makefiles, you must do the check in configure.ac. On the other hand, if the difference must be known in a source file, for example to enable an optional asm-coded function, you should rely directly on the compiler/preprocessor, so you should use #ifdef directives with the default macros enabled on the target platform (for example __linux__, __i386__, _ARC_PPC, __sparc__, _FreeBSD_ and __APPLE__)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):286 +msgid "<b>Don't run commands in configure.ac</b>. If you need to check for hardware or operating system in a configure.ac, you should avoid using the uname command, despite this being one of the most common way to do such a test. This is actually an error, as this breaks crosscompilation. Autotools supports crosscompile projects from one machine to another using hosts definitions: strings in the form \"hardware-vendor-os\" (actually, \"hardware-vendor-os-libc\" when GNU libc is used), such as i686-pc-linux-gnu and x86_64-unknown-freebsd5.4. CHOST is the host definition for the system you're compiling the software for, CBUILD is the host definition for the system you're compiling on; when CHOST and CBUILD differ, you're crosscompiling." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):299 +msgid "In the examples above, the first host definition shows an x86-like system, with a pentium2-equivalent (or later) processor, running a Linux kernel with a GNU libc (usually this refers to a GNU/Linux system). The second refers to an AMD64 system with a FreeBSD 5.4 operating system. (For a GNU/kFreeBSD system, which uses FreeBSD kernel and GNU libc, the host definition is hw-unknown-freebsd-gnu, while for a Gentoo/FreeBSD, using FreeBSD's kernel and libc, but with Gentoo framework, the host definition is hw-gentoo-freebsd5.4.) By using $host and $build variables inside a configure.ac script you can enable or disable specific features based on the operating system or on the hardware platform you're compiling to or on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):312 +msgid "<b>Don't abuse \"automagic\" dependencies</b>. One of the most useful features of autotools are the automatic checks for the presence of a library, which are often used to automatically enable support for extra dependencies and such. However, abusing this feature makes the build of a package a bit of a problem. While this is quite useful for first-time users, and although most of the projects having complex dependencies (such as multimedia programs like xine and VLC) use a plugin-based framework that allows them to avoid most of the breakages, \"automagic\" dependencies are a great pain for packagers, especially ones working on source-based distributions such as Gentoo and ports-like frameworks. When you build something with automagical dependencies you enable the functions supported by the libraries found on the system on which the configure script is run. This means that the output binaries might not work on a system that shares the same base packages but misses one extra library, for example. Also, you can't tell the exact dependencies of a package, as some might be optional and not be built when the libraries are not present." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):330 +msgid "To avoid this, autoconf allows you to add --enable/--disable and --with/--without options to configure scripts. With such options you can forcefully enable or disable a specific option (such as the support for an extra library or for a specific feature), and leave the default to automatic tests." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):338 +msgid "Unfortunately, many developers misunderstand the meaning of the two parameters of the functions used to add those options (AC_ARG_ENABLE and AC_ARG_WITH). They represent the code to execute when a parameter is passed and when one is not. Many developers mistakenly think that the two parameters define the code to execute when the feature is enabled and when is disabled. While this usually works when you pass a parameter just to change the default behavior, many source-based distributions pass parameters also to confirm the default behavior, which leads to errors (features explicitly requested missing). Being able to disable optional features if they don't add dependencies (think of OSS audio support on Linux) is always a good thing for users, who can avoid building extra code if they don't plan to use it, and prevents maintainers from doing dirty caching tricks to enable or disable features as their users request." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):354 +msgid "While autotools were a big problem for both developers and maintainers because there are different incompatible versions that do not get along well together (since they install in the same places, with the same names) and which are used in different combinations, the use of autotools saves maintainers from doing all sorts of dirty tricks to compile software. If you look at ebuild from Gentoo's portage, the few that do not use autotools are the more complex ones, as they need to check variables on very different setups (we can or not have NPTL support; we can be on Linux, FreeBSD, or Mac OS X; we can be using GLIBC or another libc; and so on), while autotools usually take care of that on their own. It's also true that many patches applied by maintainers are to fix broken autotools script in upstream sources, but this is just a little problem compared to the chaos of using special build systems that don't work at all with little environmental changes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):370 +msgid "Autotools can be quite tricky for newcomers, but when you start using them on a daily basis you find it's a lot easier than having to deal with manual makefiles or other strange build tools such as imake or qmake, or even worse, special autotools-like build scripts that try to recognize the system they are building on. Autotools makes it simple to support new OSes and new hardware platforms, and saves maintainers and porters from having to learn how to custom-build a system to fix compilation. By carefully writing a script, developers can support new platforms without any changes at all." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/bash-by-example-p1.xml.pot b/article/gettext/bash-by-example-p1.xml.pot new file mode 100644 index 0000000..1cd2697 --- /dev/null +++ b/article/gettext/bash-by-example-p1.xml.pot @@ -0,0 +1,521 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(guide:link):5 +msgid "/doc/en/articles/bash-by-example-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):6 +msgid "Bash by example, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(abstract):12 +msgid "By learning how to program in the bash scripting language, your day-to-day interaction with Linux will become more fun and productive, and you'll be able to build upon those standard UNIX constructs (like pipelines and redirection) that you already know and love. In this three-part series, Daniel Robbins will teach you how to program in bash by example. He'll cover the absolute basics (making this an excellent series for beginners) and bring in more advanced features as the series proceeds." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(version):27 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(date):28 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):31 +msgid "Fundamental programming in the Bourne again shell (bash)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):33 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):36 +msgid "You might wonder why you ought to learn Bash programming. Well, here are a couple of compelling reasons:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):44 +msgid "You're already running it" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):47 +msgid "If you check, you'll probably find that you are running bash right now. Even if you changed your default shell, bash is probably still running somewhere on your system, because it's the standard Linux shell and is used for a variety of purposes. Because bash is already running, any additional bash scripts that you run are inherently memory-efficient because they share memory with any already-running bash processes. Why load a 500K interpreter if you already are running something that will do the job, and do it well?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):60 +msgid "You're already using it" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):63 +msgid "Not only are you already running bash, but you're actually interacting with bash on a daily basis. It's always there, so it makes sense to learn how to use it to its fullest potential. Doing so will make your bash experience more fun and productive. But why should you learn bash programming? Easy, because you already think in terms of running commands, CPing files, and piping and redirecting output. Shouldn't you learn a language that allows you to use and build upon these powerful time-saving constructs you already know how to use? Command shells unlock the potential of a UNIX system, and bash is the Linux shell. It's the high-level glue between you and the machine. Grow in your knowledge of bash, and you'll automatically increase your productivity under Linux and UNIX -- it's that simple." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):80 +msgid "Bash confusion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):83 +msgid "Learning bash the wrong way can be a very confusing process. Many newbies type <c>man bash</c> to view the bash man page, only to be confronted with a very terse and technical description of shell functionality. Others type <c>info bash</c> (to view the GNU info documentation), causing either the man page to be redisplayed, or (if they are lucky) only slightly more friendly info documentation to appear." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):92 +msgid "While this may be somewhat disappointing to novices, the standard bash documentation can't be all things to all people, and caters towards those already familiar with shell programming in general. There's definitely a lot of excellent technical information in the man page, but its helpfulness to beginners is limited." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):100 +msgid "That's where this series comes in. In it, I'll show you how to actually use bash programming constructs, so that you will be able to write your own scripts. Instead of technical descriptions, I'll provide you with explanations in plain English, so that you will know not only what something does, but when you should actually use it. By the end of this three-part series, you'll be able to write your own intricate bash scripts, and be at the level where you can comfortably use bash and supplement your knowledge by reading (and understanding!) the standard bash documentation. Let's begin." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):114 +msgid "Environment variables" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):117 +msgid "Under bash and almost all other shells, the user can define environment variables, which are stored internally as ASCII strings. One of the handiest things about environment variables is that they are a standard part of the UNIX process model. This means that environment variables not only are exclusive to shell scripts, but can be used by standard compiled programs as well. When we \"export\" an environment variable under bash, any subsequent program that we run can read our setting, whether it is a shell script or not. A good example is the <c>vipw</c> command, which normally allows root to edit the system password file. By setting the <c>EDITOR</c> environment variable to the name of your favorite text editor, you can configure vipw to use it instead of vi, a handy thing if you are used to xemacs and really dislike vi." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):131 +msgid "The standard way to define an environment variable under bash is:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):135 +msgid "Defining environment variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):135 +#, no-wrap +msgid "\n$ <i>myvar='This is my environment variable!'</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):139 +msgid "The above command defined an environment variable called \"myvar\" and contains the string \"This is my environment variable!\". There are several things to notice above: first, there is no space on either side of the \"=\" sign; any space will result in an error (try it and see). The second thing to notice is that while we could have done away with the quotes if we were defining a single word, they are necessary when the value of the environment variable is more than a single word (contains spaces or tabs)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(note):149 +msgid "For extremely detailed information on how quotes should be used in bash, you may want to look at the \"QUOTING\" section in the bash man page. The existence of special character sequences that get \"expanded\" (replaced) with other values does complicate how strings are handled in bash. We will just cover the most often-used quoting functionality in this series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):157 +msgid "Thirdly, while we can normally use double quotes instead of single quotes, doing so in the above example would have caused an error. Why? Because using single quotes disables a bash feature called expansion, where special characters and sequences of characters are replaced with values. For example, the \"!\" character is the history expansion character, which bash normally replaces with a previously-typed command. (We won't be covering history expansion in this series of articles, because it is not frequently used in bash programming. For more information on it, see the \"HISTORY EXPANSION\" section in the bash man page.) While this macro-like functionality can come in handy, right now we want a literal exclamation point at the end of our environment variable, rather than a macro." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):171 +msgid "Now, let's take a look at how one actually uses environment variables. Here's an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):176 +msgid "Using environment variables" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):176 +#, no-wrap +msgid "\n$ <i>echo $myvar</i>\nThis is my environment variable!\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):181 +msgid "By preceding the name of our environment variable with a $, we can cause bash to replace it with the value of myvar. In bash terminology, this is called \"variable expansion\". But, what if we try the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):187 +msgid "First try to use variable expansion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):187 +#, no-wrap +msgid "\n$ <i>echo foo$myvarbar</i>\nfoo\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):192 +msgid "We wanted this to echo \"fooThis is my environment variable!bar\", but it didn't work. What went wrong? In a nutshell, bash's variable expansion facility in got confused. It couldn't tell whether we wanted to expand the variable $m, $my, $myvar, $myvarbar, etc. How can we be more explicit and clearly tell bash what variable we are referring to? Try this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):200 +msgid "Proper variable expansion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):200 +#, no-wrap +msgid "\n$ <i>echo foo${myvar}bar</i>\nfooThis is my environment variable!bar\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):205 +msgid "As you can see, we can enclose the environment variable name in curly braces when it is not clearly separated from the surrounding text. While $myvar is faster to type and will work most of the time, ${myvar} can be parsed correctly in almost any situation. Other than that, they both do the same thing, and you will see both forms of variable expansion in the rest of this series. You'll want to remember to use the more explicit curly-brace form when your environment variable is not isolated from the surrounding text by whitespace (spaces or tabs)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):216 +msgid "Recall that we also mentioned that we can \"export\" variables. When we export an environment variable, it's automatically available in the environment of any subsequently-run script or executable. Shell scripts can \"get to\" the environment variable using that shell's built-in environment-variable support, while C programs can use the getenv() function call. Here's some example C code that you should type in and compile -- it'll allow us to understand environment variables from the perspective of C:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):226 +msgid "myvar.c -- a sample environment variable C program" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):226 +#, no-wrap +msgid "\n#include <stdio.h>\n#include <stdlib.h>\n\nint main(void) {\n char *myenvvar=getenv(\"EDITOR\");\n printf(\"The editor environment variable is set to %s\\n\",myenvvar);\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):236 +msgid "Save the above source into a file called <path>myenv.c</path>, and then compile it by issuing the command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):241 +msgid "Compiling the above source" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):241 +#, no-wrap +msgid "\n$ <i>gcc myenv.c -o myenv</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):245 +msgid "Now, there will be an executable program in your directory that, when run, will print the value of the <c>EDITOR</c> environment variable, if any. This is what happens when I run it on my machine:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):251 +msgid "Running the above program" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):251 +#, no-wrap +msgid "\n$ <i>./myenv</i>\nThe editor environment variable is set to (null)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):256 +msgid "Hmmm... because the <c>EDITOR</c> environment variable was not set to anything, the C program gets a null string. Let's try setting it to a specific value:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):261 +msgid "Trying it with a specific value" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):261 +#, no-wrap +msgid "\n$ <i>EDITOR=xemacs</i>\n$ <i>./myenv</i>\nThe editor environment variable is set to (null)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):267 +msgid "While you might have expected myenv to print the value \"xemacs\", it didn't quite work, because we didn't export the <c>EDITOR</c> environment variable. This time, we'll get it working:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):273 +msgid "Same program after exporting variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):273 +#, no-wrap +msgid "\n$ <i>export EDITOR</i>\n$ <i>./myenv</i>\nThe editor environment variable is set to xemacs\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):279 +msgid "So, you have seen with your very own eyes that another process (in this case our example C program) cannot see the environment variable until it is exported. Incidentally, if you want, you can define and export an environment variable using one line, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):286 +msgid "Defining and exporting an environment variable in one command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):286 +#, no-wrap +msgid "\n$ <i>export EDITOR=xemacs</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):290 +msgid "It works identically to the two-line version. This would be a good time to show how to erase an environment variable by using <c>unset</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):295 +msgid "Unsetting the variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):295 +#, no-wrap +msgid "\n$ <i>unset EDITOR</i>\n$ <i>./myenv</i>\nThe editor environment variable is set to (null)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):304 +msgid "Chopping strings overview" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):307 +msgid "Chopping strings -- that is, splitting an original string into smaller, separate chunk(s) -- is one of those tasks that is performed daily by your average shell script. Many times, shell scripts need to take a fully-qualified path, and find the terminating file or directory. While it's possible (and fun!) to code this in bash, the standard <c>basename</c> UNIX executable performs this extremely well:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):316 +msgid "Using basename" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):316 +#, no-wrap +msgid "\n$ <i>basename /usr/local/share/doc/foo/foo.txt</i>\nfoo.txt\n$ <i>basename /usr/home/drobbins</i>\ndrobbins\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):323 +msgid "<c>basename</c> is quite a handy tool for chopping up strings. It's companion, called <c>dirname</c>, returns the \"other\" part of the path that <c>basename</c> throws away:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):329 +msgid "Using dirname" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):329 +#, no-wrap +msgid "\n$ <i>dirname /usr/local/share/doc/foo/foo.txt</i>\n/usr/local/share/doc/foo\n$ <i>dirname /usr/home/drobbins/</i>\n/usr/home\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(note):336 +msgid "Both <c>dirname</c> and <c>basename</c> do not look at any files or directories on disk; they are purely string manipulation commands." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):344 +msgid "Command substitution" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):347 +msgid "One very handy thing to know is how to create an environment variable that contains the result of an executable command. This is very easy to do:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):352 +msgid "Creating an environment variable containing command result" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):352 +#, no-wrap +msgid "\n$ <i>MYDIR=`dirname /usr/local/share/doc/foo/foo.txt`</i>\n$ <i>echo $MYDIR</i>\n/usr/local/share/doc/foo\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):358 +msgid "What we did above is called <e>command substitution</e>. Several things are worth noticing in this example. On the first line, we simply enclosed the command we wanted to execute in back quotes. Those are not standard single quotes, but instead come from the keyboard key that normally sits above the Tab key. We can do exactly the same thing with bash's alternate command substitution syntax:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):366 +msgid "Alternate command substitution syntax" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):366 +#, no-wrap +msgid "\n$ <i>MYDIR=$(dirname /usr/local/share/doc/foo/foo.txt)</i>\n$ <i>echo $MYDIR</i>\n/usr/local/share/doc/foo\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):372 +msgid "As you can see, bash provides multiple ways to perform exactly the same thing. Using command substitution, we can place any command or pipeline of commands in between <e>` `</e> or <e>$( )</e> and assign it to an environment variable. Handy stuff! Here's an example of how to use a pipeline with command substitution:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):380 +msgid "Pipeline command substitution" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):380 +#, no-wrap +msgid "\n$ <i>MYFILES=$(ls /etc | grep pa)</i>\n$ <i>echo $MYFILES</i>\npam.d passwd\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):389 +msgid "Chopping strings like a pro" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):392 +msgid "While <c>basename</c> and <c>dirname</c> are great tools, there are times where we may need to perform more advanced string \"chopping\" operations than just standard pathname manipulations. When we need more punch, we can take advantage of bash's advanced built-in variable expansion functionality. We've already used the standard kind of variable expansion, which looks like this: ${MYVAR}. But bash can also perform some handy string chopping on its own. Take a look at these examples:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):402 +msgid "Examples of strings chopping" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):402 +#, no-wrap +msgid "\n$ <i>MYVAR=foodforthought.jpg</i>\n$ <i>echo ${MYVAR##*fo}</i>\nrthought.jpg\n$ <i>echo ${MYVAR#*fo}</i>\nodforthought.jpg\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):410 +msgid "In the first example, we typed ${MYVAR##*fo}. What exactly does this mean? Basically, inside the ${ }, we typed the name of the environment variable, two ##s, and a wildcard (\"*fo\"). Then, bash took <c>MYVAR</c>, found the longest substring from the beginning of the string \"foodforthought.jpg\" that matched the wildcard \"*fo\", and chopped it off the beginning of the string. That's a bit hard to grasp at first, so to get a feel for how this special \"##\" option works, let's step through how bash completed this expansion. First, it began searching for substrings at the beginning of \"foodforthought.jpg\" that matched the \"*fo\" wildcard. Here are the substrings that it checked:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):422 +msgid "Substrings being checked" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):422 +#, no-wrap +msgid "\nf \nfo MATCHES *fo\nfoo \nfood\nfoodf \nfoodfo MATCHES *fo\nfoodfor\nfoodfort \nfoodforth\nfoodfortho \nfoodforthou\nfoodforthoug\nfoodforthought\nfoodforthought.j\nfoodforthought.jp\nfoodforthought.jpg\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):441 +msgid "After searching the string for matches, you can see that bash found two. It selects the longest match, removes it from the beginning of the original string, and returns the result." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):447 +msgid "The second form of variable expansion shown above appears identical to the first, except it uses only one \"#\" -- and bash performs an almost identical process. It checks the same set of substrings as our first example did, except that bash removes the shortest match from our original string, and returns the result. So, as soon as it checks the \"fo\" substring, it removes \"fo\" from our string and returns \"odforthought.jpg\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):456 +msgid "This may seem extremely cryptic, so I'll show you an easy way to remember this functionality. When searching for the longest match, use ## (because ## is longer than #). When searching for the shortest match, use #. See, not that hard to remember at all! Wait, how do you remember that we are supposed to use the '#' character to remove from the *beginning* of a string? Simple! You will notice that on a US keyboard, shift-4 is \"$\", which is the bash variable expansion character. On the keyboard, immediately to the left of \"$\" is \"#\". So, you can see that \"#\" is \"at the beginning\" of \"$\", and thus (according to our mnemonic), \"#\" removes characters from the beginning of the string. You may wonder how we remove characters from the end of the string. If you guessed that we use the character immediately to the right of \"$\" on the US keyboard (\"%\"), you're right! Here are some quick examples of how to chop off trailing portions of strings:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):472 +#, no-wrap +msgid "\n$ <i>MYFOO=\"chickensoup.tar.gz\"</i>\n$ <i>echo ${MYFOO%%.*}</i>\nchickensoup\n$ <i>echo ${MYFOO%.*}</i>\nchickensoup.tar\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):480 +msgid "As you can see, the % and %% variable expansion options work identically to # and ##, except they remove the matching wildcard from the end of the string. Note that you don't have to use the \"*\" character if you wish to remove a specific substring from the end:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):487 +msgid "Removing substrings from the end" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):487 +#, no-wrap +msgid "\n<i>MYFOOD=\"chickensoup\"</i>\n$ <i>echo ${MYFOOD%%soup}</i>\nchicken\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):493 +msgid "In this example, it doesn't matter whether we use \"%%\" or \"%\", since only one match is possible. And remember, if you forget whether to use \"#\" or \"%\", look at the 3, 4, and 5 keys on your keyboard and figure it out." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):499 +msgid "We can use another form of variable expansion to select a specific substring, based on a specific character offset and length. Try typing in the following lines under bash:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):505 +msgid "Selecting a specific substring" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):505 +#, no-wrap +msgid "\n$ <i>EXCLAIM=cowabunga</i>\n$ <i>echo ${EXCLAIM:0:3}</i>\ncow\n$ <i>echo ${EXCLAIM:3:7}</i>\nabunga\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):513 +msgid "This form of string chopping can come in quite handy; simply specify the character to start from and the length of the substring, all separated by colons." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):522 +msgid "Applying string chopping" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):525 +msgid "Now that we've learned all about chopping strings, let's write a simple little shell script. Our script will accept a single file as an argument, and will print out whether it appears to be a tarball. To determine if it is a tarball, it will look for the pattern \".tar\" at the end of the file. Here it is:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):532 +msgid "mytar.sh -- a sample script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):532 +#, no-wrap +msgid "\n#!/bin/bash\n\nif [ \"${1##*.}\" = \"tar\" ]\nthen\n echo This appears to be a tarball.\nelse\n echo At first glance, this does not appear to be a tarball.\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):543 +msgid "To run this script, enter it into a file called <path>mytar.sh</path>, and type <c>chmod 755 mytar.sh</c> to make it executable. Then, give it a try on a tarball, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):549 +msgid "Trying the script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):549 +#, no-wrap +msgid "\n$ <i>./mytar.sh thisfile.tar</i>\nThis appears to be a tarball.\n$ <i>./mytar.sh thatfile.gz</i>\nAt first glance, this does not appear to be a tarball.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):556 +msgid "OK, it works, but it's not very functional. Before we make it more useful, let's take a look at the \"if\" statement used above. In it, we have a boolean expression. In bash, the \"=\" comparison operator checks for string equality. In bash, all boolean expressions are enclosed in square brackets. But what does the boolean expression actually test for? Let's take a look at the left side. According to what we've learned about string chopping, \"${1##*.}\" will remove the longest match of \"*.\" from the beginning of the string contained in the environment variable \"1\", returning the result. This will cause everything after the last \".\" in the file to be returned. Obviously, if the file ends in \".tar\", we will get \"tar\" as a result, and the condition will be true." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):569 +msgid "You may be wondering what the \"1\" environment variable is in the first place. Very simple -- $1 is the first command-line argument to the script, $2 is the second, etc. OK, now that we've reviewed the function, we can take our first look at \"if\" statements." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):579 +msgid "If statements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):582 +msgid "Like most languages, bash has its own form of conditional. When using them, stick to the format above; that is, keep the \"if\" and the \"then\" on separate lines, and keep the \"else\" and the terminating and required \"fi\" in horizontal alignment with them. This makes the code easier to read and debug. In addition to the \"if,else\" form, there are several other forms of \"if\" statements:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):590 +msgid "Basic form of if statement" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):590 +#, no-wrap +msgid "\nif [ condition ]\nthen\n action\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):597 +msgid "This one performs an action only if condition is true, otherwise it performs no action and continues executing any lines following the \"fi\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):602 +msgid "Checking condition before continuing with commands following fi" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):602 +#, no-wrap +msgid "\nif [ condition ]\nthen \n action\nelif [ condition2 ]\nthen\n action2\n.\n.\n.\nelif [ condition3 ]\nthen\n\nelse\n actionx\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):620 +msgid "The above \"elif\" form will consecutively test each condition and execute the action corresponding to the first true condition. If none of the conditions are true, it will execute the \"else\" action, if one is present, and then continue executing lines following the entire \"if,elif,else\" statement." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):630 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):633 +msgid "Now that we've covered the most basic bash functionality, it's time to pick up the pace and get ready to write some real scripts. In the next article, I'll cover looping constructs, functions, namespace, and other essential topics. Then, we'll be ready to write some more complicated scripts. In the third article, we'll focus almost exclusively on very complex scripts and functions, as well as several bash script design options. See you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):647 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):649 +msgid "Useful links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(li):653 +msgid "Read <uri link=\"http://www.gentoo.org/doc/en/articles/bash-by-example-p2.xml\">Bash by example: Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(li):658 +msgid "Read <uri link=\"http://www.gentoo.org/doc/en/articles/bash-by-example-p3.xml\">Bash by example: Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(li):663 +msgid "Visit <uri link=\"http://www.gnu.org/software/bash/bash.html\">GNU's bash home page</uri>" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/bash-by-example-p2.xml.pot b/article/gettext/bash-by-example-p2.xml.pot new file mode 100644 index 0000000..bbe8dd9 --- /dev/null +++ b/article/gettext/bash-by-example-p2.xml.pot @@ -0,0 +1,486 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(guide:link):5 +msgid "/doc/en/articles/bash-by-example-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):6 +msgid "Bash by example, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(abstract):12 +msgid "In his introductory article on bash, Daniel Robbins walked you through some of the scripting language's basic elements and reasons for using bash. In this, the second installment, Daniel picks up where he left off and looks at bash's basic constructs like conditional (if-then) statements, looping, and more." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(version):24 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(date):25 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):28 +msgid "More bash programming fundamentals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):30 +msgid "Accepting arguments" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):33 +msgid "Let's start with a brief tip on handling command-line arguments, and then look at bash's basic programming constructs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):38 +msgid "In the sample program in the <uri link=\"/doc/en/articles/bash-by-example-p1.xml\">introductory article</uri>, we used the environment variable \"$1\", which referred to the first command-line argument. Similarly, you can use \"$2\", \"$3\", etc. to refer to the second and third arguments passed to your script. Here's an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):46 +msgid "Referring to arguments passed to the script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):46 +#, no-wrap +msgid "\n#!/usr/bin/env bash\n\necho name of script is $0\necho first argument is $1\necho second argument is $2\necho seventeenth argument is $17\necho number of arguments is $#\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):56 +msgid "The example is self explanatory except for two small details. First, \"$0\" will expand to the name of the script, as called from the command line, and \"$#\" will expand to the number of arguments passed to the script. Play around with the above script, passing different kinds of command-line arguments to get the hang of how it works." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):64 +msgid "Sometimes, it's helpful to refer to all command-line arguments at once. For this purpose, bash features the \"$@\" variable, which expands to all command-line parameters separated by spaces. We'll see an example of its use when we take a look at \"for\" loops, a bit later in this article." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):74 +msgid "Bash programming constructs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):77 +msgid "If you've programmed in a procedural language like C, Pascal, Python, or Perl, then you're familiar with standard programming constructs like \"if\" statements, \"for\" loops, and the like. Bash has its own versions of most of these standard constructs. In the next several sections, I will introduce several bash constructs and demonstrate the differences between these constructs and others you are already familiar with from other programming languages. If you haven't programmed much before, don't worry. I include enough information and examples so that you can follow the text." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):91 +msgid "Conditional love" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):94 +msgid "If you've ever programmed any file-related code in C, you know that it requires a significant amount of effort to see if a particular file is newer than another. That's because C doesn't have any built-in syntax for performing such a comparison; instead, two stat() calls and two stat structures must be used to perform the comparison by hand. In contrast, bash has standard file comparison operators built in, so determining if \"<path>/tmp/myfile</path> is readable\" is as easy as checking to see if \"<c>$myvar</c> is greater than 4\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):104 +msgid "The following table lists the most frequently used bash comparison operators. You'll also find an example of how to use every option correctly. The example is meant to be placed immediately after the \"if\". For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):110 +msgid "Bash comparison operator" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):110 +#, no-wrap +msgid "\nif [ -z \"$myvar\" ]\nthen\n echo \"myvar is not defined\"\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):117 +msgid "Sometimes, there are several different ways that a particular comparison can be made. For example, the following two snippets of code function identically:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):122 +msgid "Two ways of making comparison" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):122 +#, no-wrap +msgid "\nif [ \"$myvar\" -eq 3 ]\nthen \n echo \"myvar equals 3\"\nfi\n\nif [ \"$myvar\" = \"3\" ]\nthen\n echo \"myvar equals 3\"\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):134 +msgid "In the above two comparisons do exactly the same thing, but the first uses arithmetic comparison operators, while the second uses string comparison operators." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):143 +msgid "String comparison caveats" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):146 +msgid "Most of the time, while you can omit the use of double quotes surrounding strings and string variables, it's not a good idea. Why? Because your code will work perfectly, unless an environment variable happens to have a space or a tab in it, in which case bash will get confused. Here's an example of a fouled-up comparison:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):154 +msgid "Fouled-up comparison example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):154 +#, no-wrap +msgid "\nif [ $myvar = \"foo bar oni\" ]\nthen\n echo \"yes\"\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):161 +msgid "In the above example, if myvar equals \"foo\", the code will work as expected and not print anything. However, if myvar equals \"foo bar oni\", the code will fail with the following error:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):167 +msgid "Error when variable contains spaces" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):167 +#, no-wrap +msgid "\n[: too many arguments\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):171 +msgid "In this case, the spaces in \"$myvar\" (which equals \"foo bar oni\") end up confusing bash. After bash expands \"$myvar\", it ends up with the following comparison:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):177 +msgid "Ending comparison" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):177 +#, no-wrap +msgid "\n[ foo bar oni = \"foo bar oni\" ]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):181 +msgid "Because the environment variable wasn't placed inside double quotes, bash thinks that you stuffed too many arguments in-between the square brackets. You can easily eliminate this problem by surrounding the string arguments with double-quotes. Remember, if you get into the habit of surrounding all string arguments and environment variables with double-quotes, you'll eliminate many similar programming errors. Here's how the \"foo bar oni\" comparison should have been written:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):191 +msgid "Proper way of comparison writing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):191 +#, no-wrap +msgid "\nif [ \"$myvar\" = \"foo bar oni\" ]\nthen\n echo \"yes\"\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):198 +msgid "The above code will work as expected and will not create any unpleasant surprises." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(note):203 +msgid "If you want your environment variables to be expanded, you must enclose them in double quotes, rather than single quotes. Single quotes disable variable (as well as history) expansion." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):212 +msgid "Looping constructs: \"for\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):215 +msgid "OK, we've covered conditionals, now it's time to explore bash looping constructs. We'll start with the standard \"for\" loop. Here's a basic example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):220 +msgid "Basic for example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):220 +#, no-wrap +msgid "\n#!/usr/bin/env bash\n\nfor x in one two three four\ndo\n echo number $x\ndone\n\n<comment>Output:</comment>\nnumber one\nnumber two \nnumber three \nnumber four\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):235 +msgid "What exactly happened? The \"for x\" part of our \"for\" loop defined a new environment variable (also called a loop control variable) called \"$x\", which was successively set to the values \"one\", \"two\", \"three\", and \"four\". After each assignment, the body of the loop (the code between the \"do\" ... \"done\") was executed once. In the body, we referred to the loop control variable \"$x\" using standard variable expansion syntax, like any other environment variable. Also notice that \"for\" loops always accept some kind of word list after the \"in\" statement. In this case we specified four English words, but the word list can also refer to file(s) on disk or even file wildcards. Look at the following example, which demonstrates how to use standard shell wildcards:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):248 +msgid "Using standard shell wildcards" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):248 +#, no-wrap +msgid "\n#!/usr/bin/env bash\n\nfor myfile in /etc/r*\ndo\n if [ -d \"$myfile\" ] \n then\n echo \"$myfile (dir)\"\n else\n echo \"$myfile\"\n fi\ndone\n\noutput:\n\n/etc/rc.d (dir)\n/etc/resolv.conf\n/etc/resolv.conf~\n/etc/rpc\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):269 +msgid "The above code looped over each file in <path>/etc</path> that began with an \"r\". To do this, bash first took our wildcard /etc/r* and expanded it, replacing it with the string <path>/etc/rc.d</path><path>/etc/resolv.conf</path><path>/etc/resolv.conf~</path><path>/etc/rpc</path> before executing the loop. Once inside the loop, the \"-d\" conditional operator was used to perform two different actions, depending on whether myfile was a directory or not. If it was, a \" (dir)\" was appended to the output line." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):279 +msgid "We can also use multiple wildcards and even environment variables in the word list:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):284 +msgid "Multiple wildcards and environment variables" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):284 +#, no-wrap +msgid "\nfor x in /etc/r??? /var/lo* /home/drobbins/mystuff/* /tmp/${MYPATH}/*\ndo\n cp $x /mnt/mydira\ndone\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):291 +msgid "Bash will perform wildcard and variable expansion in all the right places, and potentially create a very long word list." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):296 +msgid "While all of our wildcard expansion examples have used absolute paths, you can also use relative paths, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):301 +msgid "Using relative paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):301 +#, no-wrap +msgid "\nfor x in ../* mystuff/*\ndo\n echo $x is a silly file\ndone\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):308 +msgid "In the above example, bash performs wildcard expansion relative to the current working directory, just like when you use relative paths on the command line. Play around with wildcard expansion a bit. You'll notice that if you use absolute paths in your wildcard, bash will expand the wildcard to a list of absolute paths. Otherwise, bash will use relative paths in the subsequent word list. If you simply refer to files in the current working directory (for example, if you type <c>for x in *</c>), the resultant list of files will not be prefixed with any path information. Remember that preceding path information can be stripped using the <c>basename</c> executable, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):320 +msgid "Stripping preceding path with basename" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):320 +#, no-wrap +msgid "\nfor x in /var/log/*\ndo\n echo `basename $x` is a file living in /var/log\ndone\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):327 +msgid "Of course, it's often handy to perform loops that operate on a script's command-line arguments. Here's an example of how to use the \"$@\" variable, introduced at the beginning of this article:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):333 +msgid "Example use of $@ variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):333 +#, no-wrap +msgid "\n#!/usr/bin/env bash\n\nfor thing in \"$@\"\ndo\n echo you typed ${thing}.\ndone\n\n<comment>output:</comment>\n\n$ allargs hello there you silly\nyou typed hello.\nyou typed there.\nyou typed you.\nyou typed silly.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):353 +msgid "Shell arithmetic" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):356 +msgid "Before looking at a second type of looping construct, it's a good idea to become familiar with performing shell arithmetic. Yes, it's true: You can perform simple integer math using shell constructs. Simply enclose the particular arithmetic expression between a \"$((\" and a \"))\", and bash will evaluate the expression. Here are some examples:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):364 +msgid "Counting in bash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):364 +#, no-wrap +msgid "\n$ <i>echo $(( 100 / 3 ))</i>\n33\n$ <i>myvar=\"56\"</i>\n$ <i>echo $(( $myvar + 12 ))</i>\n68\n$ <i>echo $(( $myvar - $myvar ))</i>\n0\n$ <i>myvar=$(( $myvar + 1 ))</i>\n$ <i>echo $myvar</i>\n57\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):377 +msgid "Now that you're familiar performing mathematical operations, it's time to introduce two other bash looping constructs, \"while\" and \"until\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):385 +msgid "More looping constructs: \"while\" and \"until\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):388 +msgid "A \"while\" statement will execute as long as a particular condition is true, and has the following format:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):393 +msgid "While statement template" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):393 +#, no-wrap +msgid "\nwhile [ condition ]\ndo\n statements\ndone\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):400 +msgid "\"While\" statements are typically used to loop a certain number of times, as in the following example, which will loop exactly 10 times:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):405 +msgid "Looping the statement 10 times" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):405 +#, no-wrap +msgid "\nmyvar=0\nwhile [ $myvar -ne 10 ]\ndo\n echo $myvar\n myvar=$(( $myvar + 1 ))\ndone\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):414 +msgid "You can see the use of arithmetic expansion to eventually cause the condition to be false, and the loop to terminate." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):419 +msgid "\"Until\" statements provide the inverse functionality of \"while\" statements: They repeat as long as a particular condition is false. Here's an \"until\" loop that functions identically to the previous \"while\" loop:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):425 +msgid "Until loop example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):425 +#, no-wrap +msgid "\nmyvar=0\nuntil [ $myvar -eq 10 ]\ndo\n echo $myvar\n myvar=$(( $myvar + 1 ))\ndone\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):437 +msgid "Case statements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):440 +msgid "\"Case\" statements are another conditional construct that comes in handy. Here's an example snippet:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):445 +msgid "Example case statement snippet" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):445 +#, no-wrap +msgid "\ncase \"${x##*.}\" in\n gz)\n gzunpack ${SROOT}/${x}\n ;;\n bz2)\n bz2unpack ${SROOT}/${x}\n ;;\n *)\n echo \"Archive format not recognized.\"\n exit\n ;;\nesac\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):460 +msgid "Above, bash first expands \"${x##*.}\". In the code, \"$x\" is the name of a file, and \"${x##*.}\" has the effect of stripping all text except that following the last period in the filename. Then, bash compares the resultant string against the values listed to the left of the \")\"s. In this case, \"${x##*.}\" gets compared against \"gz\", then \"bz2\" and finally \"*\". If \"${x##*.}\" matches any of these strings or patterns, the lines immediately following the \")\" are executed, up until the \";;\", at which point bash continues executing lines after the terminating \"esac\". If no patterns or strings are matched, no lines of code are executed; however, in this particular code snippet, at least one block of code will execute, because the \"*\" pattern will catch everything that didn't match \"gz\" or \"bz2\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):477 +msgid "Functions and namespaces" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):480 +msgid "In bash, you can even define functions, similar to those in other procedural languages like Pascal and C. In bash, functions can even accept arguments, using a system very similar to the way scripts accept command-line arguments. Let's take a look at a sample function definition and then proceed from there:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):487 +msgid "Sample function definition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):487 +#, no-wrap +msgid "\ntarview() {\n echo -n \"Displaying contents of $1 \"\n if [ ${1##*.} = tar ]\n then\n echo \"(uncompressed tar)\"\n tar tvf $1\n elif [ ${1##*.} = gz ]\n then\n echo \"(gzip-compressed tar)\"\n tar tzvf $1\n elif [ ${1##*.} = bz2 ]\n then\n echo \"(bzip2-compressed tar)\"\n cat $1 | bzip2 -d | tar tvf -\n fi\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(note):506 +msgid "Another case: The above code could have been written using a \"case\" statement. Can you figure out how?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):511 +msgid "Above, we define a function called \"tarview\" that accepts one argument, a tarball of some kind. When the function is executed, it identifies what type of tarball the argument is (either uncompressed, gzip-compressed, or bzip2-compressed), prints out a one-line informative message, and then displays the contents of the tarball. This is how the above function should be called (whether from a script or from the command line, after it has been typed in, pasted in, or sourced):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):521 +msgid "Calling the above function" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):521 +#, no-wrap +msgid "\n$ <i>tarview shorten.tar.gz</i>\nDisplaying contents of shorten.tar.gz (gzip-compressed tar)\ndrwxr-xr-x ajr/abbot 0 1999-02-27 16:17 shorten-2.3a/\n-rw-r--r-- ajr/abbot 1143 1997-09-04 04:06 shorten-2.3a/Makefile\n-rw-r--r-- ajr/abbot 1199 1996-02-04 12:24 shorten-2.3a/INSTALL\n-rw-r--r-- ajr/abbot 839 1996-05-29 00:19 shorten-2.3a/LICENSE\n....\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):531 +msgid "As you can see, arguments can be referenced inside the function definition by using the same mechanism used to reference command-line arguments. In addition, the \"$#\" macro will be expanded to contain the number of arguments. The only thing that may not work completely as expected is the variable \"$0\", which will either expand to the string \"bash\" (if you run the function from the shell, interactively) or to the name of the script the function is called from." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(note):540 +msgid "Use'em interactively: Don't forget that functions, like the one above, can be placed in your ~/.bashrc or ~/.bash_profile so that they are available for use whenever you are in bash." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):549 +msgid "Namespace" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):552 +msgid "Often, you'll need to create environment variables inside a function. While possible, there's a technicality you should know about. In most compiled languages (such as C), when you create a variable inside a function, it's placed in a separate local namespace. So, if you define a function in C called myfunction, and in it define a variable called \"x\", any global (outside the function) variable called \"x\" will not be affected by it, eliminating side effects." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):562 +msgid "While true in C, this isn't true in bash. In bash, whenever you create an environment variable inside a function, it's added to the global namespace. This means that it will overwrite any global variable outside the function, and will continue to exist even after the function exits:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):569 +msgid "Variable handling in bash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):569 +#, no-wrap +msgid "\n#!/usr/bin/env bash\n\nmyvar=\"hello\"\n\nmyfunc() {\n\n myvar=\"one two three\"\n for x in $myvar\n do\n echo $x\n done\n}\n\nmyfunc\n\necho $myvar $x\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):588 +msgid "When this script is run, it produces the output \"one two three three\", showing how \"$myvar\" defined in the function clobbered the global variable \"$myvar\", and how the loop control variable \"$x\" continued to exist even after the function exited (and also would have clobbered any global \"$x\", if one were defined)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):595 +msgid "In this simple example, the bug is easy to spot and to compensate for by using alternate variable names. However, this isn't the right approach; the best way to solve this problem is to prevent the possibility of clobbering global variables in the first place, by using the \"local\" command. When we use \"local\" to create variables inside a function, they will be kept in the local namespace and not clobber any global variables. Here's how to implement the above code so that no global variables are overwritten:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):605 +msgid "Assuring no global variables will be overwritten" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):605 +#, no-wrap +msgid "\n#!/usr/bin/env bash\n\nmyvar=\"hello\"\n\nmyfunc() {\n local x\n local myvar=\"one two three\"\n for x in $myvar\n do\n echo $x\n done\n}\n\nmyfunc\n\necho $myvar $x\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):624 +msgid "This function will produce the output \"hello\" -- the global \"$myvar\" doesn't get overwritten, and \"$x\" doesn't continue to exist outside of myfunc. In the first line of the function, we create x, a local variable that is used later, while in the second example (local myvar=\"one two three\"\") we create a local myvar and assign it a value. The first form is handy for keeping loop control variables local, since we're not allowed to say \"for local x in $myvar\". This function doesn't clobber any global variables, and you are encouraged to design all your functions this way. The only time you should not use \"local\" is when you explicitly want to modify a global variable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):639 +msgid "Wrapping it up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):642 +msgid "Now that we've covered the most essential bash functionality, it's time to look at how to develop an entire application based in bash. In my next installment, we'll do just that. See you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):653 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):655 +msgid "Useful links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(li):659 +msgid "Read <uri link=\"/doc/en/articles/bash-by-example-p1.xml\"> Bash by example: Part 1</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(li):663 +msgid "Read <uri link=\"/doc/en/articles/bash-by-example-p3.xml\">Bash by example: Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(li):668 +msgid "Visit <uri link=\"http://www.gnu.org/software/bash/bash.html\">GNU's bash home page</uri>" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/bash-by-example-p3.xml.pot b/article/gettext/bash-by-example-p3.xml.pot new file mode 100644 index 0000000..73d0d4f --- /dev/null +++ b/article/gettext/bash-by-example-p3.xml.pot @@ -0,0 +1,478 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(guide:link):5 +msgid "/doc/en/articles/bash-by-example-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):6 +msgid "Bash by example, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(abstract):12 +msgid "In his final Bash by example article, Daniel Robbins takes a good look at the Gentoo Linux ebuild system, an excellent example of the power of bash. Step by step, he shows you how the ebuild system was implemented, and touches on many handy bash techniques and design strategies. By the end of the article, you'll have a good grasp of what's involved in producing a full-blown bash-based application, as well as a start at coding your own auto-build system." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(version):26 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(date):27 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):30 +msgid "Exploring the ebuild system" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):32 +msgid "Enter the ebuild system" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):35 +msgid "I've really been looking forward to this third and final <e>Bash by example</e> article, because now that we've already covered bash programming fundamentals in <uri link=\"/doc/en/articles/bash-by-example-p1.xml\">Part 1</uri> and <uri link=\"/doc/en/articles/bash-by-example-p2.xml\">Part 2</uri>, we can focus on more advanced topics, like bash application development and program design. For this article, I will give you a good dose of practical, real-world bash development experience by presenting a project that I've spent many hours coding and refining: The Gentoo Linux ebuild system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):46 +msgid "I'm the chief architect of Gentoo Linux, a next-generation Linux OS currently in beta. One of my primary responsibilities is to make sure that all of the binary packages (similar to RPM packages) are created properly and work together. As you probably know, a standard Linux system is not composed of a single unified source tree (like BSD), but is actually made up of about 25+ core packages that work together. Some of the packages include:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(th):57 +msgid "Package" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(th):58 +msgid "Description" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):61 +msgid "linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):62 +msgid "The actual kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):65 +msgid "util-linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):66 +msgid "A collection of miscellaneous Linux-related programs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):69 +msgid "e2fsprogs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):70 +msgid "A collection of ext2 filesystem-related utilities" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):73 +msgid "glibc" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):74 +msgid "The GNU C library" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):78 +msgid "Each package is in its own tarball and is maintained by separate independent developers, or teams of developers. To create a distribution, each package has to be separately downloaded, compiled, and packaged. Every time a package must be fixed, upgraded, or improved, the compilation and packaging steps must be repeated (and this gets old really fast). To help eliminate the repetitive steps involved in creating and updating packages, I created the ebuild system, written almost entirely in bash. To enhance your bash knowledge, I'll show you how I implemented the unpack and compile portions of the ebuild system, step by step. As I explain each step, I'll also discuss why certain design decisions were made. By the end of this article, not only will you have an excellent grasp of larger-scale bash programming projects, but you'll also have implemented a good portion of a complete auto-build system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):96 +msgid "Why bash?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):99 +msgid "Bash is an essential component of the Gentoo Linux ebuild system. It was chosen as ebuild's primary language for a number of reasons. First, it has an uncomplicated and familiar syntax that is especially well suited for calling external programs. An auto-build system is \"glue code\" that automates the calling of external programs, and bash is very well suited to this type of application. Second, Bash's support for functions allowed the ebuild system to have modular, easy-to-understand code. Third, the ebuild system takes advantage of bash's support for environment variables, allowing package maintainers and developers to configure it easily, on-the-fly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):114 +msgid "Build process review" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):117 +msgid "Before we look at the ebuild system, let's review what's involved in getting a package compiled and installed. For our example, we will look at the \"sed\" package, a standard GNU text stream editing utility that is part of all Linux distributions. First, download the source tarball (<path>sed-3.02.tar.gz</path>) (see <uri link=\"#resources\">Resources</uri>). We will store this archive in <path>/usr/src/distfiles</path>, a directory we will refer to using the environment variable <c>$DISTDIR</c>. <c>$DISTDIR</c> is the directory where all of our original source tarballs live; it's a big vault of source code." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):128 +msgid "Our next step is to create a temporary directory called <path>work</path>, which houses the uncompressed sources. We'll refer to this directory later using the <c>$WORKDIR</c> environment variable. To do this, change to a directory where we have write permission and type the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):135 ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):148 +msgid "Uncompressing sed into a temporary directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):135 +#, no-wrap +msgid "\n$ <i>mkdir work</i>\n$ <i>cd work</i>\n$ <i>tar xzf /usr/src/distfiles/sed-3.02.tar.gz</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):141 +msgid "The tarball is then decompressed, creating a directory called <path>sed-3.02</path> that contains all of the sources. We'll refer to the <path>sed-3.02</path> directory later using the environment variable <c>$SRCDIR</c>. To compile the program, type the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):148 +#, no-wrap +msgid "\n$ <i>cd sed-3.02</i>\n$ <i>./configure --prefix=/usr</i>\n<comment>(autoconf generates appropriate makefiles, this can take a while)</comment>\n\n$ <i>make</i>\n\n<comment>(the package is compiled from sources, also takes a bit of time)</comment>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):158 +msgid "We're going to skip the \"make install\" step, since we are just covering the unpack and compile steps in this article. If we wanted to write a bash script to perform all these steps for us, it could look something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):164 +msgid "Sample bash script to perform the unpack/compile process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):164 +#, no-wrap +msgid "\n#!/usr/bin/env bash\n\nif [ -d work ]\nthen\n<comment># remove old work directory if it exists</comment>\n rm -rf work\nfi\nmkdir work\ncd work\ntar xzf /usr/src/distfiles/sed-3.02.tar.gz\ncd sed-3.02\n./configure --prefix=/usr\nmake\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):183 +msgid "Generalizing the code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):186 +msgid "Although this autocompile script works, it's not very flexible. Basically, the bash script just contains the listing of all the commands that were typed at the command line. While this solution works, it would be nice to make a generic script that can be configured quickly to unpack and compile any package just by changing a few lines. That way, it's much less work for the package maintainer to add new packages to the distribution. Let's take a first stab at doing this by using lots of different environment variables, making our build script more generic:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):197 +msgid "A new, more general script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):197 +#, no-wrap +msgid "\n#!/usr/bin/env bash\n\n<comment># P is the package name</comment>\n\nP=sed-3.02\n\n<comment># A is the archive name</comment>\n\nA=${P}.tar.gz\n\nexport ORIGDIR=`pwd`\nexport WORKDIR=${ORIGDIR}/work\nexport SRCDIR=${WORKDIR}/${P}\n\nif [ -z \"$DISTDIR\" ]\nthen\n<comment># set DISTDIR to /usr/src/distfiles if not already set</comment>\n DISTDIR=/usr/src/distfiles\nfi\nexport DISTDIR\n\nif [ -d ${WORKDIR} ]\nthen \n<comment># remove old work directory if it exists</comment>\n rm -rf ${WORKDIR}\nfi\n\nmkdir ${WORKDIR}\ncd ${WORKDIR}\ntar xzf ${DISTDIR}/${A}\ncd ${SRCDIR}\n./configure --prefix=/usr\nmake\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):233 +msgid "We've added a lot of environment variables to the code, but it still does basically the same thing. However, now, to compile any standard GNU autoconf-based source tarball, we can simply copy this file to a new file (with an appropriate name to reflect the name of the new package it compiles), and then change the values of <c>$A</c> and <c>$P</c> to new values. All other environment variables automatically adjust to the correct settings, and the script works as expected. While this is handy, there's a further improvement that can be made to the code. This particular code is much longer than the original \"transcript\" script that we created. Since one of the goals for any programming project should be the reduction of complexity for the user, it would be nice to dramatically shrink the code, or at least organize it better. We can do this by performing a neat trick -- we'll split the code into two separate files. Save this file as <path>sed-3.02.ebuild</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):249 +msgid "sed-3.02.ebuild" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):249 +#, no-wrap +msgid "\n<comment>#the sed ebuild file -- very simple!</comment>\nP=sed-3.02\nA=${P}.tar.gz\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):255 +msgid "Our first file is trivial, and contains only those environment variables that must be configured on a per-package basis. Here's the second file, which contains the brains of the operation. Save this one as \"ebuild\" and make it executable:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):262 +msgid "The ebuild script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):262 +#, no-wrap +msgid "\n#!/usr/bin/env bash\n\n\nif [ $# -ne 1 ]\nthen\n echo \"one argument expected.\"\n exit 1\nfi\n\nif [ -e \"$1\" ]\nthen\n source $1\nelse\n echo \"ebuild file $1 not found.\"\n exit 1\nfi\n\nexport ORIGDIR=`pwd`\nexport WORKDIR=${ORIGDIR}/work\nexport SRCDIR=${WORKDIR}/${P}\n\nif [ -z \"$DISTDIR\" ]\nthen\n <comment># set DISTDIR to /usr/src/distfiles if not already set</comment>\n DISTDIR=/usr/src/distfiles\nfi\nexport DISTDIR\n\nif [ -d ${WORKDIR} ]\nthen \n # remove old work directory if it exists \n rm -rf ${WORKDIR}\nfi\n\nmkdir ${WORKDIR}\ncd ${WORKDIR}\ntar xzf ${DISTDIR}/${A}\ncd ${SRCDIR}\n./configure --prefix=/usr\nmake\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):305 +msgid "Now that we've split our build system into two files, I bet you're wondering how it works. Basically, to compile sed, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):310 +msgid "Testing the above ebuild" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):310 +#, no-wrap +msgid "\n$ <i>./ebuild sed-3.02.ebuild</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):314 +msgid "When \"ebuild\" executes, it first tries to \"source\" variable <c>$1</c>. What does this mean? From my previous article, recall that <c>$1</c> is the first command line argument -- in this case, <path>sed-3.02.ebuild</path>. In bash, the \"source\" command reads in bash statements from a file, and executes them as if they appeared immediately in the file the \"source\" command is in. So, \"source ${1}\" causes the \"ebuild\" script to execute the commands in <path>sed-3.02.ebuild</path>, which cause <c>$P</c> and <c>$A</c> to be defined. This design change is really handy, because if we want to compile another program instead of sed, we can simply create a new <path>.ebuild</path> file and pass it as an argument to our \"ebuild\" script. That way, the <path>.ebuild</path> files end up being really simple, while the complicated brains of the ebuild system get stored in one place -- our \"ebuild\" script. This way, we can upgrade or enhance the ebuild system simply by editing the \"ebuild\" script, keeping the implementation details outside of the ebuild files. Here's a sample ebuild file for <c>gzip</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):332 +msgid "gzip-1.2.4a.ebuild" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):332 +#, no-wrap +msgid "\n<comment>#another really simple ebuild script!</comment>\nP=gzip-1.2.4a\nA=${P}.tar.gz\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):341 +msgid "Adding functionality" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):344 +msgid "OK, we're making some progress. But, there is some additional functionality I'd like to add. I'd like the ebuild script to accept a second command-line argument, which will be <c>compile</c>, <c>unpack</c>, or <c>all</c>. This second command-line argument tells the ebuild script which particular step of the build process to perform. That way, I can tell ebuild to unpack the archive, but not compile it (just in case I need to inspect the source archive before compilation begins). To do this, I'll add a case statement that will test variable <c>$2</c>, and do different things based on its value. Here's what the code looks like now:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):356 +msgid "ebuild, revision 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):356 +#, no-wrap +msgid "\n#!/usr/bin/env bash\n\nif [ $# -ne 2 ]\nthen\n echo \"Please specify two args - .ebuild file and unpack, compile or all\"\n exit 1\nfi\n\n\nif [ -z \"$DISTDIR\" ]\nthen\n<comment> # set DISTDIR to /usr/src/distfiles if not already set</comment>\n DISTDIR=/usr/src/distfiles\nfi\nexport DISTDIR\n\nebuild_unpack() {\n <comment> #make sure we're in the right directory</comment>\n cd ${ORIGDIR}\n \n if [ -d ${WORKDIR} ]\n then \n rm -rf ${WORKDIR}\n fi\n\n mkdir ${WORKDIR}\n cd ${WORKDIR}\n if [ ! -e ${DISTDIR}/${A} ]\n then\n echo \"${DISTDIR}/${A} does not exist. Please download first.\"\n exit 1\n fi \n tar xzf ${DISTDIR}/${A}\n echo \"Unpacked ${DISTDIR}/${A}.\"\n #source is now correctly unpacked\n}\n\n\nebuild_compile() {\n \n <comment> #make sure we're in the right directory</comment>\n cd ${SRCDIR}\n if [ ! -d \"${SRCDIR}\" ]\n then\n echo \"${SRCDIR} does not exist -- please unpack first.\"\n exit 1\n fi\n ./configure --prefix=/usr\n make \n}\n\nexport ORIGDIR=`pwd`\nexport WORKDIR=${ORIGDIR}/work\n\nif [ -e \"$1\" ]\nthen\n source $1\nelse\n echo \"Ebuild file $1 not found.\"\n exit 1\nfi\n\nexport SRCDIR=${WORKDIR}/${P}\n\ncase \"${2}\" in\n unpack)\n ebuild_unpack\n ;;\n compile)\n ebuild_compile\n ;;\n all)\n ebuild_unpack\n ebuild_compile\n ;;\n *)\n echo \"Please specify unpack, compile or all as the second arg\"\n exit 1\n ;;\nesac\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):439 +msgid "We've made a lot of changes, so let's review them. First, we placed the compile and unpack steps in their own functions, and called <c>ebuild_compile()</c> and <c>ebuild_unpack()</c>, respectively. This is a good move, since the code is getting more complicated, and the new functions provide some modularity, which helps to keep things organized. On the first line in each function, I explicitly <c>cd</c> into the directory I want to be in because, as our code is becoming more modular rather than linear, it's more likely that we might slip up and execute a function in the wrong current working directory. The <c>cd</c> commands explicitly put us in the right place, and prevent us from making a mistake later -- an important step -- especially if you will be deleting files inside the functions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):453 +msgid "Also, I added a useful check to the beginning of the <c>ebuild_compile()</c> function. Now, it checks to make sure the <c>$SRCDIR</c> exists, and, if not, it prints an error message telling the user to unpack the archive first, and then exits. If you like, you can change this behavior so that if <c>$SRCDIR</c> doesn't exist, our ebuild script will unpack the source archive automatically. You can do this by replacing <c>ebuild_compile()</c> with the following code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):462 +msgid "A new spin on ebuild_compile()" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):462 +#, no-wrap +msgid "\nebuild_compile() {\n <comment>#make sure we're in the right directory</comment>\n if [ ! -d \"${SRCDIR}\" ]\n then\n ebuild_unpack\n fi\n cd ${SRCDIR}\n ./configure --prefix=/usr\n make \n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):475 +msgid "One of the most obvious changes in our second version of the ebuild script is the new case statement at the end of the code. This case statement simply checks the second command-line argument, and performs the correct action, depending on its value. If we now type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):482 +msgid "Default action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):482 +#, no-wrap +msgid "\n$ <i>ebuild sed-3.02.ebuild</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):486 +msgid "We'll actually get an error message. ebuild now wants to be told what to do, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):491 +msgid "Unpacking" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):491 +#, no-wrap +msgid "\n$ <i>ebuild sed-3.02.ebuild unpack</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):495 ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):503 +msgid "or:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):499 +msgid "Compiling" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):499 +#, no-wrap +msgid "\n$ <i>ebuild sed-3.02.ebuild compile</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):507 +msgid "Unpacking and compiling" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):507 +#, no-wrap +msgid "\n$ <i>ebuild sed-3.02.ebuild all</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(impo):511 +msgid "If you provide a second command-line argument, other than those listed above, you get an error message (the * clause), and the program exits." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):519 +msgid "Modularizing the code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):522 +msgid "Now that the code is quite advanced and functional, you may be tempted to create several more ebuild scripts to unpack and compile your favorite programs. If you do, sooner or later you'll come across some sources that do not use autoconf (<c>./configure</c>) or possibly others that have non-standard compilation processes. We need to make some more changes to the ebuild system to accommodate these programs. But before we do, it is a good idea to think a bit about how to accomplish this." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):532 +msgid "One of the great things about hard-coding <c>./configure --prefix=/usr; make</c> into our compile stage is that, most of the time, it works. But, we must also have the ebuild system accommodate sources that do not use autoconf or normal Makefiles. To solve this problem, I propose that our ebuild script should, by default, do the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):541 +msgid "If there is a configure script in <c>${SRCDIR}</c>, execute it as follows: <c>./configure --prefix=/usr</c>. Otherwise, skip this step." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):545 +msgid "Execute the following command: make" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):548 +msgid "Since ebuild only runs configure if it actually exists, we can now automatically accommodate those programs that don't use autoconf and have standard makefiles. But what if a simple \"make\" doesn't do the trick for some sources? We need a way to override our reasonable defaults with some specific code to handle these situations. To do this, we'll transform our <c>ebuild_compile()</c> function into two functions. The first function, which can be looked at as a \"parent\" function, will still be called <c>ebuild_compile()</c>. However, we'll have a new function, called <c>user_compile()</c>, which contains only our reasonable default actions:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):560 +msgid "ebuild_compile() split into two functions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):560 +#, no-wrap +msgid "\nuser_compile() {\n <comment>#we're already in ${SRCDIR}</comment>\n if [ -e configure ]\n then\n #run configure script if it exists\n ./configure --prefix=/usr\n fi\n #run make\n make\n} \n\nebuild_compile() {\n if [ ! -d \"${SRCDIR}\" ]\n then\n echo \"${SRCDIR} does not exist -- please unpack first.\"\n exit 1\n fi\n <comment>#make sure we're in the right directory</comment>\n cd ${SRCDIR}\n user_compile\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):584 +msgid "It may not seem obvious why I'm doing this right now, but bear with me. While the code works almost identically to our previous version of ebuild, we can now do something that we couldn't do before -- we can override <c>user_compile()</c> in <path>sed-3.02.ebuild</path>. So, if the default <c>user_compile()</c> function doesn't meet our needs, we can define a new one in our <path>.ebuild</path> file that contains the commands required to compile the package. For example, here's an ebuild file for <c>e2fsprogs-1.18</c>, which requires a slightly different <c>./configure</c> line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):595 +msgid "e2fsprogs-1.18.ebuild" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):595 +#, no-wrap +msgid "\n<comment>#this ebuild file overrides the default user_compile()</comment>\nP=e2fsprogs-1.18\nA=${P}.tar.gz\n \nuser_compile() {\n ./configure --enable-elf-shlibs\n make\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):606 +msgid "Now, <c>e2fsprogs</c> will be compiled exactly the way we want it to be. But, for most packages, we can omit any custom <c>user_compile()</c> function in the <path>.ebuild</path> file, and the default <c>user_compile()</c> function is used instead." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):613 +msgid "How exactly does the ebuild script know which <c>user_compile()</c> function to use? This is actually quite simple. In the ebuild script, the default <c>user_compile()</c> function is defined before the <path>e2fsprogs-1.18.ebuild</path> file is sourced. If there is a <c>user_compile()</c> in <path>e2fsprogs-1.18.ebuild</path>, it overwrites the default version defined previously. If not, the default <c>user_compile()</c> function is used." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):623 +msgid "This is great stuff; we've added a lot of flexibility without requiring any complex code if it's not needed. We won't cover it here, but you could also make similar modifications to <c>ebuild_unpack()</c> so that users can override the default unpacking process. This could come in handy if any patching has to be done, or if the files are contained in multiple archives. It is also a good idea to modify our unpacking code so that it recognizes bzip2-compressed tarballs by default." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):636 +msgid "Configuration files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):639 +msgid "We've covered a lot of sneaky bash techniques so far, and now it's time to cover one more. Often, it's handy for a program to have a global configuration file that resides in <path>/etc</path>. Fortunately, this is easy to do using bash. Simply create the following file and save it as <path>/etc/ebuild.conf</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):646 +msgid "/ect/ebuild.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):646 +#, no-wrap +msgid "\n<comment># /etc/ebuild.conf: set system-wide ebuild options in this file</comment>\n\n<comment># MAKEOPTS are options passed to make</comment>\nMAKEOPTS=\"-j2\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):653 +msgid "In this example, I've included just one configuration option, but you could include many more. One of the beautiful things about bash is that this file can be parsed by simply sourcing it. This is a design trick that works with most interpreted languages. After <path>/etc/ebuild.conf</path> is sourced, <c>$MAKEOPTS</c> is defined inside our ebuild script. We'll use it to allow the user to pass options to make. Normally, this option would be used to allow the user to tell ebuild to do a parallel make. This is explained below." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(note):663 +msgid "<b>What is a parallel make?</b> To speed compilation on multiprocessor systems, make supports compiling a program in parallel. This means that instead of compiling just one source file at a time, make compiles a user-specified number of source files simultaneously (so those extra processors in a multiprocessor system are used). Parallel makes are enabled by passing the <c>-j #</c> option to make, as follows: <c>make -j4 MAKE=\"make -j4\"</c>. This code instructs make to compile four programs simultaneously. The <c>MAKE=\"make -j4\"</c> argument tells make to pass the <c>-j4</c> option to any child make processes it launches." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):675 +msgid "Here's the final version of our ebuild program:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):679 +msgid "ebuild, the final version" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):679 +#, no-wrap +msgid "\n#!/usr/bin/env bash\n\nif [ $# -ne 2 ]\nthen\n echo \"Please specify ebuild file and unpack, compile or all\"\n exit 1\nfi\n\nsource /etc/ebuild.conf\n\nif [ -z \"$DISTDIR\" ]\nthen\n <comment># set DISTDIR to /usr/src/distfiles if not already set</comment>\n DISTDIR=/usr/src/distfiles\nfi\nexport DISTDIR\n\nebuild_unpack() {\n <comment>#make sure we're in the right directory</comment>\n cd ${ORIGDIR}\n \n if [ -d ${WORKDIR} ]\n then \n rm -rf ${WORKDIR}\n fi\n\n mkdir ${WORKDIR}\n cd ${WORKDIR}\n if [ ! -e ${DISTDIR}/${A} ]\n then\n echo \"${DISTDIR}/${A} does not exist. Please download first.\"\n exit 1\n fi\n tar xzf ${DISTDIR}/${A}\n echo \"Unpacked ${DISTDIR}/${A}.\"\n <comment>#source is now correctly unpacked</comment>\n}\n\nuser_compile() {\n <comment>#we're already in ${SRCDIR}</comment>\n if [ -e configure ]\n then\n <comment>#run configure script if it exists</comment>\n ./configure --prefix=/usr\n fi\n <comment>#run make</comment>\n make $MAKEOPTS MAKE=\"make $MAKEOPTS\" \n} \n\nebuild_compile() {\n if [ ! -d \"${SRCDIR}\" ]\n then\n echo \"${SRCDIR} does not exist -- please unpack first.\"\n exit 1\n fi\n <comment>#make sure we're in the right directory</comment>\n cd ${SRCDIR}\n user_compile\n}\n\nexport ORIGDIR=`pwd`\nexport WORKDIR=${ORIGDIR}/work\n\nif [ -e \"$1\" ]\nthen\n source $1\nelse\n echo \"Ebuild file $1 not found.\"\n exit 1\nfi\n\nexport SRCDIR=${WORKDIR}/${P}\n\ncase \"${2}\" in\n unpack)\n ebuild_unpack\n ;;\n compile)\n ebuild_compile\n ;;\n all)\n ebuild_unpack\n ebuild_compile\n ;;\n *)\n echo \"Please specify unpack, compile or all as the second arg\"\n exit 1\n ;;\nesac\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):771 +msgid "Notice <path>/etc/ebuild.conf</path> is sourced near the beginning of the file. Also, notice that we use <c>$MAKEOPTS</c> in our default <c>user_compile()</c> function. You may be wondering how this will work -- after all, we refer to <c>$MAKEOPTS</c> before we source <path>/etc/ebuild.conf</path>, which actually defines <c>$MAKEOPTS</c> in the first place. Fortunately for us, this is OK because variable expansion only happens when <c>user_compile()</c> is executed. By the time <c>user_compile()</c> is executed, <path>/etc/ebuild.conf</path> has already been sourced, and <c>$MAKEOPTS</c> is set to the correct value." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):785 +msgid "Wrapping it up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):788 +msgid "We've covered a lot of bash programming techniques in this article, but we've only touched the surface of the power of bash. For example, the production Gentoo Linux ebuild system not only automatically unpacks and compiles each package, but it can also:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):796 +msgid "Automatically download the sources if they are not found in <c>$DISTDIR</c>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):799 +msgid "Verify that the sources are not corrupted by using MD5 message digests" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):802 +msgid "If requested, install the compiled application into the live filesystem, recording all installed files so that the package can be easily uninstalled at a later date." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):807 +msgid "If requested, package the compiled application in a tarball (compressed the way you like it) so that it can be installed later, on another computer, or during the CD-based installation process (if you are building a distribution CD)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):815 +msgid "In addition, the production ebuild system has several other global configuration options, allowing the user to specify options such as what optimization flags to use during compilation, and whether optional support for packages like GNOME and slang should be enabled by default in those packages that support it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):822 +msgid "It's clear that bash can accomplish much more than what I've touched on in this series of articles. I hope you've learned a lot about this incredible tool, and are excited about using bash to speed up and enhance your development projects." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):833 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):835 +msgid "Useful links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):839 +msgid "Download the source tarball (<path>sed-3.02.tar.gz</path>) from <uri>ftp://ftp.gnu.org/pub/gnu/sed</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):843 +msgid "Read <uri link=\"/doc/en/articles/bash-by-example-p1.xml\">Bash by example: Part 1</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):847 +msgid "Read <uri link=\"/doc/en/articles/bash-by-example-p2.xml\">Bash by example: Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):851 +msgid "Visit the home page of the <uri link=\"http://gentoo.org\">Gentoo Project</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):855 +msgid "Check out the <uri link=\"http://www.gnu.org/software/bash/manual/bash.html\">bash online reference manual</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/dynamic-iptables-firewalls.xml.pot b/article/gettext/dynamic-iptables-firewalls.xml.pot new file mode 100644 index 0000000..eb96ff5 --- /dev/null +++ b/article/gettext/dynamic-iptables-firewalls.xml.pot @@ -0,0 +1,305 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(guide:link):5 +msgid "/doc/en/articles/dynamic-iptables-firewalls.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):6 +msgid "Dynamic iptables firewalls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(abstract):12 +msgid "Firewalls are good and fun, but what do you do when you need to make rapid, complex changes to your firewall rules? Easy. Use Daniel Robbins' dynamic firewall scripts that are demonstrated in this article. You can use these scripts to increase your network security and responsiveness, and to inspire your own creative designs." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(version):25 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(date):26 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):29 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):31 +msgid "Flexible (and fun) network security" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):34 +msgid "The best way to see the benefits of dynamic firewall scripts is to see them in action. To do this, let's imagine that I'm a sysadmin at an ISP, and I've recently set up a Linux-based firewall to protect my customers and internal systems from malicious users on the Internet. To do this, my firewall uses the new Linux 2.4 iptables stateful functionality to allow new outgoing connections to be established by my customers and servers, and of course to allow new incoming connections, but only to \"public\" services, such as web, ftp, ssh, and SMTP. Since I used a deny-by-default design, any from-Internet connections to non-public services, such as the squid proxy cache or Samba server, are automatically rejected. So far, I have a pretty decent firewall that offers a good level of protection for everyone at my ISP." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):48 +msgid "For the first week or so, the firewall works great, but then something ugly happens: Bob, my arch-nemesis (who works at a competing ISP) decides that he wants to flood my network with packets in an attempt to deny service to my customers. Unfortunately, Bob has carefully studied my firewall and knows that while I'm protecting many internal services, port 25 and 80 must be publicly accessible so that I can receive mail and serve HTTP requests. Bob decides to take advantage of this fact by launching a bandwidth-sucking attack against my web and mail server." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):59 +msgid "About a minute or so after Bob begins his attack, I notice that my uplinks start becoming saturated with packets. After taking a look at the situation with <c>tcpdump</c> I determine that this is yet another Bob attack, and I figure out what IP addresses he's using to launch it. Now that I have this information, all that I need to do is block these IP addresses, and that should solve the problem -- a simple solution, or so I think." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):72 +msgid "Responding to an attack" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):75 +msgid "I quickly load my firewall setup script into vi and begin hacking away at my iptables rules, modifying my firewall so that it'll block those evil incoming Bob packets. After a minute or so, I find the exact place to make the appropriate DROP rule additions, and I add them. Then, I start and stop the firewall...ooops, made a bit of a mistake when I added the rules. I load up the firewall scripts again, fix the problem, and thirty seconds later the firewall has been tweaked to block Bob's attack of the month. At first, it seems like I successfully thwarted the attack...until the helpdesk phones begin ringing. Apparently, Bob was able to disrupt my network for about 10 minutes, and now my customers are calling to find out what's going on. Even worse, after a few minutes pass, I notice that our uplinks again start to become saturated. This time, Bob appears to be using a brand-new set of IP addresses for his attacks. In response, I begin feverishly hacking away at our firewall scripts, except this time, I'm a bit panicky -- maybe my solution isn't so good after all." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):92 +msgid "Here's what went wrong in the above scenario. Although I had a decent firewall in place and also quickly identified the cause of the network problem, I was unable to modify the behavior of my firewall to respond to the threat in time. Of course, when your network is under attack, you want to be able to respond immediately, and being forced to hack away at your master firewall setup script in a panicked state is not only stressful, but also very inefficient." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):106 +msgid "Scripts" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):108 +msgid "ipdrop" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):111 +msgid "It would be far better if I had a special <c>ipdrop</c> script that's specifically designed to insert just the rules you need to block the IP address that I specify. With such a script, blocking a firewall is no longer a two-minute ordeal; instead, it takes five seconds. And since the script shields me from the task of editing firewall rules by hand, it eliminates a major source of errors. All that's left for me to do is to determine the IP address that I'd like to block, and then type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):121 +msgid "Dropping IP" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):121 +#, no-wrap +msgid "\n# <i>ipdrop 129.24.8.1 on</i>\nIP 129.24.8.1 drop on.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):126 +msgid "Immediately, the ipdrop script would block 129.24.8.1, Bob's current evil IP address of the week. This script dramatically improves your defenses, because now an IP block is a no-brainer. Now, let's take a look at my implementation of the ipdrop script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):133 +msgid "ipdrop script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):133 +#, no-wrap +msgid "\n#!/bin/bash\n\nsource /usr/local/share/.sh\n\nargs 2 $# \"${0} IPADDR {on/off}\" \n\n<comment># Drops packets to/from IPADDR. Good for obnoxious\nnetworks/hosts/DoS\"</comment>\n\nif [ \"$2\" == \"on\" ] \nthen\n<comment># Rules will be appended or inserted as normal</comment>\n APPEND=\"-A\"\n INSERT=\"-I\"\n rec_check ipdrop $1 \"$1 already blocked\" on\n record ipdrop $1\nelif [ \"$2\" == \"off\" ]\nthen\n<comment># Rules will be deleted instead</comment>\n APPEND=\"-D\"\n INSERT=\"-D\"\n rec_check ipdrop $1 \"$1 not currently blocked\" off \n unrecord ipdrop $1\nelse\n echo \"Error: \\\"off\\\" or \\\"on\\\" expected as second argument\"\n exit 1\nfi \n\n<comment># Block outside IP address that's causing problems</comment>\n<comment># Attacker's incoming TCP connections will take a minute or so to time\nout, reducing DoS effectiveness</comment>\n\niptables $INSERT INPUT -s $1 -j DROP\niptables $INSERT OUTPUT -d $1 -j DROP\niptables $INSERT FORWARD -d $1 -j DROP\niptables $INSERT FORWARD -s $1 -j DROP\n\necho \"IP ${1} drop ${2}.\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):178 +msgid "ipdrop: the explanation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):181 +msgid "If you take a look at the last four highlighted lines, you'll see the actual commands that insert the appropriate rules into the firewall tables. As you can see, the definition of the $INSERT environment variable varies, depending on whether we're running in \"on\" or \"off\" mode. When the iptables lines execute, the particular rules will be inserted or deleted appropriately." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):189 +msgid "Now, let's look at the function of the rules themselves, which should work perfectly with any type of existing firewall, or even on a system with no firewall; all you need is iptables support built-in to your 2.4 kernel. We block incoming packets arriving from the evil IP (first iptables line), block outgoing packets headed for the evil IP (next iptables line), and then turn off forwarding in either direction for this particular IP (last two iptables lines.) Once these rules are in place, your system will simply discard any packets that fall into one of these categories." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):200 +msgid "Another quick note: you'll also notice calls to \"rec_check\", \"unrecord\", \"record\", and \"args\". These are special helper bash functions defined in <path>dynfw.sh</path>. The \"record\" function records the blocked ip in the <path>/root/.dynfw-ipdrop</path> file, while the \"unrecord\" removes the entry from <path>/root/.dynfw-ipdrop</path>. The \"rec_check\" function is used to abort the script with an error message if you attempt to re-block an already-blocked IP, or unblock an IP that isn't currently being blocked. The \"args\" function takes care of making sure that we receive the correct number of command-line arguments, and also handles printing helpful usage information. I've created a <uri link=\"http://www-128.ibm.com/developerworks/library/l-fw/dynfw-1.0.tar.gz\">dynfw-1.0.tar.gz</uri> that contains all these tools; see the <uri link=\"#resources\">Resources</uri> section at the end of this article for more information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):220 +msgid "tcplimit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):223 +msgid "This next dynamic firewall script is useful if you need to limit the usage of a particular TCP-based network service, possibly something that generates a heavy CPU load on your end. Called \"tcplimit\", this script takes a TCP port, a rate, a scale, and \"on\" or \"off\" as an argument:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):230 +msgid "Limiting of particular TCP-based network service usage" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):230 +#, no-wrap +msgid "\n# <i>tcplimit 873 5 minute on</i>\nPort 873 new connection limit (5/minute, burst=5) on.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):235 +msgid "<c>tcplimit</c> uses the new iptables \"state\" module (make sure you've enabled this in your kernel or loaded the module) to allow only a certain number of new, incoming connections in a specific period of time. In this example, the firewall will allow only five new connections to my rsync server (port 873) per minute -- and it's possible to specify the desired number of connections you'd like per second/minute/hour or day, as needed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):244 +msgid "<c>tcplimit</c> offers a good way of limiting non-essential services -- so that a flood of traffic to a non-essential service doesn't disrupt your network or server. In my case, I use <c>tcplimit</c> to set a maximum upper bound for rsync usage to prevent my DSL line from becoming saturated by too many rsync connections. Connection-limited services are recorded in <path>/root/.dynfw-tcplimit</path>, and if I ever want to turn the new connection limiting off, I can simply type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):254 +msgid "Turning off the connection limiting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):254 +#, no-wrap +msgid "\n# <i>tcplimit 873 5 minute off</i>\nPort 873 new connection limit off.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):259 +msgid "<c>tcplimit</c> works by creating a completely new chain in the \"filter\" table. This new chain will reject all packets that exceed our specified limit. Then, a single rule is inserted into the INPUT chain that redirects all incoming NEW connection packets headed to the target port (873 in this case) to this special chain, effectively placing a limit on new, incoming connections while not affecting packets that are part of an established connection." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):268 +msgid "When <c>tcplimit</c> is turned off, the INPUT rule and special chain are deleted. This is the kind of fancy stuff that really highlights the importance of having a well-tested, reliable script manage the firewall rules for you. As with <c>ipblock</c>, the <c>tcplimit</c> script should be compatible with any type of firewall, or even no firewall, as long as you have the proper iptables functionality enabled in your kernel." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):281 +msgid "host-tcplimit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):284 +msgid "<c>host-tcplimit</c> is a lot like <c>tcplimit</c>, but it limits new TCP connections coming in from a particular IP address and heading for a particular TCP port on your server(s). <c>host-tcplimit</c> is particularly useful for preventing a particular person from abusing your network resources. For example, let's say you're running a CVS server, and you discover that a particular new developer appears to have set up a script that updates his sources with the repository every 10 minutes, using up a huge amount of unnecessary network resources over the course of a day. However, while you're in the process of composing an e-mail to him explaining the error of his ways, you receive an incoming message that reads as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):297 +msgid "Incoming message" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):297 +#, no-wrap +msgid "\nHi guys!\n\nI'm really excited to be part of your development project. I just set up a\nscript to update my local copy of the code every ten minutes. I'm about to\nleave on a two-week cruise, but when I get back, my sources will be totally\nup-to-date and I'll be ready to help out! I'm heading out the door now...see\nyou in two weeks!\n\nSincerely,\n\nMr. Newbie\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):311 +msgid "For such situations, a simple <c>host-tcplimit</c> command will solve the problem:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):316 +msgid "host-tcplimit command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):316 +#, no-wrap +msgid "\n# <i>host-tcplimit 1.1.1.1 2401 1 day on</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):320 +msgid "Now, Mr. Newbie (IP address 1.1.1.1) is limited to one CVS connection (port 2401) per day, saving oodles of network bandwidth." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):329 +msgid "user-outblock" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):332 +msgid "The last and possibly most intriguing of all my dynamic firewall scripts is <c>user-outblock</c>. This script provides an ideal way to allow a particular user to telnet or ssh into your system, yet not allow this user to establish any new outgoing connections from the command-line. Here's an example of a situation where user-outblock would come in handy. Let's say that a particular family has an account at my ISP. Mom and Dad use a graphical e-mail client to read their mail and occasionally surf the Web, but their son happens to be an aspiring hacker, and generally uses his shell access to do naughty things to other people's computers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):344 +msgid "One day, you find that he's established ssh connections with several systems that appear to belong to the Pakistani military -- ouch. You'd like to help direct this youth towards more beneficial activities, so you do the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):350 +msgid "First, you do an audit of your system and make sure that you remove the suid bit from all your network binaries, like ssh:U" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):355 +msgid "Removing suid bit from all the network binaries" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):355 +#, no-wrap +msgid "\n# <i>chmod u-s /usr/bin/ssh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):359 +msgid "Now, any processes that he tries to use to interact with the network will be owned by his UID. You can now use user-outblock to block all outgoing TCP connections initiated by this UID (which happens to be 2049):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):365 +msgid "Blocking all outgoing TCP connections initiated by some UID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):365 +#, no-wrap +msgid "\n# <i>user-outblock 2049 on</i>\nUID 2049 block on.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):370 +msgid "Now, he can log in and read his mail, but he's not going to be using your servers to establish ssh connections and the like. Now, he could install an ssh client on his home PC. However, it's not too hard to whip up another dynamic firewall script that limits his home PC to Web, mail, and outgoing ssh connections (to your servers only)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):383 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):385 +msgid "Tarballs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):388 +msgid "Because I've found these dynamic firewall scripts so helpful, I've put together a neat little tarball (<uri link=\"/doc/en/articles/files/dynfw-1.0.1.tar.bz2\">dynfw-1.0.1.tar.bz2</uri>) that you can download and install on your machine." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):395 +msgid "To install, extract the tarball and run the included <c>install.sh</c> script. This script will install a shared bash script to <path>/usr/local/share/dynfw.sh</path>, and install the dynamic firewall scripts themselves to <path>/usr/local/sbin</path>. If you'd like them to end up in <path>/usr/share</path> and <path>/usr/sbin</path> instead, simply type this before running <c>install.sh</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):404 +msgid "Exporting location of install directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):404 +#, no-wrap +msgid "\n# <i>export PREFIX=/usr</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):408 +msgid "I've also added a <uri link=\"/proj/en/dynfw.xml\">dynamic firewall scripts</uri> page to the Gentoo Linux Web site that you can visit to get the latest version of the tarball. I'd like to continue improving and adding to the collection, making a truly useful resource for sysadmins planetwide. Now that we have iptables in the kernel, it's time to start taking advantage of it!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):416 +msgid "If all this iptables firewall stuff is new to you, I highly recommend my Linux <uri link=\"http://www-128.ibm.com/developerworks/edu/l-dw-linuxfw-i.html\">2.4 stateful firewall tutorial</uri> (registration required), containing complete instructions on how to design your own iptables-based stateful firewall." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):423 +msgid "<uri link=\"http://www.tcpdump.org/\">tcpdump</uri> is an essential tool for exploring low-level packet exchanges and verifying that your firewall is working correctly. If you don't have it, get it. If you've got it, start using it. If you're using it... good for you. :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):430 +msgid "Visit the <uri link=\"http://netfilter.samba.org\">home page for the netfilter team</uri> to find lots of excellent resources, including the iptables sources, and Rusty's excellent <uri link=\"http://netfilter.samba.org/unreliable-guides/index.html\">unreliable guides</uri>. These include a basic networking concepts HOWTO, a netfilter (iptables) HOWTO, a NAT HOWTO, and a netfilter hacking HOWTO for developers. There's also a <uri link=\"http://netfilter.org/documentation/index.html#documentation-faq\">netfilter FAQ</uri> available, as well as other things." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):442 +msgid "Thankfully, there are a lot of good online netfilter resources; however, don't forget the basics. The iptables man page is very detailed and is a shining example of what a man page should be." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):448 +msgid "There's now an <uri link=\"http://www.ds9a.nl/2.4Routing/\">Advanced Linux Routing and Traffic Control HOWTO</uri> available. There's a good section that shows how to use iptables to mark packets, and then use Linux routing functionality to route the packets based on these marks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):455 +msgid "There's a <uri link=\"http://netfilter.org/mailinglists.html#ml-user\">netfilter (iptables) mailing list</uri> available, as well as one for <uri link=\"http://netfilter.org/mailinglists.html#ml-devel\">netfilter developers</uri>. You can also access the mailing list archives at these URLs." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/hardware-stability-p1.xml.pot b/article/gettext/hardware-stability-p1.xml.pot new file mode 100644 index 0000000..6a43212 --- /dev/null +++ b/article/gettext/hardware-stability-p1.xml.pot @@ -0,0 +1,341 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(guide:link):5 +msgid "/doc/en/articles/hardware-stability-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):6 +msgid "Linux hardware stability guide, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by Joshua Saddler, nightmorph@gentoo.org +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(abstract):13 +msgid "In this article, Daniel Robbins shows you how to diagnose and fix CPU flakiness, as well as how to test your RAM for defects. By the end of this article, you'll have the skills to ensure that your Linux system is as stable as it possibly can be." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(version):25 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(date):26 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):29 +msgid "CPU troubleshooting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):33 +msgid "Many of us in the Linux world have been bitten by nasty hardware problems. How many of us have set up a Linux box, installed our favorite distribution, compiled and installed some additional apps, and gotten everything working perfectly only to find that our new system has an (argh!) fatal hardware bug? Whether the symptoms are random segmentation faults, data corruption, hard locks, or lost data is irrelevant -- the hardware glitch effectively makes our normally reliable Linux operating system barely able to stay afloat. In this article, we'll take an in-depth look at how to detect flaky CPUs and RAM -- allowing you to replace the defective parts before they do some serious damage." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):46 +msgid "If you're experiencing instability problems and suspect they are hardware related, I encourage you to test both your CPU and memory to ensure that they're working OK. However, even if you haven't experienced these problems, it's still a good idea to perform these CPU and memory tests. In doing so, you may detect a hardware problem that could have bitten you at an inopportune time, something that could have caused data loss or hours of frustration in a frantic search for the source of the problem. The proper, proactive application of these techniques can help you to avoid a lot of headaches, and if your system passes the tests, you'll have the peace of mind that your system is up to spec." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):62 +msgid "CPU issues" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):65 +msgid "If you have a horribly defective CPU, your machine may be unable to boot Linux or may only run for a few minutes before locking up. CPUs in this ragged state are easy to diagnose as defective because the symptoms are so obvious. But there are more subtle CPU defects that aren't so easy to detect; generally, the less obvious errors are the ones that cause machines to either lock up every now and then for no apparent reason, or cause certain processes to die unexpectedly. Most CPU instabilities can be triggered by \"exercising\" the CPU -- giving it a bunch of work to do, causing it to heat up and possibly flake out. Let's look at some ways to stress-test the CPU." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):77 +msgid "You may be surprised to hear that one of the best tests of CPU stability is built in to Linux -- the kernel compile. The gcc compiler is a great tool for testing general CPU stability, and a kernel build uses gcc a whole lot. By creating and running the following script from your <path>/usr/src/linux</path> directory, you can give your machine an industrial-strength kernel compile stress test:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre:caption):86 +msgid "The cpubuild script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre):86 +#, no-wrap +msgid "\n#!/bin/bash\nmake dep\nwhile [ \"foo\" = \"foo\" ]\ndo\n make clean\n make -j2 bzImage\n if [ $? -ne 0 ]\n then\n echo OUCH OUCH OUCH OUCH\n exit 1\n fi\ndone\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):101 +msgid "You'll notice that this script <e>repeatedly</e> compiles the kernel. The reason for this is simple -- some CPUs have intermittent glitches, allowing them to compile the kernel perfectly 95% of the time, but causing the kernel compile to bomb out every now and then. Normally, this is because it may take five or more kernel compiles before the processor heats up to the point where it becomes unstable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):110 +msgid "In the above script, make sure to adjust the <c>-j</c> option so that the number following it is one greater than the number of CPUs in your system; in other words, use \"2\" for uniprocessors, \"3\" for dual-processors, etc. The <c>-j</c> option tells <c>make</c> to build the kernel in parallel, ensuring that there's always at least one gcc process on deck after each source file is compiled -- ensuring that the stress on your CPU is maximized. If your Linux box is going to be unused for the afternoon, go ahead and run this script, and let the machine recompile the kernel for a few hours." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):124 +msgid "Possible CPU problems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):127 +msgid "If the script runs perfectly for several hours, congratulations! Your CPU has passed the first test. However, it's possible that the above script dies unexpectedly. How do you know you're having a CPU problem as opposed to something else? Well, if gcc spat out an error like this, then there's a very good possibility that your CPU is defective:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre:caption):135 +msgid "GCC error" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre):135 +#, no-wrap +msgid "\ngcc: Internal compiler error: program cc1 got fatal signal 11\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):139 +msgid "At this point, you have about three possibilities as to the state of your CPU:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):144 +msgid "If you type <c>make bzImage</c> to resume the kernel compilation, and the compiler dies on the exact same file, keep typing <c>make bzImage</c> over and over again. If after about ten tries the build process continues to die on this particular file, then the problem is most likely caused by a (rare) gcc compiler bug that's being triggered by this particular source file, rather than a flaky CPU. However, these days, gcc is quite stable, so this isn't likely to happen." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):153 +msgid "If you type <c>make bzImage</c> to resume kernel compilation, and you get another signal 11 a little bit later, then your CPU is most likely on its last legs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):158 +msgid "If you type <c>make bzImage</c> to resume kernel compilation and the kernel compiles successfully, this doesn't mean that your CPU is OK. Normally, this means that your CPU glitch only shows up every now and then, normally only when the CPU rises above a certain temperature (a CPU will get hotter when it is being used for an extended period of time, and may take several kernel compiles to get to that critical point)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):171 +msgid "Rescuing your CPU" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):174 +msgid "If your CPU is experiencing random intermittent errors when placed under heavy load, it's possible that your CPU isn't defective at all -- maybe it simply isn't being cooled properly. Here are some things that you can check:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):181 +msgid "Is your CPU fan plugged in?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):182 +msgid "Is it relatively dust-free?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):183 +msgid "Does the fan actually spin (and spin at the proper speed) when the power is on?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):187 +msgid "Is the heat sink seated properly on the CPU?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):188 +msgid "Is there thermal grease between the CPU and the heat sink?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):189 +msgid "Does your case have adequate ventilation?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):192 +msgid "If everything seems fine, then you may want to rerun the kernel compile tests with an open case. Let the kernel compile go for about five minutes and then put your hand inside the running machine and touch the outside metal casing of the power supply to ground yourself. Then, carefully test the temperature of the heat sink with the tip of your finger. If it's unusually hot, then it's very possible that your heatsink/fan combo just isn't adequate for your particular CPU. In that case, upgrade your system's cooling hardware -- hopefully, your CPU hasn't sustained any permanent damage and is still functional." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):207 +msgid "The ultimate CPU test" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):210 +msgid "The kernel compile test is a great way to test for CPU stability, but there's an even more extreme CPU test available that you might want to use. I saved this one for last, because if your CPU is grossly undercooled, this particular test could really overheat it and could <e>theoretically</e> cause permanent damage to your CPU. This test is intended for systems that pass the kernel compile test with no problem -- systems that you want to ensure can handle even the most challenging CPU loads with ease. If your CPU is properly cooled, it will pass this test, and if it doesn't pass, you need more cooling." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):221 +msgid "To perform my \"ultimate\" CPU test, the first thing I do is head over to the lm_sensors page (see <uri link=\"#resources\">Resources</uri>) and download the lm_sensors package. This source tarball contains various kernel modules that interface with the health monitoring features that are built in to nearly all modern motherboards. Once this package is properly installed and the proper modules are loaded (use the prog/detect/sensors-detect script to figure out which ones), you'll see some new files and directories appear at <path>/proc/sys/dev/sensors</path>. These files contain handy information like the speed of your CPU fans, CPU and mainboard temperature readings, and motherboard voltage readings, all updated in real time. I recommend you configure this package to compile as modules and use the sensors-detect script to figure out what modules to load at boot time, since I've had better results with this configuration." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):237 +msgid "Once you have the lm_sensors modules loaded, I recommend that you install a graphical CPU/sensors monitor, which will allow you to watch your CPU load and temperatures in real time without having to repeatedly <c>cat</c> files in /proc/sys/dev/sensors. For this purpose, I use a great little program called gkrellm (see <uri link=\"#resources\">Resources</uri>). Here's a snapshot of my gkrellm app, monitoring my CPU usage, motherboard temperature settings and a bunch of other things:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(figure:link):248 +msgid "/images/docs/hardware-stability-gkrellm.jpg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(figure:caption):248 +msgid "gkrellm is up and running" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):250 +msgid "There are other graphical monitoring packages available that are compatible with lm_sensors; you'll find a bunch of them listed over at the lm_sensors home page, under the \"links\" section." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):256 +msgid "The last preparatory step is to download the cpuburn program (see <uri link=\"#resources\">Resources</uri>). This handy little program uses hand-crafted combinations of machine instructions to put maximum stress on your particular CPU -- even a little bit more than a repetitive kernel compile. Included in the archive are various little programs customized to set P5- and P6-class processors, as well as a special version for the AMD K6. Once you've unpacked the cpuburn tarball, read the README file; it explains how to compile the included assembly source files. After you've done this, you'll have your own little cpuburn program." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):268 +msgid "Now, for the test. I normally fire up my graphical sensors monitor, and then start the cpuburn program as root. Then, I watch the CPU temperature reading rise and stabilize, and then I leave cpuburn running for an hour or so. If you repeat these steps and your CPU temperature continues to rise to an unusually high temperature (160 degrees Farenheit or so would be considered \"unusually high\"), then your CPU cooling system needs major work. And, if your machine crashes or locks up, or the cpuburn process dies, your CPU cooling needs improvement -- or maybe your particular CPU simply isn't up to \"spec\". You can use the CPU temperature readings to make that judgment. But if all goes well, then your system should be able to tackle any challenge thrown at it. After an hour or so, you can go ahead and kill the cpuburn program and resume normal operations." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):288 +msgid "Memory troubleshooting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):290 +msgid "Memory testing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):293 +msgid "It's really important to have a completely reliable CPU, and it's just as important to have rock-solid RAM chips. Some people think that SIMMS and DIMMS never fail and never need to be tested. Unfortunately, this isn't true -- bad memory is very common, and is something that all of us need to watch out for. Other people believe that while there may be bad RAM out there, any RAM errors will be detected by the boot-time BIOS memory check. This is also false; the BIOS memory check won't detect the vast majority of bad RAM, so don't let the BIOS check give you a false sense of security." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):307 +msgid "Bad memory symptoms" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):310 +msgid "OK, so there's bad RAM out there, and some may be sitting in your machine right now. Here are some warning signs that may indicate that your computer contains bad RAM:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):317 +msgid "When you load a bunch of programs at once, every now and then a particular program will die for no apparent reason." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):321 +msgid "Every now and then, when you open a file, it appears corrupted. If you open it later, it looks fine." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):325 +msgid "When you extract tarballs (<c>tar -xzvf</c>), tar frequently reports that the tarball is corrupted. You try extracting the tarball again at a later date and tar doesn't report any errors. Similar problems can occur with gzip and bzip2." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):331 +msgid "If you're experiencing problems like these, it's likely that your system RAM is defective. You'll definitely want to test your RAM using the following method. And even if you haven't experienced any of these problems, it's a good idea to give the RAM in your system a good workout to help ensure that you won't be bitten by unexpected RAM quirks in the future. Here's how." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):344 +msgid "memtest86" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):347 +msgid "Fortunately for us, there's an excellent Linux-based memory testing program that installs onto a bootable floppy disk. It's called memtest86 (see <uri link=\"#resources\">Resources</uri> to get it). Creating a memtest floppy is simple. First, download the tarball. Then, unpack the archive and build the binary disk image:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre:caption):355 +msgid "Building memtest86" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre):355 +#, no-wrap +msgid "\n# <i>tar -xzvf memtest86-2.5.tar.gz</i>\n# <i>cd memtest86-2.5</i>\n# <i>make</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):361 +msgid "Then, insert a blank 3.5\" disk into your floppy drive, and type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre:caption):365 +msgid "Installing memtest86" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre):365 +#, no-wrap +msgid "\n# <i>make install</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):369 +msgid "After just a few seconds, your 3.5\" disk will have a wonderful little memory tester sitting on it, ready to be booted. The best way to perform this test is to find some time when your machine can sit idle for at least six hours -- starting the test right before you go to bed (or leave work) is a good idea. To start the test, reboot your machine with the 3.5\" disk in the drive. When your system boots, the memtest86 program will immediately start:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(figure:link):379 +msgid "/images/docs/hardware-stability-memtest86.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(figure:caption):379 +msgid "memtest86 testing the RAM on my development machine" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):381 +msgid "Major memory quirks (such as \"dead\" bits) will be detected within seconds. Failures triggered by specific bit patterns (which are unfortunately quite common) may not be detected for several hours, but should eventually be detected. As soon as memtest86 detects a defective bit, a message will appear at the bottom of the screen -- and the tests will continue. When you turn on your monitor in the morning, find that the tests have completed, and see no warnings on the screen, then in all probability your RAM is fine. However, if you continue to experience the problems listed in the <uri link=\"#badmem\">Bad memory symptoms</uri> section, then it <e>is</e> possible that your RAM has an infrequently occurring quirk and may still need to be replaced." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):397 +msgid "Solving RAM problems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):400 +msgid "I hope that all your RAM is working just fine. However, if you're one of the unfortunate ones, all may not be lost -- there are still some things you can do to \"fix\" your bad RAM. The first thing I suggest doing is to visit your BIOS setup program and look at your memory settings. Some BIOS setup programs have a memory option called \"Turbo Mode\" -- obviously, if you have something like this enabled, then you should disable it. It's also possible that your BIOS memory timings are set incorrectly -- you can try adjusting them (increasing the refresh rate, lowering the CAS setting) and rerunning memtest86 to see if the problem goes away." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):412 +msgid "If memtest still finds errors, then it's time to locate the faulty SIMM or DIMM and remove it from your machine. If you have more than one memory module installed, then you'll want to install only a single module (or two modules if you have SIMMS), and run memtest86. Cycle through all your modules and you'll be able to determine which ones are defective -- there's no need to throw a good memory module in the trash." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):421 +msgid "That's all for now; in the second and final installment in this series, we'll take a look at how to fix problems related to hardware configuration, including IRQ and PCI latency issues. In the mean time, you may want to check out the following resources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):431 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):435 +msgid "Download the <uri link=\"http://www.netroedge.com/~lm78\">lm_sensors package</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):439 +msgid "Pick up a copy of <uri link=\"http://gkrellm.net/\">gkrellm</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):440 +msgid "Get the <uri link=\"http://users.ev1.net/~redelm/\">cpuburn program</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):443 +msgid "Grab your own copy of <uri link=\"http://www.memtest86.com/\">memtest86</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):446 +msgid "For more information on the \"signal 11 problem\", check out the <uri link=\"http://www.bitwizard.nl/sig11/\">Sig 11 FAQ</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):450 +msgid "You can find a bunch of Window-maker dockapps (some of which graph CPU and sensors data) at <uri link=\"http://www.windowmaker.org/links-general.html\">Linuxpowered.com's Window-maker links page</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):456 +msgid "If you're trying to diagnose a hardware problem related to your nVidia graphics card, be sure to check out the <uri link=\"http://www.technologyvault.co.uk/geforce/faq.php?list=categories&prog=gef&lang=en\">GeForce FAQ</uri>. There's lots of great Linux and Windows-related information there." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):462 +msgid "For additional nVidia troubleshooting information, check out Sven Vermeulen's <uri link=\"/doc/en/nvidia-guide.xml\">nVidia Guide</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):471 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):474 +msgid "Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a contributing author of several books published by MacMillan: Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade when he was first exposed to the Logo programming language and a potentially lethal dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife Mary and his new baby daughter, Hadassah. You can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/hardware-stability-p2.xml.pot b/article/gettext/hardware-stability-p2.xml.pot new file mode 100644 index 0000000..d4a8ccf --- /dev/null +++ b/article/gettext/hardware-stability-p2.xml.pot @@ -0,0 +1,300 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(guide:link):5 +msgid "/doc/en/articles/hardware-stability-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):6 +msgid "Linux hardware stability guide, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by Joshua Saddler, nightmorph@gentoo.org +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(abstract):13 +msgid "In this article, Daniel Robbins shares his experiences in getting his NVIDIA TNT graphics card working under Linux using NVIDIA's accelerated drivers. As he does, he'll show you how to diagnose and fix IRQ and PCI latency timer issues -- techniques you can use to ensure that your systems don't experience lock-ups, inconsistent behavior, or data loss." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(version):26 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(date):27 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):30 +msgid "Drivers" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):32 +msgid "The many causes of instability" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):35 +msgid "A stability problem is often not caused by defective hardware, but by improper hardware configuration or flaky drivers. My experience in this area began when I tried to get Linux working on my Diamond Viper V550, an NVIDIA TNT-based AGP card, using NVIDIA's own accelerated drivers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):42 +msgid "NVIDIA has their own display drivers for Linux, a collaboration between NVIDIA, SGI, and VA Linux. These drivers have a lot of advantages over the standard 2d-only NVIDIA drivers included with Xfree86 4.0. For one, they have full accelerated 3D support. Even better, they feature an official OpenGL 1.2 implementation, rather than just an enhanced version of Mesa. So, all in all, these accelerated drivers are the ones you want to be using if you own an NVIDIA-based graphics card, at least in theory. My attempt to get them working properly turned out to be an excellent learning experience, to say the least." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):53 +msgid "After I installed the accelerated Linux NVIDIA drivers (see <uri link=\"#resources\">Resources</uri> later in this article), I started up Xfree86 and began playing around with all my 3D applications, now wonderfully accelerated as they should be. Up until that point, I had had to reboot into Windows NT in order to take advantage of 3D acceleration. Now, while I don't mind NT, having to reboot to use 3D apps was somewhat annoying, and I was glad to have one less reason to leave Linux and reboot my machine. However, after playing around for an hour or so, I experienced a fatal setback to my Linux 3D aspirations -- my machine locked up. My mouse simply stopped moving and the screen froze, and I had to reboot my system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):66 +msgid "Yes, I was having some kind of stability problem. But I didn't know exactly what was causing the problem. Did I have flaky hardware, or was the card misconfigured? Or maybe it was a problem with the driver -- did it not like my VIA KT133-based Athlon motherboard? Whatever the problem, I wanted to resolve it quickly. In this article, I'm going to share with you the procedure that I went through to fix my hardware stability problem. Although you may not be struggling with exactly the same issue, the steps that I used to diagnose and (mostly) fix the problem are general in nature and applicable to many different types of Linux hardware problems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):81 +msgid "First, the hardware" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):84 +msgid "The first thing that crossed my mind was that I might have flaky or under-cooled hardware. On the one hand, my Diamond Viper V550 seemed to have no problems under Windows NT. On the other hand, maybe Linux was somehow pushing the chip harder and triggering heat-related lock-ups. My V550 did get <e>extremely</e> hot, and its OEM heatsink seemed at best barely adequate. The combination of the lock-ups and the fact that this card was being marginally cooled convinced me to head over to PC Power and Cooling (see <uri link=\"#resources\">Resources</uri>) to purchase a mini integrated heatsink/fan for my V550." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):96 +msgid "So, I received my Video Cool, popped off the OEM heatsink on the video card (voiding the warranty), cleaned off the TNT chip and affixed the Video Cool to the top of the chip. Verdict? My video card didn't get extremely hot anymore, but the lockups continued. The lesson I learned from this particular experience is this -- if you ensure that your system is adequately cooled to begin with, you'll never need to worry about components malfunctioning due to inadequate cooling. This in itself is a good reason to invest some time and effort in making sure that your workstations and servers run coolly. Now that I had taken care of the heat issue, I knew that the lock-ups were most likely not due to flaky hardware, and I began to look elsewhere." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):112 +msgid "New drivers -- and a possible solution?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):115 +msgid "I partly suspected that NVIDIA's drivers were themselves the cause of the problem. Fortunately , a new version of the drivers had just been released, so I immediately upgraded in the hope that this would solve my stability problem. Unfortunately, it didn't, and after checking with others on the #nvidia channel on openprojects.net, I found out that while not everyone was able to get the driver to operate stably, it was working for a lot of people." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):124 +msgid "On #nvidia, someone suggested that I make sure that the V550 wasn't sharing an IRQ with another card. Unlike the standard XFree86 driver, the accelerated NVIDIA driver requires an IRQ for proper operation. To see if it had its own dedicated IRQ, I typed <c>cat /proc/interrupts</c>, and lo and behold, my V550 was sharing an interrupt with my IDE controller. Before I explain how I solved this particular problem, I'd like to give you a brief background on IRQs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):133 +msgid "PCs use IRQs, and hardware interrupts in general, to allow peripheral devices, such as the video card and the disk controllers, to signal the CPU that they have data that's ready to be processed. In the old days before the PCI bus existed, it was critical that each device in the machine had its own, dedicated IRQ. In case you are still using ISA peripherals in your machine, this is still true -- all non-PCI devices should have their own dedicated IRQ." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):147 +msgid "IRQs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):149 +msgid "IRQs and PCI" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):152 +msgid "However, things are a little different with the PCI bus. PCI allocates four IRQs that can be used by the PCI/AGP cards in your system. In general, these IRQs <e>can</e> be shared among multiple devices. (If you do this, make sure that all the devices doing the sharing are PCI and AGP devices.) IRQ sharing is important, especially for modern machines that may have five PCIs and one AGP slot. Without IRQ sharing, you would be unable to have more than four IRQ-using cards in your system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):162 +msgid "There are, however, some limitations to PCI IRQ sharing. While modern motherboards' BIOS and Linux kernels generally support PCI IRQ sharing, certain PCI cards may simply refuse to work properly when sharing an IRQ with another device. If you're experiencing random system lockups, especially lockups that appear to be correlated with the use of a specific hardware device, you may want to try and get all your PCI devices to use their own IRQs, just to be on the safe side. The first step is to see if any devices in your system are sharing IRQs to begin with. To do this, follow these steps:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):174 +msgid "Use the various hardware devices in your system, such as disk, sound, video, SCSI, etc. This ensures that Linux will handle interrupts for these various devices." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):179 +msgid "<c>cat /proc/interrupts</c>, which will display a list and count of all interrupts which the Linux kernel has handled so far. Look in the far right column in this list. If two or more devices are listed in a single row, then they're sharing that particular IRQ." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):187 +msgid "If one of the devices in question is a non-PCI device (ISA or other legacy cards) then you've found yourself an IRQ conflict, which you can attempt to fix with your BIOS, the isapnptools package, or the physical jumpers on your peripheral cards. Note that if a device is built in to your motherboard, it is most likely a PCI device even though it doesn't occupy a physical PCI slot." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):195 +msgid "If all the devices in question are PCI or AGP devices, then whether or not you have a problem depends on your hardware. Here are some steps you can take to attempt to get all your PCI/AGP devices on their own IRQs:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):202 +msgid "Enter your system BIOS and disable any unused peripherals (USB, parallel port, etc.) This can free up several IRQs, giving each piece of hardware in use a greater chance of being assigned its own unique IRQs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):207 +msgid "Enter the PnP section of your BIOS and make sure that your BIOS is configured for a \"non-PnP\" operating system. Then select the \"Reset ESCD data\" option. This will force your BIOS to reassign IRQs to all of your hardware devices the next time you reboot." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):213 +msgid "Boot Linux, use your hardware, <c>cat /proc/interrupts</c> and look at the result. Hopefully, all your devices are now on their own IRQs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):219 +msgid "If your two suspect PCI devices are still sharing IRQs, you have two additional options. Some BIOS setup programs allow you to assign certain IRQs to specific PCI slots. If you have one of these rare BIOS setup programs, you can use this functionality to eliminate the conflict. If you don't have this option in your BIOS (most of us don't), there is one other sure fix for this problem -- shut down your machine, turn off the power, unplug your PC from the wall, and wait a few minutes. Then, open your system case and physically move your PCI cards to different slots. This option may seem a bit odd, but it will definitely work and is especially effective if you have a few free PCI slots in your system (but it may take you some time to find the correct slot for each of your cards.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):233 +msgid "I performed the \"PCI card-shuffling trick\" and was able to get all the devices in my system to use a unique IRQ. Well, almost. As you can see, two of my IDE devices still shared an IRQ:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(pre:caption):239 +msgid "IRQ sharing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(pre):239 +#, no-wrap +msgid "\n# <i>cat /proc/interrupts</i>\n CPU0\n 0: 52063600 XT-PIC timer\n 1: 616810 XT-PIC keyboard\n 2: 0 XT-PIC cascade\n 5: 89084 XT-PIC ide2, ide3\n 7: 1515741 XT-PIC eth0\n 8: 155928 XT-PIC rtc\n 9: 1139761505 XT-PIC nvidia\n 10: 164000 XT-PIC Ensoniq AudioPCI\n 12: 4458823 XT-PIC PS/2 Mouse\n 14: 664176 XT-PIC ide0\n 15: 38661 XT-PIC ide1\nNMI: 0\nERR: 0 \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):257 +msgid "However, this was normal because the ide2 and ide3 devices were integrated onto the same chip on my Promise FastTrak IDE card." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):262 +msgid "So, now that (almost) all my devices had a unique IRQ, I tried my accelerated drivers and ... still experienced a lock-up in less than an hour. Apparently, the shared PCI IRQ was not the problem at all. Oh, well ... time to look elsewhere (yet again)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):272 +msgid "Fix one problem, find another" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):275 +msgid "After some time, I found something else that I could do to get the NVIDIA drivers to run perfectly, albeit somewhat slower -- disable AGP. As much as I didn't want to do this, the current version of the drivers permitted AGP to be turned off entirely simply by adding a single line to the XF86Config. With AGP turned off, I would reduce my video to memory bandwidth by 4x, but significantly slower 3D would still be much faster than no hardware 3D acceleration at all. After disabling AGP, I <e>finally</e> had a stable system! However, this temporary solution created another problem. Whenever 3D OpenGL animation was going on, audio playback became extremely garbled and choppy. Eek!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):288 +msgid "Fortunately, I was able to find a solution to my audio problem. I used the <c>setpci</c> utility to set more appropriate PCI bus latency timer settings for my PCI devices. I'll show you the specific solution in a minute -- but first, some background." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):295 +msgid "As you probably know, the PCI bus is a shared resource -- all your PCI cards take turns communicating over the bus, and normally, all is well. However, because the PCI bus is a shared resource with a limited (although normally adequate) bandwidth, it's possible for one PCI card to negatively affect the performance of other PCI cards in the system. For example, what happens if PCI card A is in the process of sending data across the bus and at the same moment PCI card B attempts to send data? Does card A gracefully concede use of the bus, or does it continue with its data transfer -- and if so, for how long?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):311 +msgid "PCI latency" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):313 +msgid "The PCI latency timer" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):316 +msgid "The answer to this question has everything to do with a configurable setting that each PCI device has, the PCI bus latency timer. It's normally the role of the Linux driver to set the proper PCI bus latency timer value for each PCI device in your system, and most of the time the default settings are adequate (if not optimal), all the devices get along fine and the system works properly. The PCI bus latency timer can range from zero to 248. If a device has a setting of zero, then it will immediately give up the bus if another device needs to transmit. If a device has a setting of 248, it will continue to use the bus for a longer period of time before stopping, while the other device waits for its turn." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):329 +msgid "If all of your devices have relatively high PCI bus latency timer settings and a lot of data is being sent over the bus, then your PCI cards are generally going to have to wait <e>longer</e> before they gain control of the bus and can begin sending data. However, once they gain control of the bus they will be able to burst a lot of data across it before giving up the bus to another device. This is why high PCI bus latency timer settings <e>increase latency</e> (the delay in sending data across the bus), but also <e>increase effective bandwidth</e>. Because each device gets to burst large amounts of data across the bus without interruption, the PCI bus is used more efficiently and your PCI devices can transmit more data." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):342 +msgid "On the other hand, if all your PCI devices have low PCI bus latency settings, then they're going to gladly give up the bus if another card needs to transmit data. This results in a much lower data transmit latency, since no device is going to hold on to the bus for an extended period of time, causing other devices to wait. The dark side to all this is that low PCI bus latency timer settings <e>reduce</e> the effective PCI bus bandwidth when two or more PCI devices are operating simultaneously. This happens because large data bursts become much less frequent and control of the bus changes rapidly, increasing overhead." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):354 +msgid "Most Linux distributions include a suite of tools called pci-utils that allow you to view and change the latency timer settings for your PCI devices. To view your current PCI latency settings, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(pre:caption):360 +msgid "Viewing latency settings" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(pre):360 +#, no-wrap +msgid "\n# <i>lspci -v</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):364 +msgid "Typing this command will display very detailed information about all of your PCI devices. The PCI latency setting for each device is listed on the third line, right before the IRQ setting." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):373 +msgid "PCI latency approaches" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):376 +msgid "How does this relate to my garbled sound problem? Well, I was experiencing garbled sound because with my default PCI latency settings the way they were, the V550 dominated the PCI bus when performing 3D acceleration. Here is why. My V550 is an AGP 2X card, so when I turned off AGP (to increase stability), I reduced the card's bandwidth to main memory by 75%! Because my V550 now was trying to pump the same amount of data across the slower PCI bus, the PCI bus was nearing 100% utilization, and this was causing problems for my sound hardware. Audio devices are especially susceptible to PCI latency issues because they generally have small data buffers and need their audio data delivered to them on time to avoid buffer underruns. With my current settings, the V550 was using so much PCI bandwidth that there wasn't enough left to get data to my sound card, so I experienced audio distortion caused by buffer underruns." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):392 +msgid "There are two possible solutions to this problem. The first and most obvious solution would be to use the <c>setpci</c> command to reduce my V550's PCI latency timer. This would cause it to share the PCI bus more readily, allowing my other devices to transmit their data with less latency. I tried this solution using the <c>setpci</c> command and it worked. However, I decided not to go this route because I wanted to <e>maximize</e> my already crippled 3D graphics performance, not additionally hinder it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):402 +msgid "I decided to try out a second higher-performance option. Instead of reducing my V550 PCI bus latency, I increased the PCI latency of all my devices to the relatively high value of 176 (devices normally default to somewhere around 32, except for my V550 which defaulted to above 200). Then I set the PCI bus latency of my latency-sensitive devices to the maximum setting, 248. This solved the problem, as I had hoped, by allowing my sound card to burst relatively huge chunks of data across the bus in one go, allowing it to maximize its use of the bus and avoid buffer-underrun conditions. At the same time, my other devices could also transmit data in chunks that were small enough not to hog the bus, but large enough to use the bus efficiently. I was particularly pleased with this solution because I was able to solve my audio problem while at the same time increasing the effective bandwidth of my development machine's PCI bus. Here's the excerpt from my system startup scripts that did the trick:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(pre:caption):419 +msgid "Latency adjustment" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(pre):419 +#, no-wrap +msgid "\n<comment># \"open up\" the PCI bus by allowing fairly long bursts\n# for all devices, increasing performance</comment>\nsetpci -v -d *:* latency_timer=b0\n\n<comment># maximize latency timers for network and audio,\n# allowing them to transmit more data per burst,\n# preventing buffer over/underrun conditions</comment>\n\nsetpci -v -s 00:0f.0 latency_timer=ff\nsetpci -v -s 00:0e.0 latency_timer=ff\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):432 +msgid "On the first line, the <c>-d *:*</c> option tells setpci to apply this setting to all PCI devices. The <c>latency_timer=b0</c> option sets the timer to 176 (<c>b0</c> is hexadecimal for 176). The <c>-s</c> options on the last two lines specify the PCI device that will be affected by PCI bus/slot and function, rather than by vendor and device ID. These are the first numbers listed for each device when you type lspci. The <c>ff</c> value specifies a latency timer setting of 256, which is rounded down to 248 by <c>setpci</c>. If you're experiencing a PCI latency timer-related issue, you'll need to experiment with <c>lspci</c> and <c>setpci</c> to find the optimal values for your system. If your hardware can handle it, larger latency timer values are best." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):448 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):451 +msgid "I hope you've found my hardware troubleshooting as good a learning experience as I did. I'm now patiently waiting for the next release of the NVIDIA drivers. Hopefully, these will solve my AGP-related instability issues. Below are several excellent NVIDIA-related resources that may interest you." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):459 +msgid "Read Daniel's previous article in this series, <uri link=\"/doc/en/articles/hardware-stability-p1.xml\">Linux hardware stability guide, Part 1</uri>, where he shows you how to diagnose and fix CPU flakiness, as well as how to test your RAM for defects." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):465 +msgid "Check out <uri link=\"http://www.nvidia.com/Products/Drivers.nsf/Linux.html\">NVIDIA's accelerated Linux drivers</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):470 +msgid "If you're trying to diagnose a hardware problem related to your NVIDIA graphics card, be sure to check out the <uri link=\"http://www.technologyvault.co.uk/geforce/faq.php?list=categories&prog=gef&lang=en\">GeForce FAQ</uri>. It has lots of great Linux and Windows-related information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):476 +msgid "For additional NVIDIA troubleshooting information, check out Sven Vermeulen's <uri link=\"/doc/en/nvidia-guide.xml\">NVIDIA Guide</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):480 +msgid "You may want to check out the <uri link=\"http://powertweak.sourceforge.net/\">Linux Powertweak project</uri>. Powertweak allows you to configure PCI latency timer settings (among other things) using a GTK and console-based interface." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):486 +msgid "Visit <uri link=\"http://www.pcpowercooling.com/\">PC Power and Cooling</uri> to purchase things like mini integrated heatsink/fans and Video Cool." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):490 +msgid "Check out <uri link=\"http://www.tennmax.com/\">Tennmax</uri>'s Lasagna series of coolers, which from my experience have a more cooling capacity than Video Cool but run a little bit louder." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):500 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):503 +msgid "Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a contributing author of several books published by MacMillan: Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade when he was first exposed to the Logo programming language and a potentially lethal dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife Mary and his new baby daughter, Hadassah. You can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/index.xml.pot b/article/gettext/index.xml.pot new file mode 100644 index 0000000..c2134ab --- /dev/null +++ b/article/gettext/index.xml.pot @@ -0,0 +1,28 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/index.xml(title):10 +msgid "Articles" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/index.xml(p):17 +msgid "A number of our developers have written articles for the Linux community. We have republished them here for your convenience." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/index.xml(catid):27 +msgid "articles" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/index.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-afig-p8.xml.pot b/article/gettext/l-afig-p8.xml.pot new file mode 100644 index 0000000..a56fc42 --- /dev/null +++ b/article/gettext/l-afig-p8.xml.pot @@ -0,0 +1,280 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(guide:link):5 +msgid "/doc/en/articles/l-afig-p8.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):7 +msgid "Advanced filesystem implementor's guide, Part 8" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(author:title):9 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(mail:link):10 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(mail):10 +msgid "Daniel Robbins" +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(abstract):19 +msgid "With the 2.4 release of Linux come many new filesystem possibilities, including Reiserfs, XFS, GFS, and others. These filesystems sound cool, but what exactly can they do, what are they good at, and exactly how do you go about safely using them in a production Linux environment? Daniel Robbins answers these questions by showing you how to set up these new advanced filesystems under Linux 2.4. In this installment, Daniel continues his look at ext3, a new improved version of ext2 with journaling capabilities. He reveals all the inside information on ext3, and demonstrates some shockingly good ext3 data=journal interactive performance numbers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(version):31 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(date):32 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):35 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):39 +msgid "I'm going to be honest. For this article, I was planning to show you how to get ext3 up and running on your system. Although that's what I said I'd do, I'm not going to do it. Andrew Morton's excellent \"Using the ext3 filesystem in 2.4 kernels\" page (see <uri link=\"#resources\">Resources</uri> later in this article) already does a great job of explaining how to ext3-enable your system, so there's no need for me to repeat all the basics here. Instead, I'm going to delve into some meatier ext3 topics, ones that I think you'll find very useful. After you read this article, when you're ready to get ext3 up and running, head over to Andrew's page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):56 +msgid "2.4 kernel update" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):60 +msgid "First, let's start with a 2.4 kernel update. I last discussed 2.4 kernel stability when I was covering ReiserFS. Way back then, finding a stable 2.4 kernel was a challenge, and I recommended sticking with the known and at that time bleeding-edge 2.4.4-ac9 kernel -- especially for anyone planning to use the ReiserFS filesystem in a production environment. As you might guess, a lot has happened since 2.4.4-ac9, and it's definitely time to start looking at newer kernels." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):70 +msgid "With kernel 2.4.10, the 2.4 series reached a new level of performance and scalability (something that we've been anticipating for a long time). So, what happened to allow Linux 2.4 to finally grow up? In an acronym, VM. Linus, recognizing that the 2.4 series wasn't performing spectacularly, ripped out Linux's problematic VM code and replaced it with a lean and mean VM implementation from Andrea Archangeli. Andrea's new VM implementation (which first appeared in 2.4.10) was really great; it really sped up the kernel and made the entire system more responsive. 2.4.10 was definitely a major turning point in 2.4 Linux kernel development; up until then, things weren't looking very good, and many of us were wondering why we weren't FreeBSD developers. We all should thank Linus for his heroism in making such a major (but sorely needed) change in the 2.4 stable kernel series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):85 +msgid "Since Andrea's new VM code needed a bit of time to be integrated seamlessly with the rest of the kernel, use 2.4.13+. Even better, use 2.4.16+, since the rock-solid ext3 filesystem code was finally integrated into the official Linus kernel starting with the 2.4.15-pre2 release. There's no reason to avoid using 2.4.16+ kernel, and it'll make your job of getting ext3 up and running that much easier. If you do use a 2.4.16+ kernel, just remember that it's no longer necessary to apply the ext3 patch as described on Andrew's page (see <uri link=\"#resources\">Resources</uri>). Linus already added it for you. :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):96 +msgid "You'll notice that I recommend using 2.4.16+ rather than 2.4.15+, and with good reason. With the release of kernel 2.4.15-pre9, a really ugly filesystem corruption bug was introduced to the kernel. It took until 2.4.16-pre1 for the problem to be identified and fixed, resulting in a span of kernels (including 2.4.15) that should be avoided at all costs. Choosing a 2.4.16+ kernel allows you to avoid this bad batch entirely." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):110 +msgid "Laptops...beware?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):114 +msgid "Ext3 has a stellar reputation for being a rock-solid filesystem, so I was surprised to learn that quite a few laptop users were having filesystem corruption problems when they switched to ext3. In general, it's tempting to react to these kinds of reports by avoiding ext3 entirely; however, after asking around, I discovered that the disk corruption problems that people were experiencing had nothing to do with ext3 itself, but were being caused by certain laptop hard drives." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):127 +msgid "The write cache" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):130 +msgid "You may not know this, but most modern hard drives have something called a \"write cache\", used by the hard drive to collect pending write operations. By putting pending writes into a cache, the hard drive firmware can then reorder and group them so that they're written to disk in the fastest possible way. The write cache is generally considered to be a very good thing (read Linus' explanation and opinion of write caching in <uri link=\"#resources\">Resources</uri>)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):140 +msgid "Unfortunately, certain laptop hard drives now on the market have the dubious feature of ignoring any official ATA request to flush their write cache to disk. This isn't a wonderful design feature, although it has been allowed by the ATA spec up until recently. With these types of drives, there's no way for the kernel to guarantee that a particular block has actually been recorded to the disk platters. Although this sounds like a thorny problem, this particular issue by itself is probably not the cause of the data corruption problems that people have been experiencing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):151 +msgid "However, it gets worse. Some modern laptop hard drives have an even nastier habit of throwing away their write cache whenever the system is rebooted or suspended. Obviously, if a hard drive has both of these problems, it's going to regularly corrupt data, and there's nothing that Linux can do to prevent it from doing so." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):159 +msgid "So, what's the solution? If you have a laptop, tread carefully. Back up all your important files before making any major change to your filesystems. If you experience data corruption problems that seem to fit the pattern of what I described above, particularly with ext3, then remember that it may be your laptop hard drive that's at fault. In that case, you may want to contact your laptop manufacturer and inquire about getting a replacement drive. Hopefully, in a few months time, these flaky hard drives will be pulled from the market and we'll never need to worry about this issue again." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):170 +msgid "Now that I've scared you out of your minds, let's take a look at ext3's various data journaling options." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):180 +msgid "Journaling options and write latency" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):184 +msgid "Ext3 allows you to choose from one of three data journaling modes at filesystem mount time: data=writeback, data=ordered, and data=journal." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):189 +msgid "To specify a journal mode, you can add the appropriate string (data=journal, for example) to the options section of your /etc/fstab, or specify the -o data=journal command-line option when calling mount directly. If you'd like to specify the data journaling method used for your root filesystem (data=ordered is the default), you can to use a special kernel boot option called rootflags. So, if you'd like to put your root filesystem into full data journaling mode, add rootflags=data=journal to your kernel boot options." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):202 +msgid "data=writeback mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):205 +msgid "In data=writeback mode, ext3 doesn't do any form of data journaling at all, providing you with similar journaling found in the XFS, JFS, and ReiserFS filesystems (metadata only). As I explained in my <uri link=\"http://www-128.ibm.com/developerworks/linux/library/l-fs7.html\"> previous article</uri>, this could allow recently modified files to become corrupted in the event of an unexpected reboot. Despite this drawback, data=writeback mode should give you the best ext3 performance under most conditions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):219 +msgid "data=ordered mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):222 +msgid "In data=ordered mode, ext3 only officially journals metadata, but it logically groups metadata and data blocks into a single unit called a transaction. When it's time to write the new metadata out to disk, the associated data blocks are written first. data=ordered mode effectively solves the corruption problem found in data=writeback mode and most other journaled filesystems, and it does so without requiring full data journaling. In general, data=ordered ext3 filesystems perform slightly slower than data=writeback filesystems, but significantly faster than their full data journaling counterparts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):233 +msgid "When appending data to files, data=ordered mode provides all of the integrity guarantees offered by ext3's full data journaling mode. However, if part of a file is being overwritten and the system crashes, it's possible that the region being written will contain a combination of original blocks interspersed with updated blocks. This is because data=ordered provides no guarantees as to which blocks are overwritten first, so you can't assume that just because overwritten block x was updated, that overwritten block x-1 was updated as well. Instead, data=ordered leaves the write ordering up to the hard drive's write cache. In general, this limitation doesn't end up negatively impacting people very often, since file appends are generally much more common than file overwrites. For this reason, data=ordered mode is a good higher-performance replacement for full data journaling." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):251 +msgid "data=journal mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):254 +msgid "data=journal mode provides full data and metadata journaling. All new data is written to the journal first, and then to its final location. In the event of a crash, the journal can be replayed, bringing both data and metadata into a consistent state." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):261 +msgid "Theoretically, data=journal mode is the slowest journaling mode of all, since data gets written to disk twice rather than once. However, it turns out that in certain situations, data=journal mode can be blazingly fast. Andrew Morton, after hearing reports on LKML that ext3 data=journal filesystems were giving people unbelievably great interactive filesystem performance, decided to put together a little test. First, he created simple shell script designed to write data to a test filesystem as quickly as possible:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(pre:caption):271 +msgid "Rapid writing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(pre):271 +#, no-wrap +msgid "\nwhile true\ndo\n dd if=/dev/zero of=largefile bs=16384 count=131072\ndone\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):278 +msgid "While data was being written to the test filesystem, he attempted to read 16MB of data from another ext2 filesystem on the same disk, timing the results:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(pre:caption):284 +msgid "Reading a 16MB file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):288 +msgid "The results were astounding. data=journal mode allowed the 16-meg-file to be read from 9 to over 13 times faster than other ext3 modes, ReiserFS, and even ext2 (which has no journaling overhead):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):296 +msgid "Written-to-filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):297 +msgid "16-meg-read-time (seconds)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):300 +msgid "ext2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):301 +msgid "78" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):304 +msgid "ReiserFS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):305 +msgid "67" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):308 +msgid "ext3 data=ordered" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):309 +msgid "93" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):312 +msgid "ext3 data=writeback" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):313 +msgid "74" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):316 +msgid "ext3 data=journal" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):321 +msgid "Andrew repeated this test, but tried to read a 16MB file from the test filesystem (rather than a different filesystem), and he got identical results. So, what does this mean? Somehow, ext3's data=journal mode is incredibly well-suited to situations where data needs to be read from and written to disk at the same time. Therefore, ext3's data=journal mode, which was assumed to be the slowest of all ext3 modes in nearly all conditions, actually turns out to have a major performance advantage in busy environments where interactive IO performance needs to be maximized. Maybe data=journal mode isn't so sluggish after all!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):333 +msgid "Andrew is still trying to figure out exactly why data=journal mode is doing so much better than everything else. When he does, he may be able to add the necessary tweaks to the rest of ext3 so that data=writeback and data=ordered modes see some benefit as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):345 +msgid "data=journal tweaks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):349 +msgid "Some people have had a particular performance problem when using ext3's data=journal mode on busy servers -- busy NFS servers, in particular. Every thirty seconds, the server experiences a huge storm of disk-writing activity, causing the system to nearly grind to a halt. If you experience this problem, it's easy to fix. Simply type the following command as root to tweak Linux's dirty buffer-flushing algorithm:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(pre:caption):358 +msgid "Tweaking bdflush" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):362 +msgid "These new bdflush settings will cause kupdate to run every 0.6 seconds rather than every 5 seconds. In addition, they tell the kernel to flush a dirty buffer after 3 seconds rather than 30, the default. By flushing recently-modified data to disk more regularly, these write storms can be avoided. It's slightly less efficient to do things this way, since the kernel will have fewer opportunities to combine writes. But for a busy server, writes will happen more consistently, and interactive performance will be greatly improved." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):377 +msgid "Conclusion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):381 +msgid "We've now concluded our coverage of ext3. Join me in my next article as we explore the many wonders of... XFS!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):391 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(li):410 +msgid "Visit Andrew Morton's <uri link=\"http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html\">ext3 and 2.4 usage page</uri> to complete your ext3 setup." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(li):415 +msgid "Find out more about using ext3 with 2.4 kernels at Andrew Morton's <uri link=\"http://www.zip.com.au/~akpm/linux/ext3/\">ext3 for 2.4</uri> page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(li):419 +msgid "Learn more about the strange laptop hard drive corruption problems by reading <uri link=\"http://www.kerneltraffic.org/kernel-traffic/kt20011015_137.html\"> Kernel Traffic's summary</uri>." +msgstr "" + +#. <li> +#. Read a <uri link="http://olstrans.sourceforge.net/release +#. /OLS2000-ext3/OLS2000-ext3.html">complete transcript</uri> of Dr. Stephen +#. Tweedie's Ext3, Journaling Filesystem presentation, which was featured at +#. the <uri link="http://www.ottawalinuxsymposium.org">Ottawa Linux +#. Symposium</uri> in July 2000. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(li):436 +msgid "To keep abreast of the latest ext3 developments, be sure to visit the <uri link=\"https://listman.redhat.com/pipermail/ext3-users/\">ext3-users mailing list archive</uri>. Of course, you can also <uri link=\"https://listman.redhat.com/mailman/listinfo/ext3-users\"> subscribe</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-awk1.xml.pot b/article/gettext/l-awk1.xml.pot new file mode 100644 index 0000000..d3dcd71 --- /dev/null +++ b/article/gettext/l-awk1.xml.pot @@ -0,0 +1,398 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(guide:link):5 +msgid "/doc/en/articles/l-awk1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):6 +msgid "Awk by example, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(abstract):12 +msgid "Awk is a very nice language with a very strange name. In this first article of a three-part series, Daniel Robbins will quickly get your awk programming skills up to speed. As the series progresses, more advanced topics will be covered, culminating with an advanced real-world awk application demo." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(version):24 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(date):25 +msgid "2008-01-08" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):28 +msgid "An intro to the great language with the strange name" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):30 +msgid "In defense of awk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):33 +msgid "In this series of articles, I'm going to turn you into a proficient awk coder. I'll admit, awk doesn't have a very pretty or particularly \"hip\" name, and the GNU version of awk, called gawk, sounds downright weird. Those unfamiliar with the language may hear \"awk\" and think of a mess of code so backwards and antiquated that it's capable of driving even the most knowledgeable UNIX guru to the brink of insanity (causing him to repeatedly yelp \"kill -9!\" as he runs for coffee machine)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):43 +msgid "Sure, awk doesn't have a great name. But it is a great language. Awk is geared toward text processing and report generation, yet features many well-designed features that allow for serious programming. And, unlike some languages, awk's syntax is familiar, and borrows some of the best parts of languages like C, python, and bash (although, technically, awk was created before both python and bash). Awk is one of those languages that, once learned, will become a key part of your strategic coding arsenal." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):56 ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):59 +msgid "The first awk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):59 +#, no-wrap +msgid "\n$ <i>awk '{ print }' /etc/passwd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):63 +msgid "You should see the contents of your <path>/etc/passwd</path> file appear before your eyes. Now, for an explanation of what awk did. When we called awk, we specified <path>/etc/passwd</path> as our input file. When we executed awk, it evaluated the print command for each line in <path>/etc/passwd</path>, in order. All output is sent to stdout, and we get a result identical to <c>cat</c>ting <path>/etc/passwd</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):72 +msgid "Now, for an explanation of the { print } code block. In awk, curly braces are used to group blocks of code together, similar to C. Inside our block of code, we have a single print command. In awk, when a print command appears by itself, the full contents of the current line are printed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):79 +msgid "Printing the current line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):79 +#, no-wrap +msgid "\n$ <i>awk '{ print $0 }' /etc/passwd</i>\n$ <i>awk '{ print \"\" }' /etc/passwd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):84 +msgid "In awk, the $0 variable represents the entire current line, so print and print $0 do exactly the same thing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):89 +msgid "Filling the screen with some text" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):89 +#, no-wrap +msgid "\n$ <i>awk '{ print \"hiya\" }' /etc/passwd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):96 +msgid "Multiple fields" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):99 +msgid "print $1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):99 +#, no-wrap +msgid "\n$ <i>awk -F\":\" '{ print $1 $3 }' /etc/passwd</i>\nhalt7\noperator11\nroot0\nshutdown6\nsync5\nbin1\n<comment>....etc.</comment>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):110 +msgid "print $1 $3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):110 +#, no-wrap +msgid "\n$ <i>awk -F\":\" '{ print $1 \" \" $3 }' /etc/passwd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):114 +msgid "$1$3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):114 +#, no-wrap +msgid "\n$ <i>awk -F\":\" '{ print \"username: \" $1 \"\\t\\tuid:\" $3 }' /etc/passwd</i>\nusername: halt uid:7\nusername: operator uid:11\nusername: root uid:0\nusername: shutdown uid:6\nusername: sync uid:5\nusername: bin uid:1\n<comment>....etc.</comment>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):128 +msgid "External scripts" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):131 +msgid "Sample script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):131 +#, no-wrap +msgid "\nBEGIN { FS=\":\" }\n{ print $1 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):136 +msgid "The difference between these two methods has to do with how we set the field separator. In this script, the field separator is specified within the code itself (by setting the FS variable), while our previous example set FS by passing the -F\":\" option to awk on the command line. It's generally best to set the field separator inside the script itself, simply because it means you have one less command line argument to remember to type. We'll cover the FS variable in more detail later in this article." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):149 +msgid "The BEGIN and END blocks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):152 +msgid "Normally, awk executes each block of your script's code once for each input line. However, there are many programming situations where you may need to execute initialization code before awk begins processing the text from the input file. For such situations, awk allows you to define a BEGIN block. We used a BEGIN block in the previous example. Because the BEGIN block is evaluated before awk starts processing the input file, it's an excellent place to initialize the FS (field separator) variable, print a heading, or initialize other global variables that you'll reference later in the program." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):163 +msgid "Awk also provides another special block, called the END block. Awk executes this block after all lines in the input file have been processed. Typically, the END block is used to perform final calculations or print summaries that should appear at the end of the output stream." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):173 ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):176 +msgid "Regular expressions and blocks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):176 +#, no-wrap +msgid "\n/foo/ { print }\n/[0-9]+\\.[0-9]*/ { print }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):184 +msgid "Expressions and blocks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):187 +msgid "fredprint" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):187 +#, no-wrap +msgid "\n$1 == \"fred\" { print $3 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):191 +msgid "root" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):191 +#, no-wrap +msgid "\n$5 ~ /root/ { print $3 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):198 +msgid "Conditional statements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):201 ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):233 ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):237 +msgid "if" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):201 +#, no-wrap +msgid "\n{ \n if ( $5 ~ /root/ ) { \n print $3 \n }\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):209 +msgid "Both scripts function identically. In the first example, the boolean expression is placed outside the block, while in the second example, the block is executed for every input line, and we selectively perform the print command by using an if statement. Both methods are available, and you can choose the one that best meshes with the other parts of your script." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):217 +msgid "if if" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):217 +#, no-wrap +msgid "\n{\n if ( $1 == \"foo\" ) {\n if ( $2 == \"foo\" ) {\n print \"uno\"\n } else {\n print \"one\"\n }\n } else if ($1 == \"bar\" ) {\n print \"two\"\n } else {\n print \"three\"\n }\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):233 +#, no-wrap +msgid "\n! /matchme/ { print $1 $3 $4 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):237 +#, no-wrap +msgid "\n{\n if ( $0 !~ /matchme/ ) {\n print $1 $3 $4\n }\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):245 +msgid "Both scripts will output only those lines that don't contain a matchme character sequence. Again, you can choose the method that works best for your code. They both do the same thing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):251 +msgid "Printing the fields equal to foo and bar" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):251 +#, no-wrap +msgid "\n( $1 == \"foo\" ) && ( $2 == \"bar\" ) { print } \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):255 +msgid "This example will print only those lines where field one equals foo and field two equals bar." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):263 +msgid "Numeric variables!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):266 +msgid "In the BEGIN block, we initialize our integer variable x to zero. Then, each time awk encounters a blank line, awk will execute the x=x+1 statement, incrementing x. After all the lines have been processed, the END block will execute, and awk will print out a final summary, specifying the number of blank lines it found." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):277 +msgid "Stringy variables" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):280 +msgid "Sample field" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):280 +#, no-wrap +msgid "\n2.01\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):284 +msgid "1.01x$( )1.01" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):284 +#, no-wrap +msgid "\n{ print ($1^2)+1 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):288 +msgid "If you do a little experimenting, you'll find that if a particular variable doesn't contain a valid number, awk will treat that variable as a numerical zero when it evaluates your mathematical expression." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):297 +msgid "Lots of operators" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):300 +msgid "Another nice thing about awk is its full complement of mathematical operators. In addition to standard addition, subtraction, multiplication, and division, awk allows us to use the previously demonstrated exponent operator \"^\", the modulo (remainder) operator \"%\", and a bunch of other handy assignment operators borrowed from C." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):308 +msgid "These include pre- and post-increment/decrement ( i++, --foo ), add/sub/mult/div assign operators ( a+=3, b*=2, c/=2.2, d-=6.2 ). But that's not all -- we also get handy modulo/exponent assign ops as well ( a^=2, b%=4 )." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):317 +msgid "Field separators" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):320 +msgid "Awk has its own complement of special variables. Some of them allow you to fine-tune how awk functions, while others can be read to glean valuable information about the input. We've already touched on one of these special variables, FS. As mentioned earlier, this variable allows you to set the character sequence that awk expects to find between fields. When we were using <path>/etc/passwd</path> as input, FS was set to \":\". While this did the trick, FS allows us even more flexibility." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):330 +msgid "Another field separator" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):330 +#, no-wrap +msgid "\nFS=\"\\t+\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):334 +msgid "Above, we use the special \"+\" regular expression character, which means \"one or more of the previous character\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):339 +msgid "Setting FS to space" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):339 +#, no-wrap +msgid "\nFS=\"[[:space:]+]\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):343 +msgid "While this assignment will do the trick, it's not necessary. Why? Because by default, FS is set to a single space character, which awk interprets to mean \"one or more spaces or tabs.\" In this particular example, the default FS setting was exactly what you wanted in the first place!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):350 +msgid "Field separator sample" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):350 +#, no-wrap +msgid "\nFS=\"foo[0-9][0-9][0-9]\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):357 ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):360 +msgid "Number of fields" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):360 +#, no-wrap +msgid "\n{\n if ( NF > 2 ) {\n print $1 \" \" $2 \":\" $3 \n }\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):371 ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):374 +msgid "Record number" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):374 +#, no-wrap +msgid "\n{\n <comment>#skip header</comment>\n if ( NR > 10 ) {\n print \"ok, now for the real information!\"\n }\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):383 +msgid "Awk provides additional variables that can be used for a variety of purposes. We'll cover more of these variables in later articles." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):388 +msgid "We've come to the end of our initial exploration of awk. As the series continues, I'll demonstrate more advanced awk functionality, and we'll end the series with a real-world awk application. In the meantime, if you're eager to learn more, check out the resources listed below." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):400 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):402 +msgid "Useful links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(li):406 +msgid "Read Daniel's other awk articles on developerWorks: Common threads: Awk by example, <uri link=\"l-awk2.xml\">Part 2</uri> and <uri link=\"l-awk3.xml\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(li):411 +msgid "If you'd like a good old-fashioned book, O'Reilly's <uri link=\"http://www.oreilly.com/catalog/sed2/\">sed & awk, 2nd Edition</uri> is a wonderful choice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(li):416 +msgid "Be sure to check out the <uri link=\"http://www.faqs.org/faqs/computer-lang/awk/faq/\">comp.lang.awk FAQ</uri>. It also contains lots of additional awk links." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(li):422 +msgid "Patrick Hartigan's <uri link=\"http://sparky.rice.edu/~hartigan/awk.html\">awk tutorial</uri> is packed with handy awk scripts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(li):426 +msgid "<uri link=\"http://www.tasoft.com/tawk.html\">Thompson's TAWK Compiler</uri> compiles awk scripts into fast binary executables. Versions are available for Windows, OS/2, DOS, and UNIX." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(li):431 +msgid "<uri link=\"http://www.gnu.org/software/gawk/manual/gawk.html\">The GNU Awk User's Guide</uri> is available for online reference." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-awk2.xml.pot b/article/gettext/l-awk2.xml.pot new file mode 100644 index 0000000..34ae892 --- /dev/null +++ b/article/gettext/l-awk2.xml.pot @@ -0,0 +1,540 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(guide:link):5 +msgid "/doc/en/articles/l-awk2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):6 +msgid "Awk by example, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(abstract):12 +msgid "In this sequel to his previous intro to awk, Daniel Robbins continues to explore awk, a great language with a strange name. Daniel will show you how to handle multi-line records, use looping constructs, and create and use awk arrays. By the end of this article, you'll be well versed in a wide range of awk features, and you'll be ready to write your own powerful awk scripts." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(version):25 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(date):26 +msgid "2005-10-31" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):29 +msgid "Records, loops, and arrays" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):31 +msgid "Multi-line records" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):34 +msgid "Awk is an excellent tool for reading in and processing structured data, such as the system's <path>/etc/passwd</path> file. <path>/etc/passwd</path> is the UNIX user database, and is a colon-delimited text file, containing a lot of important information, including all existing user accounts and user IDs, among other things. In <uri link=\"/doc/en/articles/l-awk1.xml\">my previous article</uri>, I showed you how awk could easily parse this file. All we had to do was to set the FS (field separator) variable to \":\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):44 +msgid "By setting the FS variable correctly, awk can be configured to parse almost any kind of structured data, as long as there is one record per line. However, just setting FS won't do us any good if we want to parse a record that exists over multiple lines. In these situations, we also need to modify the RS record separator variable. The RS variable tells awk when the current record ends and a new record begins." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):53 +msgid "As an example, let's look at how we'd handle the task of processing an address list of Federal Witness Protection Program participants:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):58 +msgid "Sample entry from Federal Witness Protection Program participants list" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):58 +#, no-wrap +msgid "\nJimmy the Weasel\n100 Pleasant Drive\nSan Francisco, CA 12345\n\nBig Tony\n200 Incognito Ave.\nSuburbia, WA 67890\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):68 +msgid "Ideally, we'd like awk to recognize each 3-line address as an individual record, rather than as three separate records. It would make our code a lot simpler if awk would recognize the first line of the address as the first field ($1), the street address as the second field ($2), and the city, state, and zip code as field $3. The following code will do just what we want:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):76 +msgid "Making one field from the address" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):76 +#, no-wrap +msgid "\nBEGIN {\n FS=\"\\n\"\n RS=\"\"\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):83 +msgid "Above, setting FS to \"\\n\" tells awk that each field appears on its own line. By setting RS to \"\", we also tell awk that each address record is separated by a blank line. Once awk knows how the input is formatted, it can do all the parsing work for us, and the rest of the script is simple. Let's look at a complete script that will parse this address list and print out each address record on a single line, separating each field with a comma." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):92 +msgid "Complete script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):92 +#, no-wrap +msgid "\nBEGIN {\n FS=\"\\n\"\n RS=\"\"\n}\n{ print $1 \", \" $2 \", \" $3 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):101 +msgid "If this script is saved as <path>address.awk</path>, and the address data is stored in a file called <path>address.txt</path>, you can execute this script by typing <c>awk -f address.awk address.txt</c>. This code produces the following output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):108 +msgid "The script's output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):108 +#, no-wrap +msgid "\nJimmy the Weasel, 100 Pleasant Drive, San Francisco, CA 12345\nBig Tony, 200 Incognito Ave., Suburbia, WA 67890\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):116 +msgid "OFS and ORS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):119 +msgid "In address.awk's print statement, you can see that awk concatenates (joins) strings that are placed next to each other on a line. We used this feature to insert a comma and a space (\", \") between the three address fields that appeared on the line. While this method works, it's a bit ugly looking. Rather than inserting literal \", \" strings between our fields, we can have awk do it for us by setting a special awk variable called OFS. Take a look at this code snippet." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):128 +msgid "Sample code snippet" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):128 +#, no-wrap +msgid "\nprint \"Hello\", \"there\", \"Jim!\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):132 +msgid "The commas on this line are not part of the actual literal strings. Instead, they tell awk that \"Hello\", \"there\", and \"Jim!\" are separate fields, and that the OFS variable should be printed between each string. By default, awk produces the following output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):139 +msgid "Output produced by awk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):139 +#, no-wrap +msgid "\nHello there Jim!\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):143 +msgid "This shows us that by default, OFS is set to \" \", a single space. However, we can easily redefine OFS so that awk will insert our favorite field separator. Here's a revised version of our original <path>address.awk</path> program that uses OFS to output those intermediate \", \" strings:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):150 +msgid "Redefining OFS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):150 +#, no-wrap +msgid "\nBEGIN {\n FS=\"\\n\"\n RS=\"\"\n OFS=\", \"\n}\n{ print $1, $2, $3 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):159 +msgid "Awk also has a special variable called ORS, called the \"output record separator\". By setting ORS, which defaults to a newline (\"\\n\"), we can control the character that's automatically printed at the end of a print statement. The default ORS value causes awk to output each new print statement on a new line. If we wanted to make the output double-spaced, we would set ORS to \"\\n\\n\". Or, if we wanted records to be separated by a single space (and no newline), we would set ORS to \" \"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):172 +msgid "Multi-line to tabbed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):175 +msgid "Let's say that we wrote a script that converted our address list to a single-line per record, tab-delimited format for import into a spreadsheet. After using a slightly modified version of <path>address.awk</path>, it would become clear that our program only works for three-line addresses. If awk encountered the following address, the fourth line would be thrown away and not printed:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):184 +msgid "Sample entry" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):184 +#, no-wrap +msgid "\nCousin Vinnie\nVinnie's Auto Shop\n300 City Alley\nSosueme, OR 76543\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):191 +msgid "To handle situations like this, it would be good if our code took the number of records per field into account, printing each one in order. Right now, the code only prints the first three fields of the address. Here's some code that does what we want:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):198 +msgid "Improved code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):198 +#, no-wrap +msgid "\nBEGIN { \n FS=\"\\n\" \n RS=\"\" \n ORS=\"\" \n} \n \n{ \n x=1 \n while ( x<NF ) { \n print $x \"\\t\" \n x++ \n } \n print $NF \"\\n\" \n} \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):215 +msgid "First, we set the field separator FS to \"\\n\" and the record separator RS to \"\" so that awk parses the multi-line addresses correctly, as before. Then, we set the output record separator ORS to \"\", which will cause the print statement to not output a newline at the end of each call. This means that if we want any text to start on a new line, we need to explicitly write print \"\\n\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):223 +msgid "In the main code block, we create a variable called x that holds the number of current field that we're processing. Initially, it's set to 1. Then, we use a while loop (an awk looping construct identical to that found in the C language) to iterate through all but the last record, printing the record and a tab character. Finally, we print the last record and a literal newline; again, since ORS is set to \"\", print won't output newlines for us. Program output looks like this, which is exactly what we wanted:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):233 +msgid "Our intended output. Not pretty, but tab delimited for easy import into a spreadsheet" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):233 +#, no-wrap +msgid "\nJimmy the Weasel 100 Pleasant Drive San Francisco, CA 12345 \nBig Tony 200 Incognito Ave. Suburbia, WA 67890\nCousin Vinnie Vinnie's Auto Shop 300 City Alley Sosueme, OR 76543\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):242 +msgid "Looping constructs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):245 +msgid "We've already seen awk's while loop construct, which is identical to its C counterpart. Awk also has a \"do...while\" loop that evaluates the condition at the end of the code block, rather than at the beginning like a standard while loop. It's similar to \"repeat...until\" loops that can be found in other languages. Here's an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):253 +msgid "do...while example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):253 +#, no-wrap +msgid "\n{\n count=1\n do {\n print \"I get printed at least once no matter what\" \n } while ( count != 1 )\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):262 +msgid "Because the condition is evaluated after the code block, a \"do...while\" loop, unlike a normal while loop, will always execute at least once. On the other hand, a normal while loop will never execute if its condition is false when the loop is first encountered." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):272 +msgid "for loops" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):275 +msgid "Awk allows you to create for loops, which like while loops are identical to their C counterpart:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):280 +msgid "Example loop" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):280 +#, no-wrap +msgid "\nfor ( initial assignment; comparison; increment ) {\n code block\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):286 +msgid "Here's a quick example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):290 +msgid "Quick example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):290 +#, no-wrap +msgid "\nfor ( x = 1; x <= 4; x++ ) {\n print \"iteration\",x\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):296 +msgid "This snippet will print:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):300 +msgid "Output of the above snippet" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):300 +#, no-wrap +msgid "\niteration 1\niteration 2\niteration 3\niteration 4\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):310 +msgid "Break and continue" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):313 +msgid "Again, just like C, awk provides break and continue statements. These statements provide better control over awk's various looping constructs. Here's a code snippet that desperately needs a break statement:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):319 +msgid "Code snippet needing a break statement" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):319 +#, no-wrap +msgid "\nwhile (1) {\n print \"forever and ever...\"\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):325 +msgid "Because 1 is always true, this while loop runs forever. Here's a loop that only executes ten times:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):330 +msgid "Loop that executes only 10 times" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):330 +#, no-wrap +msgid "\nx=1\nwhile(1) {\n print \"iteration\",x\n if ( x == 10 ) {\n break\n }\n x++\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):341 +msgid "Here, the break statement is used to \"break out\" of the innermost loop. \"break\" causes the loop to immediately terminate and execution to continue at the line after the loop's code block." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):347 +msgid "The continue statement complements break, and works like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):351 +msgid "The continues statement complementing break" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):351 +#, no-wrap +msgid "\nx=1\nwhile (1) {\n if ( x == 4 ) {\n x++\n continue\n }\n print \"iteration\",x\n if ( x > 20 ) {\n break\n }\n x++\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):366 +msgid "This code will print \"iteration 1\" through \"iteration 21\", except for \"iteration 4\". If iteration equals 4, x is incremented and the continue statement is called, which immediately causes awk to start to the next loop iteration without executing the rest of the code block. The continue statement works for every kind of awk iterative loop, just as break does. When used in the body of a for loop, continue will cause the loop control variable to be automatically incremented. Here's an equivalent for loop:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):376 +msgid "Equivalent for loop" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):376 +#, no-wrap +msgid "\nfor ( x=1; x<=21; x++ ) {\n if ( x == 4 ) {\n continue\n }\n print \"iteration\",x\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):385 +msgid "It wasn't necessary to increment x just before calling continue as it was in our while loop, since the for loop increments x automatically." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):393 +msgid "Arrays" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):396 +msgid "You'll be pleased to know that awk has arrays. However, under awk, it's customary to start array indices at 1, rather than 0:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):401 +msgid "Sample awk arrays" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):401 +#, no-wrap +msgid "\nmyarray[1]=\"jim\"\nmyarray[2]=456\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):406 +msgid "When awk encounters the first assignment, myarray is created and the element myarray[1] is set to \"jim\". After the second assignment is evaluated, the array has two elements." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):412 +msgid "Once defined, awk has a handy mechanism to iterate over the elements of an array, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):417 +msgid "Iterating over arrays" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):417 +#, no-wrap +msgid "\nfor ( x in myarray ) {\n print myarray[x]\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):423 +msgid "This code will print out every element in the array myarray. When you use this special \"in\" form of a for loop, awk will assign every existing index of myarray to x (the loop control variable) in turn, executing the loop's code block once after each assignment. While this is a very handy awk feature, it does have one drawback -- when awk cycles through the array indices, it doesn't follow any particular order. That means that there's no way for us to know whether the output of above code will be:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):433 +msgid "Output of above code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):433 +#, no-wrap +msgid "\njim\n456\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):438 +msgid "or" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):442 +msgid "Other output of above code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):442 +#, no-wrap +msgid "\n456\njim\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):447 +msgid "To loosely paraphrase Forrest Gump, iterating over the contents of an array is like a box of chocolates -- you never know what you're going to get. This has something to do with the \"stringiness\" of awk arrays, which we'll now take a look at." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):457 +msgid "Array index stringiness" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):460 +msgid "<uri link=\"/doc/en/articles/l-awk1.xml\">In my previous article</uri>, I showed you that awk actually stores numeric values in a string format. While awk performs the necessary conversions to make this work, it does open the door for some odd-looking code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):467 +msgid "Odd looking code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):467 +#, no-wrap +msgid "\na=\"1\"\nb=\"2\"\nc=a+b+3\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):473 +msgid "After this code executes, c is equal to 6. Since awk is \"stringy\", adding strings \"1\" and \"2\" is functionally no different than adding the numbers 1 and 2. In both cases, awk will successfully perform the math. Awk's \"stringy\" nature is pretty intriguing -- you may wonder what happens if we use string indexes for arrays. For instance, take the following code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):481 +msgid "Sample code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):481 +#, no-wrap +msgid "\nmyarr[\"1\"]=\"Mr. Whipple\"\nprint myarr[\"1\"]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):486 +msgid "As you might expect, this code will print \"Mr. Whipple\". But how about if we drop the quotes around the second \"1\" index?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):491 +msgid "Dropping the qoutes code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):491 +#, no-wrap +msgid "\nmyarr[\"1\"]=\"Mr. Whipple\"\nprint myarr[1]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):497 +msgid "Guessing the result of this code snippet is a bit more difficult. Does awk consider myarr[\"1\"] and myarr[1] to be two separate elements of the array, or do they refer to the same element? The answer is that they refer to the same element, and awk will print \"Mr. Whipple\", just as in the first code snippet. Although it may seem strange, behind the scenes awk has been using string indexes for its arrays all this time!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):506 +msgid "After learning this strange fact, some of us may be tempted to execute some wacky code that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):511 +msgid "Wacky code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):511 +#, no-wrap +msgid "\nmyarr[\"name\"]=\"Mr. Whipple\"\nprint myarr[\"name\"]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):516 +msgid "Not only does this code not raise an error, but it's functionally identical to our previous examples, and will print \"Mr. Whipple\" just as before! As you can see, awk doesn't limit us to using pure integer indexes; we can use string indexes if we want to, without creating any problems. Whenever we use non-integer array indices like myarr[\"name\"], we're using associative arrays. Technically, awk isn't doing anything different behind the scenes than when we use a string index (since even if you use an \"integer\" index, awk still treats it as a string). However, you should still call 'em associative arrays -- it sounds cool and will impress your boss. The stringy index thing will be our little secret. ;)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):532 +msgid "Array tools" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):535 +msgid "When it comes to arrays, awk gives us a lot of flexibility. We can use string indexes, and we aren't required to have a continuous numeric sequence of indices (for example, we can define myarr[1] and myarr[1000], but leave all other elements undefined). While all this can be very helpful, in some circumstances it can create confusion. Fortunately, awk offers a couple of handy features to help make arrays more manageable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):544 +msgid "First, we can delete array elements. If you want to delete element 1 of your array fooarray, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):549 +msgid "Deleting array elements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):549 +#, no-wrap +msgid "\ndelete fooarray[1]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):553 +msgid "And, if you want to see if a particular array element exists, you can use the special \"in\" boolean operator as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):558 +msgid "Checking if a particular array element exists" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):558 +#, no-wrap +msgid "\nif ( 1 in fooarray ) {\n print \"Ayep! It's there.\"\n} else {\n print \"Nope! Can't find it.\"\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):569 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):572 +msgid "We've covered a lot of ground in this article. Next time, I'll round out your awk knowledge by showing you how to use awk's math and string functions and how to create your own functions. I'll also walk you through the creation of a checkbook balancing program. Until then, I encourage you to write some of your own awk programs, and to check out the following resources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):585 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(li):590 +msgid "Read Daniel's other awk articles on developerWorks: Common threads: Awk by example, <uri link=\"l-awk1.xml\">Part 1</uri> and <uri link=\"l-awk3.xml\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(li):595 +msgid "If you'd like a good old-fashioned book, O'Reilly's <uri link=\"http://www.oreilly.com/catalog/sed2/\">sed & awk, 2nd Edition</uri> is a wonderful choice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(li):600 +msgid "Be sure to check out the <uri link=\"http://www.faqs.org/faqs/computer-lang/awk/faq/\">comp.lang.awk FAQ</uri>. It also contains lots of additional awk links." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(li):605 +msgid "Patrick Hartigan's <uri link=\"http://sparky.rice.edu/~hartigan/awk.html\">awk tutorial</uri> is packed with handy awk scripts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(li):609 +msgid "<uri link=\"http://www.tasoft.com/tawk.html\">Thompson's TAWK Compiler</uri> compiles awk scripts into fast binary executables. Versions are available for Windows, OS/2, DOS, and UNIX." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(li):614 +msgid "<uri link=\"http://www.gnu.org/software/gawk/manual/gawk.html\">The GNU Awk User's Guide</uri> is available for online reference." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-awk3.xml.pot b/article/gettext/l-awk3.xml.pot new file mode 100644 index 0000000..d452b55 --- /dev/null +++ b/article/gettext/l-awk3.xml.pot @@ -0,0 +1,587 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(guide:link):5 +msgid "/doc/en/articles/l-awk3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):6 +msgid "Awk by example, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(abstract):12 +msgid "In this conclusion to the awk series, Daniel introduces you to awk's important string functions, and then shows you how to write a complete checkbook-balancing program from scratch. Along the way, you'll learn how to write your own functions and use awk's multidimensional arrays. By the end of this article, you'll have even more awk experience, allowing you to create more powerful scripts." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(version):26 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(date):27 +msgid "2005-10-31" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):30 +msgid "String functions and ... checkbooks?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):32 +msgid "Formatting output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):35 +msgid "While awk's print statement does do the job most of the time, sometimes more is needed. For those times, awk offers two good old friends called printf() and sprintf(). Yes, these functions, like so many other awk parts, are identical to their C counterparts. printf() will print a formatted string to stdout, while sprintf() returns a formatted string that can be assigned to a variable. If you're not familiar with printf() and sprintf(), an introductory C text will quickly get you up to speed on these two essential printing functions. You can view the printf() man page by typing \"man 3 printf\" on your Linux system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):46 +msgid "Here's some sample awk sprintf() and printf() code. As you can see, everything looks almost identical to C." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):51 +msgid "Sample awk sprintf() and printf() code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):51 +#, no-wrap +msgid "\nx=1\nb=\"foo\"\nprintf(\"%s got a %d on the last test\\n\",\"Jim\",83)\nmyout=(\"%s-%d\",b,x)\nprint myout\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):59 +msgid "This code will print:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):63 +msgid "Code output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):63 +#, no-wrap +msgid "\nJim got a 83 on the last test\nfoo-1\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):71 +msgid "String functions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):74 +msgid "Awk has a plethora of string functions, and that's a good thing. In awk, you really need string functions, since you can't treat a string as an array of characters as you can in other languages like C, C++, and Python. For example, if you execute the following code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):81 ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):287 +msgid "Example code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):81 +#, no-wrap +msgid "\nmystring=\"How are you doing today?\"\nprint mystring[3]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):86 +msgid "You'll receive an error that looks something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):90 +msgid "Example code error" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):90 +#, no-wrap +msgid "\nawk: string.gawk:59: fatal: attempt to use scalar as array\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):94 +msgid "Oh, well. While not as convenient as Python's sequence types, awk's string functions get the job done. Let's take a look at them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):99 +msgid "First, we have the basic length() function, which returns the length of a string. Here's how to use it:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):104 +msgid "length() function example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):104 +#, no-wrap +msgid "\nprint length(mystring)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):108 +msgid "This code will print the value:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):112 +msgid "Printed value" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):112 +#, no-wrap +msgid "\n24\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):116 +msgid "OK, let's keep going. The next string function is called index, and will return the position of the occurrence of a substring in another string, or it will return 0 if the string isn't found. Using mystring, we can call it this way:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):122 +msgid "index() funtion example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):122 +#, no-wrap +msgid "\nprint index(mystring,\"you\")\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):126 +msgid "Awk prints:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):130 +msgid "Function output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):130 +#, no-wrap +msgid "\n9\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):134 +msgid "We move on to two more easy functions, tolower() and toupper(). As you might guess, these functions will return the string with all characters converted to lowercase or uppercase respectively. Notice that tolower() and toupper() return the new string, and don't modify the original. This code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):141 +msgid "Converting strings to lower or uppercase" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):141 +#, no-wrap +msgid "\nprint tolower(mystring)\nprint toupper(mystring)\nprint mystring\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):147 +msgid "....will produce this output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):151 +msgid "Output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):151 +#, no-wrap +msgid "\nhow are you doing today?\nHOW ARE YOU DOING TODAY?\nHow are you doing today?\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):157 +msgid "So far so good, but how exactly do we select a substring or even a single character from a string? That's where substr() comes in. Here's how to call substr():" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):163 +msgid "substr() function example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):163 +#, no-wrap +msgid "\nmysub=substr(mystring,startpos,maxlen)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):167 +msgid "mystring should be either a string variable or a literal string from which you'd like to extract a substring. startpos should be set to the starting character position, and maxlen should contain the maximum length of the string you'd like to extract. Notice that I said maximum length; if length(mystring) is shorter than startpos+maxlen, your result will be truncated. substr() won't modify the original string, but returns the substring instead. Here's an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):176 +msgid "Another example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):176 +#, no-wrap +msgid "\nprint substr(mystring,9,3)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):180 ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):211 +msgid "Awk will print:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):184 +msgid "What awk prints" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):184 +#, no-wrap +msgid "\nyou\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):188 +msgid "If you regularly program in a language that uses array indices to access parts of a string (and who doesn't), make a mental note that substr() is your awk substitute. You'll need to use it to extract single characters and substrings; because awk is a string-based language, you'll be using it often." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):195 +msgid "Now, we move on to some meatier functions, the first of which is called match(). match() is a lot like index(), except instead of searching for a substring like index() does, it searches for a regular expression. The match() function will return the starting position of the match, or zero if no match is found. In addition, match() will set two variables called RSTART and RLENGTH. RSTART contains the return value (the location of the first match), and RLENGTH specifies its span in characters (or -1 if no match was found). Using RSTART, RLENGTH, substr(), and a small loop, you can easily iterate through every match in your string. Here's an example match() call:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):207 +msgid "Example match() call" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):207 +#, no-wrap +msgid "\nprint match(mystring,/you/), RSTART, RLENGTH\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):215 +msgid "Above function output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):215 +#, no-wrap +msgid "\n9 9 3\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):222 +msgid "String substitution" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):225 +msgid "Now, we're going to look at a couple of string substitution functions, sub() and gsub(). These guys differ slightly from the functions we've looked at so far in that they actually modify the original string. Here's a template that shows how to call sub():" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):232 +msgid "sub() function template" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):232 +#, no-wrap +msgid "\nsub(regexp,replstring,mystring)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):236 +msgid "When you call sub(), it'll find the first sequence of characters in mystring that matches regexp, and it'll replace that sequence with replstring. sub() and gsub() have identical arguments; the only way they differ is that sub() will replace the first regexp match (if any), and gsub() will perform a global replace, swapping out all matches in the string. Here's an example sub() and gsub() call:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):245 +msgid "Sample both sub() and gsub() function call" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):245 +#, no-wrap +msgid "\nsub(/o/,\"O\",mystring)\nprint mystring\nmystring=\"How are you doing today?\"\ngsub(/o/,\"O\",mystring)\nprint mystring\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):253 +msgid "We had to reset mystring to its original value because the first sub() call modified mystring directly. When executed, this code will cause awk to output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):258 +msgid "awk output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):258 +#, no-wrap +msgid "\nHOw are you doing today?\nHOw are yOu dOing tOday?\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):263 +msgid "Of course, more complex regular expressions are possible. I'll leave it up to you to test out some complicated regexps." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):268 +msgid "We wrap up our string function coverage by introducing you to a function called split(). split()'s job is to \"chop up\" a string and place the various parts into an integer-indexed array. Here's an example split() call:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):274 +msgid "Example split() call" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):274 +#, no-wrap +msgid "\nnumelements=split(\"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec\",mymonths,\",\")\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):278 +msgid "When calling split(), the first argument contains the literal string or string variable to be chopped. In the second argument, you should specify the name of the array that split() will stuff the chopped parts into. In the third element, specify the separator that will be used to chop the strings up. When split() returns, it'll return the number of string elements that were split. split() assigns each one to an array index starting with one, so the following code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):287 +#, no-wrap +msgid "\nprint mymonths[1],mymonths[numelements]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):291 +msgid "....will print:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):295 +msgid "Example output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):295 +#, no-wrap +msgid "\nJan Dec\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):302 +msgid "Special string forms" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):305 +msgid "A quick note -- when calling length(), sub(), or gsub(), you can drop the last argument and awk will apply the function call to $0 (the entire current line). To print the length of each line in a file, use this awk script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):311 +msgid "Code printing the length of every line in a file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):311 +#, no-wrap +msgid "\n{\n print length() \n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):320 +msgid "Financial fun" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):323 +msgid "A few weeks ago, I decided to write my own checkbook balancing program in awk. I decided that I'd like to have a simple tab-delimited text file into which I can enter my most recent deposits and withdrawals. The idea was to hand this data to an awk script that would automatically add up all the amounts and tell me my balance. Here's how I decided to record all my transactions into my \"ASCII checkbook\":" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):332 +msgid "ASCII checkbox to record transactions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):332 +#, no-wrap +msgid "\n\n23 Aug 2000 food - - Y Jimmy's Buffet 30.25\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):337 +msgid "Every field in this file is separated by one or more tabs. After the date (field 1, $1), there are two fields called \"expense category\" and \"income category\". When I'm entering an expense like on the above line, I put a four-letter nickname in the exp field, and a \"-\" (blank entry) in the inc field. This signifies that this particular item is a \"food expense\" :) Here's what a deposit looks like:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):346 +msgid "Deposit sample entry" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):346 +#, no-wrap +msgid "\n\n23 Aug 2000 - inco - Y Boss Man 2001.00\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):351 +msgid "In this case, I put a \"-\" (blank) in the exp category, and put \"inco\" in the inc category. \"inco\" is my nickname for generic (paycheck-style) income. Using category nicknames allows me to generate a breakdown of my income and expenditures by category. As far as the rest of the records, all the other fields are fairly self-explanatory. The cleared? field (\"Y\" or \"N\") records whether the transaction has been posted to my account; beyond that, there's a transaction description, and a positive dollar amount." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):361 +msgid "The algorithm used to compute the current balance isn't too hard. Awk simply needs to read in each line, one by one. If an expense category is listed but there is no income category (it's \"-\"), then this item is a debit. If an income category is listed, but no expense category (\"-\") is there, then the dollar amount is a credit. And, if there is both an expense and income category listed, then this amount is a \"category transfer\"; that is, the dollar amount will be subtracted from the expense category and added to the income category. Again, all these categories are virtual, but are very useful for tracking income and expenditures, as well as for budgeting." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):376 +msgid "The code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):379 +msgid "Time to look at the code. We'll start off with the first line, the BEGIN block and a function definition:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):384 +msgid "Balance, part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):384 +#, no-wrap +msgid "\n#!/usr/bin/env awk -f\nBEGIN {\n FS=\"\\t+\"\n months=\"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec\"\n}\n\nfunction monthdigit(mymonth) {\n return (index(months,mymonth)+3)/4\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):396 +msgid "Adding the first \"#!...\" line to any awk script will allow it to be directly executed from the shell, provided that you \"chmod +x myscript\" first. The remaining lines define our BEGIN block, which gets executed before awk starts processing our checkbook file. We set FS (the field separator) to \"\\t+\", which tells awk that the fields will be separated by one or more tabs. In addition, we define a string called months that's used by our monthdigit() function, which appears next." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):406 +msgid "The last three lines show you how to define your own awk function. The format is simple -- type \"function\", then the function name, and then the parameters separated by commas, inside parentheses. After this, a \"{ }\" code block contains the code that you'd like this function to execute. All functions can access global variables (like our months variable). In addition, awk provides a \"return\" statement that allows the function to return a value, and operates similarly to the \"return\" found in C, Python, and other languages. This particular function converts a month name in a 3-letter string format into its numeric equivalent. For example, this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):418 +msgid "monthdigit() sample call" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):418 +#, no-wrap +msgid "\nprint monthdigit(\"Mar\")\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):422 +msgid "....will print this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):426 +msgid "monthdigit() sample output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):426 +#, no-wrap +msgid "\n3\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):430 +msgid "Now, let's move on to some more functions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):437 +msgid "Financial functions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):440 +msgid "Here are three more functions that perform the bookkeeping for us. Our main code block, which we'll see soon, will process each line of the checkbook file sequentially, calling one of these functions so that the appropriate transactions are recorded in an awk array. There are three basic kinds of transactions, credit (doincome), debit (doexpense) and transfer (dotransfer). You'll notice that all three functions accept one argument, called mybalance. mybalance is a placeholder for a two-dimensional array, which we'll pass in as an argument. Up until now, we haven't dealt with two-dimensional arrays; however, as you can see below, the syntax is quite simple. Just separate each dimension with a comma, and you're in business." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):453 +msgid "We'll record information into \"mybalance\" as follows. The first dimension of the array ranges from 0 to 12, and specifies the month, or zero for the entire year. Our second dimension is a four-letter category, like \"food\" or \"inco\"; this is the actual category we're dealing with. So, to find the entire year's balance for the food category, you'd look in mybalance[0,\"food\"]. To find June's income, you'd look in mybalance[6,\"inco\"]." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):462 +msgid "Finding out information about incomes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):462 +#, no-wrap +msgid "\n \nfunction doincome(mybalance) {\n mybalance[curmonth,$3] += amount\n mybalance[0,$3] += amount \n}\n\nfunction doexpense(mybalance) {\n mybalance[curmonth,$2] -= amount\n mybalance[0,$2] -= amount \n}\n\nfunction dotransfer(mybalance) {\n mybalance[0,$2] -= amount\n mybalance[curmonth,$2] -= amount\n mybalance[0,$3] += amount\n mybalance[curmonth,$3] += amount\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):482 +msgid "When doincome() or any of the other functions are called, we record the transaction in two places -- mybalance[0,category] and mybalance[curmonth, category], the entire year's category balance and the current month's category balance, respectively. This allows us to easily generate either an annual or monthly breakdown of income/expenditures later on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):490 +msgid "If you look at these functions, you'll notice that the array referenced by mybalance is passed in by reference. In addition, we also refer to several global variables: curmonth, which holds the numeric value of the month of the current record, $2 (the expense category), $3 (the income category), and amount ($7, the dollar amount). When doincome() and friends are called, all these variables have already been set correctly for the current record (line) being processed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):503 +msgid "The main block" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):506 +msgid "Here's the main code block that contains the code that parses each line of input data. Remember, because we have set FS correctly, we can refer to the first field as $1, the second field as $2, etc. When doincome() and friends are called, the functions can access the current values of curmonth, $2, $3 and amount from inside the function. Take a look at the code and meet me on the other side for an explanation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):515 +msgid "Balance, part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):515 +#, no-wrap +msgid "\n \n{\n curmonth=monthdigit(substr($1,4,3))\n amount=$7\n \n #record all the categories encountered\n if ( $2 != \"-\" )\n globcat[$2]=\"yes\"\n if ( $3 != \"-\" )\n globcat[$3]=\"yes\"\n\n #tally up the transaction properly\n if ( $2 == \"-\" ) {\n if ( $3 == \"-\" ) {\n print \"Error: inc and exp fields are both blank!\"\n exit 1\n } else {\n #this is income\n doincome(balance)\n if ( $5 == \"Y\" )\n doincome(balance2)\n }\n } else if ( $3 == \"-\" ) {\n #this is an expense \n doexpense(balance)\n if ( $5 == \"Y\" ) \n doexpense(balance2)\n } else {\n #this is a transfer\n dotransfer(balance)\n if ( $5 == \"Y\" ) \n dotransfer(balance2)\n } \n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):552 +msgid "In the main block, the first two lines set curmonth to an integer between 1 and 12, and set amount to field 7 (to make the code easier to understand). Then, we have four interesting lines, where we write values into an array called globcat. globcat, or the global categories array, is used to record all those categories encountered in the file -- \"inco\", \"misc\", \"food\", \"util\", etc. For example, if $2 == \"inco\", we set globcat[\"inco\"] to \"yes\". Later on, we can iterate through our list of categories with a simple \"for (x in globcat)\" loop." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):562 +msgid "On the next twenty or so lines, we analyze fields $2 and $3, and record the transaction appropriately. If $2==\"-\" and $3!=\"-\", we have some income, so we call doincome(). If the situation is reversed, we call doexpense(); and if both $2 and $3 contain categories, we call dotransfer(). Each time, we pass the \"balance\" array to these functions so that the appropriate data is recorded there." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):571 +msgid "You'll also notice several lines that say \"if ( $5 == \"Y\" ), record that same transaction in balance2\". What exactly are we doing here? You'll recall that $5 contains either a \"Y\" or a \"N\", and records whether the transaction has been posted to the account. Because we record the transaction to balance2 only if the transaction has been posted, balance2 will contain the actual account balance, while \"balance\" will contain all transactions, whether they have been posted or not. You can use balance2 to verify your data entry (since it should match with your current account balance according to your bank), and use \"balance\" to make sure that you don't overdraw your account (since it will take into account any checks you have written that have not yet been cashed)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):587 +msgid "Generating the report" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):590 +msgid "After the main block repeatedly processes each input record, we now have a fairly comprehensive record of debits and credits broken down by category and by month. Now, all we need to do is define an END block that will generate a report, in this case a modest one:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):597 +msgid "Generating final report" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):597 +#, no-wrap +msgid "\nEND {\n bal=0\n bal2=0 \n for (x in globcat) {\n bal=bal+balance[0,x]\n bal2=bal2+balance2[0,x] \n }\n printf(\"Your available funds: %10.2f\\n\", bal)\n printf(\"Your account balance: %10.2f\\n\", bal2) \n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):610 +msgid "This report prints out a summary that looks something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):614 +msgid "Final report" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):614 +#, no-wrap +msgid "\nYour available funds: 1174.22\nYour account balance: 2399.33\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):619 +msgid "In our END block, we used the \"for (x in globcat)\" construct to iterate through every category, tallying up a master balance based on all the transactions recorded. We actually tally up two balances, one for available funds, and another for the account balance. To execute the program and process your own financial goodies that you've entered into a file called <path>mycheckbook.txt</path>, put all the above code into a text file called <path>balance</path> and done <c>chmod +x balance</c>, and then type \"<c>./balance mycheckbook.txt</c>\". The balance script will then add up all your transactions and print out a two-line balance summary for you." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):634 +msgid "Upgrades" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):637 +msgid "I use a more advanced version of this program to manage my personal and business finances. My version (which I couldn't include here due to space limitations) prints out a monthly breakdown of income and expenses, including annual totals, net income and a bunch of other stuff. Even better, it outputs the data in HTML format, so that I can view it in a Web browser :) If you find this program useful, I encourage you to add these features to this script. You won't need to configure it to record any additional information; all the information you need is already in balance and balance2. Just upgrade the END block, and you're in business!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):649 +msgid "I hope you've enjoyed this series. For more information on awk, check out the resources listed below." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):659 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(li):664 +msgid "Read Daniel's other awk articles on developerWorks: Common threads: Awk by example, <uri link=\"l-awk1.xml\">Part 1</uri> and <uri link=\"l-awk2.xml\">Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(li):669 +msgid "If you'd like a good old-fashioned book, O'Reilly's <uri link=\"http://www.oreilly.com/catalog/sed2/\">sed & awk, 2nd Edition</uri> is a wonderful choice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(li):674 +msgid "Be sure to check out the <uri link=\"http://www.faqs.org/faqs/computer-lang/awk/faq/\">comp.lang.awk FAQ</uri>. It also contains lots of additional awk links." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(li):679 +msgid "Patrick Hartigan's <uri link=\"http://sparky.rice.edu/~hartigan/awk.html\">awk tutorial</uri> is packed with handy awk scripts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(li):683 +msgid "<uri link=\"http://www.tasoft.com/tawk.html\">Thompson's TAWK Compiler</uri> compiles awk scripts into fast binary executables. Versions are available for Windows, OS/2, DOS, and UNIX." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(li):688 +msgid "<uri link=\"http://www.gnu.org/software/gawk/manual/gawk.html\">The GNU Awk User's Guide</uri> is available for online reference." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-posix1.xml.pot b/article/gettext/l-posix1.xml.pot new file mode 100644 index 0000000..be01ba7 --- /dev/null +++ b/article/gettext/l-posix1.xml.pot @@ -0,0 +1,323 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(guide:link):5 +msgid "/doc/en/articles/l-posix1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):6 +msgid "POSIX threads explained, part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(abstract):12 +msgid "POSIX (Portable Operating System Interface) threads are a great way to increase the responsiveness and performance of your code. In this series, Daniel Robbins shows you exactly how to use threads in your code. A lot of behind-the-scenes details are covered, so by the end of this series you'll really be ready to create your own multithreaded programs." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(version):25 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(date):26 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):29 +msgid "A simple and nimble tool for memory sharing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):31 +msgid "Threads are fun" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):34 +msgid "Knowing how to properly use threads should be part of every good programmer's repertoire. Threads are similar to processes. Threads, like processes, are time-sliced by the kernel. On uniprocessor systems the kernel uses time slicing to simulate simultaneous execution of threads in much the same way it uses time slicing with processes. And, on multiprocessor systems, threads are actually able to run simultaneously, just like two or more processes can." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):43 +msgid "So why is multithreading preferable to multiple independent processes for most cooperative tasks? Well, threads share the same memory space. Independent threads can access the same variables in memory. So all of your program's threads can read or write the declared global integers. If you've ever programmed any non-trivial code that uses fork(), you'll recognize the importance of this tool. Why? While fork() allows you to create multiple processes, it also creates the following communication problem: how to get multiple processes, each with their own independent memory space, to communicate. There is no one simple answer to this problem. While there are many different kinds of local IPC (inter-process communication), they all suffer from two important drawbacks:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):58 +msgid "They impose some form of additional kernel overhead, lowering performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):61 +msgid "In almost all situations, IPC is not a \"natural\" extension of your code. It often dramatically increases the complexity of your program." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):67 +msgid "Double bummer: overhead and complication aren't good things. If you've ever had to make massive modifications to one of your programs so that it supports IPC, you'll really appreciate the simple memory-sharing approach that threads provide. POSIX threads don't need to make expensive and complicated long-distance calls because all our threads happen to live in the same house. With a little synchronization, all your threads can read and modify your program's existing data structures. You don't have to pump the data through a file descriptor or squeeze it into a tight, shared memory space. For this reason alone you should consider the one process/multithread model rather than the multiprocess/single-thread model." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):83 +msgid "Threads are nimble" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):86 +msgid "But there's more. Threads also happen to be extremely nimble. Compared to a standard fork(), they carry a lot less overhead. The kernel does not need to make a new independent copy of the process memory space, file descriptors, etc. That saves a lot of CPU time, making thread creation ten to a hundred times faster than new process creation. Because of this, you can use a whole bunch of threads and not worry too much about the CPU and memory overhead incurred. You don't have a big CPU hit the way you do with fork(). This means you can generally create threads whenever it makes sense in your program." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):97 +msgid "Of course, just like processes, threads will take advantage of multiple CPUs. This is a really great feature if your software is designed to be used on a multiprocessor machine (if the software is open source, it will probably end up running on quite a few of these). The performance of certain kinds of threaded programs (CPU-intensive ones in particular) will scale almost linearly with the number of processors in the system. If you're writing a program that is very CPU-intensive, you'll definitely want to find ways to use multiple threads in your code. Once you're adept at writing threaded code, you'll also be able to approach coding challenges in new and creative ways without a lot of IPC red tape and miscellaneous mumbo-jumbo. All these benefits work synergistically to make multithreaded programming fun, fast, and flexible." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):114 +msgid "I think I'm a clone now" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):117 +msgid "If you've been in the Linux programming world for a while, you may know about the __clone() system call. __clone() is similar to fork(), but allows you to do lots of things that threads can do. For example, with __clone() you can selectively share parts of your parent's execution context (memory space, file descriptors, etc.) with a new child process. That's a good thing. But there is also a not-so-good thing about __clone(). As the __clone() man page states:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):126 +msgid "__clone() man page excerpt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):126 +#, no-wrap +msgid "\n \"The __clone call is Linux-specific and should not be used in programs\n intended to be portable. For programming threaded applications (multiple\n threads of control in the same memory space), it is better to use a library\n implementing the POSIX 1003.1c thread API, such as the Linux-Threads\n library. See pthread_create(3thr).\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):134 +msgid "So, while __clone() offers many of the benefits of threads, it is not portable. That doesn't mean you shouldn't use it in your code. But you should weigh this fact when you are considering using __clone() in your software. Fortunately, as the __clone() man page states, there's a better alternative: POSIX threads. When you want to write portable multithreaded code, code that works under Solaris, FreeBSD, Linux, and more, POSIX threads are the way to go." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):146 +msgid "Beginning threads" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):149 +msgid "Here's a simple example program that uses POSIX threads:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):153 +msgid "Sample program using POSIX threads" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):153 +#, no-wrap +msgid "\n#include <pthread.h>\n#include <stdlib.h>\n#include <unistd.h>\n\nvoid *thread_function(void *arg) {\n int i;\n for ( i=0; i<20; i++ ) {\n printf(\"Thread says hi!\\n\");\n sleep(1);\n }\n return NULL;\n}\n\nint main(void) {\n\n pthread_t mythread;\n \n if ( pthread_create( &mythread, NULL, thread_function, NULL) ) {\n printf(\"error creating thread.\");\n abort();\n }\n\n if ( pthread_join ( mythread, NULL ) ) {\n printf(\"error joining thread.\");\n abort();\n }\n\n exit(0);\n\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):186 +msgid "To compile this program, simply save this program as thread1.c, and type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):190 +msgid "Compiling above program" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):190 +#, no-wrap +msgid "\n$ <i>gcc thread1.c -o thread1 -lpthread</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):194 +msgid "Run it by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):198 +msgid "Running that program" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):198 +#, no-wrap +msgid "\n$ <i>./thread1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):205 +msgid "Understanding thread1.c" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):208 +msgid "<path>thread1.c</path> is an extremely simple threaded program. While it doesn't do anything useful, it'll help you understand how threads work. Let's take a step-by-step look at what this program does. In main() we first declare a variable called mythread, which has a type of pthread_t. The pthread_t type, defined in <path>pthread.h</path>, is often called a \"thread id\" (commonly abbreviated as \"tid\"). Think of it as a kind of thread handle." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):217 +msgid "After mythread is declared (remember that mythread is just a \"tid\", or a handle to the thread we are about to create), we call the pthread_create function to create a real, living thread. Don't be confused by the fact that pthread_create() is inside an \"if\" statement. Since pthread_create() returns zero on success and a non-zero value on failure, placing the function call in an if() is just an elegant way of detecting a failed pthread_create() call. Let's look at the arguments to pthread_create. The first one is a pointer to mythread, &mythread. The second argument, currently set to NULL, can be used to define certain attributes for our thread. Because the default thread attributes work for us, we simply set it to NULL." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):230 +msgid "Our third argument is the name of a function that the new thread will execute when it starts. In this case the name of the function is thread_function(). When this thread_function() returns, our new thread will terminate. In this example our thread function doesn't do anything remarkable. It just prints out \"Thread says hi!\" 20 times and then exits. Notice that thread_function() accepts a void * as an argument and also returns a void * as a return value. This shows us that it's possible to use a void * to pass an arbitrary piece of data to our new thread, and that our new thread can return an arbitrary piece of data when it finishes. Now, how do we pass our thread an arbitrary argument? Easy. We use the fourth argument to the pthread_create() call. In this example, we set it to NULL because we don't need to pass any data into our trivial thread_function()." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):245 +msgid "As you may have guessed, the program will consist of two threads after pthread_create() successfully returns. Wait a minute, two threads? Didn't we just create a single thread? Yes, we did. But our main program is also considered a thread. Think of it this way: if you write a program and don't use POSIX threads at all, the program will be single-threaded (this single thread is called the \"main\" thread). By creating a new thread we now have a total of two threads in our program." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):255 +msgid "I imagine you have at least two important questions at this point. The first is what the main thread does after the new thread is created. It keeps on going and executes the next line of our program in sequence (in this case that line is \"if ( pthread_join(...))\"). The second question you may be wondering about is what happens to our new thread when it exits. It stops and waits to be merged or \"joined\" with another thread as part of its cleanup process." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):264 +msgid "OK, now on to pthread_join(). Just as pthread_create() split our single thread into two threads, pthread_join() merges two threads into a single thread. The first argument to pthread_join() is our tid mythread. The second argument is a pointer to a void pointer. If the void pointer is non-NULL, pthread_join will place our thread's void * return value at the location we specify. Since we don't care about thread_function()'s return value, we set it to NULL." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):273 +msgid "You'll notice that our thread_function() takes 20 seconds to complete. Long before thread_function() completes, our main thread has already called pthread_join(). When this occurs our main thread will block (go to sleep) and wait for thread_function() to complete. When thread_function() completes, pthread_join() will return. Now our program has one main thread again. When our program exits, all new threads have been pthread_join()ed. This is exactly how you should deal with every new thread you create in your programs. If a new thread isn't joined it will still count against your system's maximum thread limit. This means that not doing the proper cleanup will eventually cause new pthread_create() calls to fail." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):289 +msgid "No parents, no children" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):292 +msgid "If you've used the fork() system call you're probably familiar with the concept of parent and child processes. When a process creates another new process, using fork(), the new process is considered the child and the original process is considered the parent. This creates a hierarchical relationship that can be handy, especially when waiting for child processes to terminate. The waitpid() function, for example, will tell the current process to wait for the termination of any child processes. waitpid() is used to implement a simple cleanup routine in your parent process." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):303 +msgid "Things are a little more interesting with POSIX threads. You may have noticed that I have intentionally avoided using the terms \"parent thread\" and \"child thread\" so far. That's because with POSIX threads this hierarchical relationship doesn't exist. While a main thread may create a new thread, and that new thread may create an additional new thread, the POSIX threads standard views all your threads as a single pool of equals. So the concept of waiting for a child thread to exit doesn't make sense. The POSIX threads standard does not record any \"family\" information. This lack of genealogy has one major implication: if you want to wait for a thread to terminate, you need to specify which one you are waiting for by passing the proper tid to pthread_join(). The threads library can't figure it out for you." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):317 +msgid "To many people this isn't very good news because it can complicate programs that consist of more than two threads. Don't let it worry you. The POSIX threads standard provides all the tools you need to manage multiple threads gracefully. Actually, the fact that there is no parent/child relationship opens up some creative ways to use threads in our programs. For example, if we have a thread called thread 1, and thread 1 creates a thread called thread 2, it's not necessary for thread 1 itself to call pthread_join() for thread 2. Any other thread in the program can do that. This allows for interesting possibilities when you write heavily multithreaded code. You can, for example, create a global \"dead list\" that contains all stopped threads and then have a special cleanup thread that simply waits for an item to be added to the list. The cleanup thread calls pthread_join() to merge it with itself. Now your entire cleanup will be handled neatly and efficiently in a single thread." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):336 +msgid "Synchronized swimming" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):339 +msgid "Now it's time to take a look at some code that does something a little unexpected. Here's thread2.c:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):344 +msgid "thread2.c" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):344 +#, no-wrap +msgid "\n#include <pthread.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <stdio.h>\n\nint myglobal;\n\n void *thread_function(void *arg) {\n int i,j;\n for ( i=0; i<20; i++ ) {\n j=myglobal;\n j=j+1;\n printf(\".\");\n fflush(stdout);\n sleep(1);\n myglobal=j;\n }\n return NULL;\n}\n\nint main(void) {\n\n pthread_t mythread;\n int i;\n\n if ( pthread_create( &mythread, NULL, thread_function, NULL) ) {\n printf(\"error creating thread.\");\n abort();\n }\n\n for ( i=0; i<20; i++) {\n myglobal=myglobal+1;\n printf(\"o\");\n fflush(stdout);\n sleep(1);\n }\n\n if ( pthread_join ( mythread, NULL ) ) {\n printf(\"error joining thread.\");\n abort();\n }\n\n printf(\"\\nmyglobal equals %d\\n\",myglobal);\n\n exit(0);\n\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):397 +msgid "Understanding thread2.c" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):400 +msgid "This program, like our first one, creates a new thread. Both the main thread and the new thread then increment a global variable called myglobal 20 times. But the program itself produces some unexpected results. Compile it by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):406 +msgid "Compiling program" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):406 +#, no-wrap +msgid "\n$ <i>gcc thread2.c -o thread2 -lpthread</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):410 +msgid "And run it:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):414 +msgid "Running it" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):414 +#, no-wrap +msgid "\n$ <i>./thread2</i>\n..o.o.o.o.oo.o.o.o.o.o.o.o.o.o..o.o.o.o.o\nmyglobal equals 21\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):420 +msgid "Quite unexpected! Since myglobal starts at zero, and both the main thread and the new thread each increment it by 20, we should see myglobal equaling 40 at the end of the program. Since myglobal equals 21, we know that something fishy is going on here. But what is it?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):427 +msgid "Give up? OK, I'll show you why it happens. Take a look at thread_function(). Notice how we copy myglobal into a local variable called \"j\"? And see how we increment j, then sleep for one second, and only then copy our new j value into myglobal? That's the key. Imagine what happens if our main thread increments myglobal just <e>after</e> our new thread copies the value of myglobal into j. When thread_function() writes the value of j back to myglobal, it will overwrite the modification that our main thread made." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):437 +msgid "When writing threaded programs, you want to avoid useless side effects like the one we just looked at because they're a waste of time (except when you are writing articles on POSIX threads, of course :). Now, what can we do to eliminate this hassle?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):444 +msgid "Since the problem occurs because we copy myglobal to j and hold it there for one second before writing it back, we could try to avoid using a temporary local variable and incrementing myglobal directly. While this solution will probably work in this particular example, it is not correct. And if we were performing a relatively complex mathematical operation on myglobal instead of just incrementing it, it would certainly fail. But why?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):453 +msgid "To understand the problem, you need to remember that threads run simultaneously. Even on a uniprocessor machine (where the kernel uses time slicing to simulate true multitasking) we can, from a programmer's perspective, imagine both threads as executing at the same time. thread2.c has problems because the code in thread_function() relies on the fact that myglobal will not be modified during the ~1 second before it is incremented. We need some way for one thread to tell the other to \"hold off\" while it's making changes to myglobal. I'll show you exactly how to do this in my next article. See you then." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):469 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):474 +msgid "Read Daniel's POSIX threads explained <uri link=\"l-posix2.xml\">Part 2</uri> and <uri link=\"l-posix3.xml\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):478 +msgid "See documentation on <uri link=\"http://metalab.unc.edu/pub/Linux/docs/faqs/Threads-FAQ/html/\">Linux threads</uri>, by Sean Walton, KB7rfa" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):483 +msgid "Take a POSIX threads <uri link=\"http://www.math.arizona.edu/swig/pthreads/threads.html\">tutorial</uri> by Mark Hays at the University of Arizona" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):488 +msgid "In <uri link=\"http://hwaci.com/sw/pttcl/pttcl.html\">An Introduction to Pthreads-Tcl</uri>, see changes to Tcl that enable it to be used with POSIX threads" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):493 +msgid "Take another tutorial, <uri link=\"http://dis.cs.umass.edu/~wagner/threads_html/tutorial.html\">Getting Started with POSIX Threads</uri>, by Tom Wagner and Don Towsley in the Computer Science Department at the University of Massachusetts, Amherst" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):499 +msgid "Always go to your friendly Linux pthread man pages (<c>man -k pthread</c>)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):502 +msgid "<uri link=\"http://moss.csc.ncsu.edu/~mueller/pthreads/\">FSU PThreads</uri> is a C library that implements POSIX threads for SunOS 4.1.x, Solaris 2.x, SCO UNIX, FreeBSD, Linux, and DOS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):507 +msgid "Refer to the home page for <uri link=\"http://www.sai.msu.su/sal/C/2/PCTHREADS.html\">POSIX and DCE threads for Linux</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):512 +msgid "See <uri link=\"http://pauillac.inria.fr/~xleroy/linuxthreads/\">The LinuxThreads Library</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):516 +msgid "<uri link=\"http://www.users.itl.net.ua/~prool/proolix.html\">Proolix</uri> is a simple POSIX-compliant operating system for i8086+ under permanent development" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):521 +msgid "Take a look at David R. Butenhof's book <uri link=\"http://www.amazon.com/exec/obidos/ASIN/0201633922/o/qid=961544788/sr=8-1/ref=aps_sr_b_1_1/002-2882413-1227240\"> Programming with POSIX Threads</uri>, in which he covers, among other things, the possible permutations of not using mutexes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):527 +msgid "Check out W. Richard Stevens' book <uri link=\"http://search.borders.com/fcgi-bin/db2www/search/search.d2w/Details?&mediaType=Book&prodID=2362607\">UNIX Network Programming: Network APIs: Sockets and XTI, Volume 1</uri>" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-posix2.xml.pot b/article/gettext/l-posix2.xml.pot new file mode 100644 index 0000000..1eb941a --- /dev/null +++ b/article/gettext/l-posix2.xml.pot @@ -0,0 +1,367 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(guide:link):5 +msgid "/doc/en/articles/l-posix2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):6 +msgid "POSIX threads explained, part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(abstract):12 +msgid "POSIX threads are a great way to increase the responsiveness and performance of your code. In this second article of a three-part series, Daniel Robbins shows you how to protect the integrity of shared data structures in your threaded code by using nifty little things called mutexes." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(version):24 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(date):25 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):28 +msgid "The little things called mutexes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):30 +msgid "Mutex me!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):33 +msgid "In my <uri link=\"/doc/en/articles/l-posix1.xml\">previous article</uri>, I talked about threaded code that did unusual and unexpected things. Two threads each incremented a global variable twenty times. The variable was supposed to end up with a value of 40, but ended up with a value of 21 instead. What happened? The problem occurred because one thread repeatedly \"cancelled out\" the increment performed by the other thread. Let's take a look at some corrected code that uses a <b>mutex</b> to solve the problem:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):43 +msgid "thread3.c" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):43 +#, no-wrap +msgid "\n#include <pthread.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <stdio.h>\n\nint myglobal;\npthread_mutex_t mymutex=PTHREAD_MUTEX_INITIALIZER;\n\nvoid *thread_function(void *arg) {\n int i,j;\n for ( i=0; i<20; i++ ) {\n pthread_mutex_lock(&mymutex);\n j=myglobal;\n j=j+1;\n printf(\".\");\n fflush(stdout);\n sleep(1);\n myglobal=j;\n pthread_mutex_unlock(&mymutex);\n }\n return NULL;\n}\n\nint main(void) {\n\n pthread_t mythread;\n int i;\n\n if ( pthread_create( &mythread, NULL, thread_function, NULL) ) {\n printf(\"error creating thread.\");\n bort();\n }\n\n for ( i=0; i<20; i++) {\n pthread_mutex_lock(&mymutex);\n myglobal=myglobal+1;\n pthread_mutex_unlock(&mymutex);\n printf(\"o\");\n fflush(stdout);\n sleep(1);\n }\n\n if ( pthread_join ( mythread, NULL ) ) {\n printf(\"error joining thread.\");\n abort();\n }\n\n printf(\"\\nmyglobal equals %d\\n\",myglobal);\n\n exit(0);\n\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):101 +msgid "Comprehension time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):104 +msgid "If you compare this code to the version in my <uri link=\"/doc/en/articles/l-posix1.xml\">previous article</uri>, you'll notice the addition of the calls pthread_mutex_lock() and pthread_mutex_unlock(). These calls perform a much-needed function in threaded programs. They provide a means of mutual exclusion (hence the name). No two threads can have the same mutex locked at the same time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):113 +msgid "This is how mutexes work. If thread \"a\" tries to lock a mutex while thread \"b\" has the same mutex locked, thread \"a\" goes to sleep. As soon as thread \"b\" releases the mutex (via a pthread_mutex_unlock() call), thread \"a\" will be able to lock the mutex (in other words, it will return from the pthread_mutex_lock() call with the mutex locked). Likewise, if thread \"c\" tries to lock the mutex while thread \"a\" is holding it, thread \"c\" will also be put to sleep temporarily. All threads that go to sleep from calling pthread_mutex_lock() on an already-locked mutex will \"queue up\" for access to that mutex." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):124 +msgid "pthread_mutex_lock() and pthread_mutex_unlock() are normally used to protect data structures. That is, you make sure that only one thread at a time can access a certain data structure by locking and unlocking it. As you may have guessed, the POSIX threads library will grant a lock without having put the thread to sleep at all if a thread tries to lock an unlocked mutex." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(figure:link):133 +msgid "/images/docs/l-posix-mutex.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(figure:caption):133 +msgid "For your enjoyment, four znurts re-enact a scene from recent pthread_mutex_lock() calls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):135 +msgid "The thread in this image that has the mutex locked gets to access the complex data structure without worrying about having other threads mess with it at the same time. The data structure is in effect \"frozen\" until the mutex is unlocked. It's as if the pthread_mutex_lock() and pthread_mutex_unlock() calls are \"under construction\" signs that surround a particular piece of shared data that's being modified or read. The calls act as a warning to other threads to go to sleep and wait their turn for the mutex lock. Of course this is only true if your surround every read and write to a particular data structure with calls to pthread_mutex_lock() and pthread_mutex_unlock()." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):150 +msgid "Why mutex at all?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):153 +msgid "Sounds interesting, but why exactly do we want to put our threads to sleep? After all, isn't the main advantage of threads their ability to work independently and in many cases simultaneously? Yes, that's completely true. However, every non-trivial threads program will require at least some use of mutexes. Let's refer to our example program again to understand why." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):161 +msgid "If you take a look at thread_function(), you'll notice that the mutex is locked at the beginning of the loop and released at the very end. In this example program, mymutex is used to protect the value of myglobal. If you look carefully at thread_function() you'll notice that the increment code copies myglobal to a local variable, increments the local variable, sleeps for one second, and only then copies the local value back to myglobal. Without the mutex, thread_function() will overwrite the incremented value when it wakes up if our main thread increments myglobal during thread_function()'s one-second nap. Using a mutex ensures that this doesn't happen. (In case you're wondering, I added the one-second delay to trigger a flawed result. There is no real reason for thread_function() to go to sleep for one second before writing the local value back to myglobal.) Our new program using mutex produces the desired result:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):176 +msgid "Output of program using mutex" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):176 +#, no-wrap +msgid "\n$ <i>./thread3</i>\no..o..o.o..o..o.o.o.o.o..o..o..o.ooooooo\nmyglobal equals 40\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):182 +msgid "To further explore this extremely important concept, let's take a look at the increment code from our program:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):187 +msgid "Incremented code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):187 +#, no-wrap +msgid "\nthread_function() increment code: \n j=myglobal;\n j=j+1;\n printf(\".\");\n fflush(stdout);\n sleep(1);\n myglobal=j;\n\nmain thread increment code:\n myglobal=myglobal+1;\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):200 +msgid "If this code were in a single-threaded program we'd expect the thread_function() code to execute in its entirety. The execution would then be followed by the main thread code (or the other way around). In a threaded program without mutexes, the code can (and often will, thanks to the sleep() call) end up executing in the following order:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):208 +msgid "Executing order" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):208 +#, no-wrap +msgid "\n thread_function() thread main thread\n\n j=myglobal;\n j=j+1;\n printf(\".\");\n fflush(stdout);\n sleep(1); myglobal=myglobal+1;\n myglobal=j;\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):219 +msgid "When the code executes in this particular order, the main thread's modification to myglobal gets overwritten. We then end up with an incorrect value at the end of our program. If we were manipulating pointers we'd probably end up with a segfault. Notice that our thread_function() thread executes all its instructions in order. It's not as if thread_function() does anything out of order. The problem is that we have another thread performing the other modifications to the same data structure effectively at the same time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):232 +msgid "Inside threads 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):235 +msgid "Before I explain how to figure out where to use mutexes, I'll offer a little insight into the internal working of threads. Here's our first example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):240 +msgid "Let's say you have a main thread that creates three new threads: threads \"a\", \"b\", and \"c\". Let's say that thread \"a\" is created first, thread \"b\", second and thread \"c\" last." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):246 +msgid "Thread creating order" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):246 +#, no-wrap +msgid "\n pthread_create( &thread_a, NULL, thread_function, NULL);\n pthread_create( &thread_b, NULL, thread_function, NULL);\n pthread_create( &thread_c, NULL, thread_function, NULL);\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):252 +msgid "After the first pthread_create() call completes, you can assume either that thread \"a\" exists or that it has finished and is now stopped. After the second pthread_create() call, both the main thread and thread \"b\" can assume that thread \"a\" exists (or has stopped)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):259 +msgid "However, immediately after the second create() call returns, the main thread can't assume which thread (a or b) will actually start running first. Although both threads exist it's up to the kernel and threads library to give them a slice of CPU time. And there is no hard rule as to who goes first. Now, it's very likely that thread \"a\" will start executing before thread \"b\", but it isn't guaranteed. This is especially true on a multi-processor machine. If you write code that assumes that thread \"a\" will actually start executing its code before thread \"b\" starts, you'll end up with a program that works 99% of the time. Or worse, a program that works 100% of the time on your machine but 0% of the time on your client's quad-processor server." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):272 +msgid "Another thing that we can learn from this example is that the threads library preserves the order of code execution for each individual thread. In other words, those three pthread_create() calls will in fact execute in the order that they appear. From the main thread's perspective, all the code is executing in order. Sometimes we can take advantage of this to optimize parts of our threaded programs. For instance, in the above example, thread \"c\" can assume that thread \"a\" and \"b\" are running or have already terminated. It does not have to worry about the possibility that threads \"a\" and \"b\" haven't been created yet. You can use this logic to optimize your threaded programs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):287 +msgid "Inside threads 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):290 +msgid "OK, now for another hypothetical example. Let's say we have a bunch of threads that are executing the following code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):295 +msgid "Code being executed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):295 +#, no-wrap +msgid "\n myglobal=myglobal+1;\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):299 +msgid "Do we need to lock and unlock the mutex before and after the increment respectively? Some of you may say \"no\". The compiler will after all very likely compile the above assignment into a single machine instruction. As you know a single machine instruction cannot be interrupted \"mid-stream\". Even hardware interrupts will respect the atomicity of machine instructions. Because of this tendency it's tempting to leave out the pthread_mutex_lock() and pthread_mutex_unlock() calls entirely. Don't do it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):309 +msgid "Am I being a wimp? Not really. First, you shouldn't assume that the above assignment would be compiled as a single machine instruction unless you personally verify the machine code yourself. Even if you insert some inline assembly to ensure that the increment happens atomically -- or even if you wrote the compiler yourself! -- you may still have problems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):317 +msgid "Here's why. Using a single inline assembly opcode will probably work wonderfully on a uni-processor machine. Each increment will happen atomically, and chances are you'll get the desired result. But a multi-processor machine is another story. On a multi-CPU machine, you can have two separate processors executing the above assignment at nearly (or at times exactly) the same time. And remember that this memory modification will need to trickle down from L1 to L2 cache, and then to main memory. (An SMP machine is not just an additional processor; it also has special hardware that arbitrates access to RAM.) In the end, you'll really have no idea which CPU \"wins\" the race of writing to main memory. To produce predictable code, you'll want to use mutexes. Mutexes will insert a \"memory barrier,\" which ensures that the writes to main memory occur in the order the threads lock the mutex." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):332 +msgid "Consider an SMP architecture that updates main memory in 32-bit blocks. If you are incrementing a 64-bit integer without mutexes, the uppermost 4 bytes might come from one CPU and the other four might come from another. Bummer! Worst of all, using poor technique will probably make your program bomb out once in a blue moon or at 3 AM on an important client's system. David R. Butenhof covers the possible permutations of not using mutexes in his book, Programming with POSIX Threads (see <uri link=\"#resources\">Resources</uri> at the end of this article)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):346 +msgid "Many mutexes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):349 +msgid "If you place too many mutexes, your code won't have any kind of concurrency and will run slower than a single-threaded solution. If you place too few, your code will have weird and embarrassing bugs. Fortunately, there is a middle ground. First of all, mutexes are used to serialize access to *shared data*. Don't use them for non-shared data, and don't use them if your program's logic ensures that only one thread is accessing a particular data structure at a single time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):358 +msgid "Second of all, if you are using shared data, use mutexes for both reading and writing. Surround your read and write sections with pthread_mutex_lock() and pthread_mutex_unlock(), or use them any time a program's invariant is temporarily broken. Learn to view your code from the perspective of a single thread and make sure each individual thread in your program has a consistent, friendly view of memory. It'll probably take you several hours of writing your own code to get the hang of mutexes, but they will soon become second nature and you'll be able to use them properly without thinking <e>too</e> much." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):372 +msgid "Using the calls: initialization" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):375 +msgid "OK, now it's time to see all the different ways to use mutexes. First, we'll start with initialization. In our <uri link=\"#thread3c\">thread3.c example</uri>, we used a static initialization method. This involved declaring a pthread_mutex_t variable and assigning it the constant PTHREAD_MUTEX_INITIALIZER:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):383 +msgid "Initialization example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):383 +#, no-wrap +msgid "\npthread_mutex_t mymutex=PTHREAD_MUTEX_INITIALIZER;\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):387 +msgid "That's pretty easy. But you can also create a mutex dynamically. Use this dynamic method whenever your code allocates a new mutex using malloc(). In this case, the static initialization method won't do, and the routine pthread_mutex_init() should be used:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):394 +msgid "Dynamic way of creating mutex" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):394 +#, no-wrap +msgid "\nint pthread_mutex_init( pthread_mutex_t *mymutex, const pthread_mutexattr_t*attr)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):398 +msgid "As you can see, pthread_mutex_init accepts a pointer to an already-allocated region of memory to initialize as a mutex. As a second argument, it can also accept an optional pthread_mutexattr_t pointer. This structure can be used to set various mutex attributes. But usually these attributes are not needed, so specifying NULL is the norm." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):406 +msgid "Whenever you initialize a mutex using pthread_mutex_init(), it should be destroyed using pthread_mutex_destroy(). pthread_mutex_destroy() accepts a single pointer to a pthread_mutex_t and frees any resources allocated to the mutex when it was created. Be sure to note that pthread_mutex_destroy() does not free the memory used to store the pthread_mutex_t. It's up to you to free() your own memory. Also remember that both pthread_mutex_init() and pthread_mutex_destroy() return zero on success." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):419 +msgid "Using the calls: locking" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):422 +msgid "Locking example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):422 +#, no-wrap +msgid "\npthread_mutex_lock(pthread_mutex_t *mutex)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):426 +msgid "pthread_mutex_lock() accepts a single pointer to a mutex to lock. If the mutex already happens to be locked, the caller will go to sleep. When the function returns, the caller will be woken up (obviously), and the caller will also now hold the lock. This call either returns zero on success or a non-zero error code on failure." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):434 +msgid "Unlocking example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):434 +#, no-wrap +msgid "\npthread_mutex_unlock(pthread_mutex_t *mutex)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):438 +msgid "pthread_mutex_unlock() complements pthread_mutex_lock() and unlocks a mutex that the thread has already locked. You should always unlock a mutex that you've locked as soon as safely possible (to increase performance). And you should never unlock a mutex that you don't hold a lock for (otherwise, the pthread_mutex_unlock() call will fail with a non-zero EPERM return value)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):446 +msgid "Trying the lock example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):446 +#, no-wrap +msgid "\npthread_mutex_trylock(pthread_mutex_t *mutex)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):450 +msgid "This call is handy when you want to lock a mutex while your thread is doing something else (because the mutex is currently locked). When you call pthread_mutex_trylock() you'll attempt to lock the mutex. If the mutex is currently unlocked you'll get the lock, and this function will return zero. However, if the mutex is locked this call won't block. Rather, it will return a non-zero EBUSY error value. Then you can go about your business and try to lock at a later time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):463 +msgid "Waiting on conditions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):466 +msgid "Mutexes are necessary tools for threaded programs, but they can't do everything. What happens, for instance, if your thread is waiting for a certain condition to appear in shared data? Your code could repeatedly lock and unlock the mutex, checking for any changes to the value. At the same time it will also quickly unlock the mutex so that others can make any necessary changes. But this is a horrible approach because this thread will need to busy-loop to detect a change in a reasonable time frame." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):476 +msgid "You could put the calling thread to sleep for a little bit, say three seconds between each check, but then your threaded code wouldn't be optimally responsive. What you really need is a way to put a thread to sleep while it waits for some condition to be met. Once the condition is met you need a method to wake up the thread(s) that are waiting for that particular condition to become true. If you can do this, your threaded code will be really efficient and it won't tie up valuable mutex locks. That's precisely what POSIX condition variables can do for you!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):487 +msgid "And POSIX condition variables are the subject of my next article, where I'll show you exactly how to use them. Then you'll have all the resources to create sophisticated threaded programs that model work crews, assembly lines, and more. I'm going to pick up the pace in the next article now that you're getting more familiar with threads. I'm hoping this will allow me to squeeze in a reasonably sophisticated threaded program at the end of the next article. And speaking of waiting on conditions, I'll see you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):502 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):507 +msgid "Read Daniel's POSIX threads explained <uri link=\"l-posix1.xml\">Part 1</uri> and <uri link=\"l-posix3.xml\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):511 +msgid "See documentation on <uri link=\"http://metalab.unc.edu/pub/Linux/docs/faqs/Threads-FAQ/html/\">Linux threads</uri>, by Sean Walton, KB7rfa." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):516 +msgid "Always go to your friendly Linux pthread man pages (<c>man -k pthread</c>)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):519 +msgid "See <uri link=\"http://pauillac.inria.fr/~xleroy/linuxthreads/\">The LinuxThreads Library.</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):523 +msgid "<uri link=\"http://www.users.itl.net.ua/~prool/proolix.html\">Proolix</uri> is a simple POSIX-compliant operating system for i8086+ under permanent development." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):528 +msgid "Take a look at David R. Butenhof's book <uri link=\"http://www.amazon.com/exec/obidos/ASIN/0201633922/o/qid=961544788/sr=8-1/ref=aps_sr_b_1_1/002-2882413-1227240\">Programming with POSIX Threads</uri>, in which he covers, among other things, the possible permutations of not using mutexes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):535 +msgid "Check out W. Richard Stevens' book \"UNIX Network Programming\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):541 +msgid "Find more resources for Linux developers in the <uri link=\"http://www.ibm.com/developerworks/linux/\">developerWorks Linux zone</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):546 +msgid "Get involved in the developerWorks community by participating in <uri link=\"http://www.ibm.com/developerworks/blogs/\">developerWorks blogs</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-posix3.xml.pot b/article/gettext/l-posix3.xml.pot new file mode 100644 index 0000000..33c70f9 --- /dev/null +++ b/article/gettext/l-posix3.xml.pot @@ -0,0 +1,309 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(guide:link):5 +msgid "/doc/en/articles/l-posix3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):6 +msgid "POSIX threads explained, part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(abstract):12 +msgid "In this article, the last of a three-part series on POSIX threads, Daniel takes a good look at how to use condition variables. Condition variables are POSIX thread structures that allow you to \"wake up\" threads when certain conditions are met. You can think of them as a thread-safe form of signalling. Daniel wraps up the article by using all that you've learned so far to implement a multi-threaded work crew application." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(version):26 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(date):27 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):30 +msgid "Improve efficiency with condition variables" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):32 +msgid "Condition variables explained" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):35 +msgid "I ended my <uri link=\"/doc/en/articles/l-posix2.xml\">previous article</uri> by describing a particular dilemma how does a thread deal with a situation where it is waiting for a specific condition to become true? It could repeatedly lock and unlock a mutex, each time checking a shared data structure for a certain value. But this is a waste of time and resources, and this form of busy polling is extremely inefficient. The best way to do this is to use the pthread_cond_wait() call to wait on a particular condition to become true." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):45 +msgid "It's important to understand what pthread_cond_wait() does -- it's the heart of the POSIX threads signalling system, and also the hardest part to understand." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):50 +msgid "First, let's consider a scenario where a thread has locked a mutex, in order to take a look at a linked list, and the list happens to be empty. This particular thread can't do anything -- it's designed to remove a node from the list, and there are no nodes available. So, this is what it does." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):57 +msgid "While still holding the mutex lock, our thread will call pthread_cond_wait(&mycond,&mymutex). The pthread_cond_wait() call is rather complex, so we'll step through each of its operations one at a time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):63 +msgid "The first thing pthread_cond_wait() does is simultaneously unlock the mutex mymutex (so that other threads can modify the linked list) and wait on the condition mycond (so that pthread_cond_wait() will wake up when it is \"signalled\" by another thread). Now that the mutex is unlocked, other threads can access and modify the linked list, possibly adding items." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):71 +msgid "At this point, the pthread_cond_wait() call has not yet returned. Unlocking the mutex happens immediately, but waiting on the condition mycond is normally a blocking operation, meaning that our thread will go to sleep, consuming no CPU cycles until it is woken up. This is exactly what we want to happen. Our thread is sleeping, waiting for a particular condition to become true, without performing any kind of busy polling that would waste CPU time. From our thread's perspective, it's simply waiting for the pthread_cond_wait() call to return." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):81 +msgid "Now, to continue the explanation, let's say that another thread (call it \"thread 2\") locks mymutex and adds an item to our linked list. Immediately after unlocking the mutex, thread 2 calls the function pthread_cond_broadcast(&mycond). By doing so, thread 2 will cause all threads waiting on the mycond condition variable to immediately wake up. This means that our first thread (which is in the middle of a pthread_cond_wait() call) will now wake up." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):91 +msgid "Now, let's take a look at what happens to our first thread. After thread 2 called pthread_cond_broadcast(&mymutex) you might think that thread 1's pthread_cond_wait() will immediately return. Not so! Instead, pthread_cond_wait() will perform one last operation: relock mymutex. Once pthread_cond_wait() has the lock, it will then return and allow thread 1 to continue execution. At that point, it can immediately check the list for any interesting changes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):104 +msgid "Stop and review!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre:caption):127 +msgid "queue.h" +msgstr "" + +#. These bits do not make any sense to me, commented out +#. +#. <pre caption="queue.h"> +#. pthread_cond_t mycond; +#. </pre> +#. +#. <pre caption="control.h"> +#. pthread_cond_t mycond; +#. +#. pthread_cond_init(&mycond,NULL); +#. +#. pthread_cond_destroy(&mycond); +#. +#. pthread_cond_wait(&mycond, &mymutex); +#. +#. pthread_cond_broadcast(&mycond); +#. +#. pthread_cond_signal(&mycond); +#. </pre> +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre):127 +#, no-wrap +msgid "\n/* queue.h\n<comment>** Copyright 2000 Daniel Robbins, Gentoo Technologies, Inc.\n** Author: Daniel Robbins\n** Date: 16 Jun 2000</comment>\n*/\ntypedef struct node {\n struct node *next;\n} node;\ntypedef struct queue {\n node *head, *tail; \n} queue;\nvoid queue_init(queue *myroot);\nvoid queue_put(queue *myroot, node *mynode);\nnode *queue_get(queue *myroot);\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre:caption):144 +msgid "queue.c" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre):144 +#, no-wrap +msgid "\n/* queue.c\n<comment>** Copyright 2000 Daniel Robbins, Gentoo Technologies, Inc.\n** Author: Daniel Robbins\n** Date: 16 Jun 2000\n**\n** This set of queue functions was originally thread-aware. I\n** redesigned the code to make this set of queue routines\n** thread-ignorant (just a generic, boring yet very fast set of queue\n** routines). Why the change? Because it makes more sense to have\n** the thread support as an optional add-on. Consider a situation\n** where you want to add 5 nodes to the queue. With the\n** thread-enabled version, each call to queue_put() would\n** automatically lock and unlock the queue mutex 5 times -- that's a\n** lot of unnecessary overhead. However, by moving the thread stuff\n** out of the queue routines, the caller can lock the mutex once at\n** the beginning, then insert 5 items, and then unlock at the end.\n** Moving the lock/unlock code out of the queue functions allows for\n** optimizations that aren't possible otherwise. It also makes this\n** code useful for non-threaded applications.\n**\n** We can easily thread-enable this data structure by using the\n** data_control type defined in control.c and control.h.</comment> */\n#include <stdio.h>\n#include \"queue.h\"\nvoid queue_init(queue *myroot) {\n myroot->head=NULL;\n myroot->tail=NULL;\n}\nvoid queue_put(queue *myroot,node *mynode) {\n mynode->next=NULL;\n if (myroot->tail!=NULL)\n myroot->tail->next=mynode;\n myroot->tail=mynode;\n if (myroot->head==NULL)\n myroot->head=mynode;\n}\nnode *queue_get(queue *myroot) {\n //get from root\n node *mynode;\n mynode=myroot->head;\n if (myroot->head!=NULL)\n myroot->head=myroot->head->next;\n return mynode;\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre:caption):191 +msgid "control.h" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre):191 +#, no-wrap +msgid "\n#include <pthread.h>\ntypedef struct data_control {\n pthread_mutex_t mutex;\n pthread_cond_t cond;\n int active;\n} data_control;\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre:caption):200 +msgid "control.c" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre):200 +#, no-wrap +msgid "\n/* control.c\n<comment>** Copyright 2000 Daniel Robbins, Gentoo Technologies, Inc.\n** Author: Daniel Robbins\n** Date: 16 Jun 2000\n**\n** These routines provide an easy way to make any type of\n** data-structure thread-aware. Simply associate a data_control\n** structure with the data structure (by creating a new struct, for\n** example). Then, simply lock and unlock the mutex, or\n** wait/signal/broadcast on the condition variable in the data_control\n** structure as needed.\n**\n** data_control structs contain an int called \"active\". This int is\n** intended to be used for a specific kind of multithreaded design,\n** where each thread checks the state of \"active\" every time it locks\n** the mutex. If active is 0, the thread knows that instead of doing\n** its normal routine, it should stop itself. If active is 1, it\n** should continue as normal. So, by setting active to 0, a\n** controlling thread can easily inform a thread work crew to shut\n** down instead of processing new jobs. Use the control_activate()\n** and control_deactivate() functions, which will also broadcast on\n** the data_control struct's condition variable, so that all threads\n** stuck in pthread_cond_wait() will wake up, have an opportunity to\n** notice the change, and then terminate.</comment>\n*/\n#include \"control.h\"\nint control_init(data_control *mycontrol) {\n int mystatus;\n if (pthread_mutex_init(&(mycontrol->mutex),NULL))\n return 1;\n if (pthread_cond_init(&(mycontrol->cond),NULL))\n return 1;\n mycontrol->active=0;\n return 0;\n}\nint control_destroy(data_control *mycontrol) {\n int mystatus;\n if (pthread_cond_destroy(&(mycontrol->cond)))\n return 1;\n if (pthread_mutex_destroy(&(mycontrol->cond)))\n return 1;\n mycontrol->active=0;\n return 0;\n}\nint control_activate(data_control *mycontrol) {\n int mystatus;\n if (pthread_mutex_lock(&(mycontrol->mutex)))\n return 0;\n mycontrol->active=1;\n pthread_mutex_unlock(&(mycontrol->mutex));\n pthread_cond_broadcast(&(mycontrol->cond));\n return 1;\n}\nint control_deactivate(data_control *mycontrol) {\n int mystatus;\n if (pthread_mutex_lock(&(mycontrol->mutex)))\n return 0;\n mycontrol->active=0;\n pthread_mutex_unlock(&(mycontrol->mutex));\n pthread_cond_broadcast(&(mycontrol->cond));\n return 1;\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):268 +msgid "Debug time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):271 +msgid "One more miscellaneous file before we get to the biggie. Here's <path>dbug.h</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre:caption):276 +msgid "dbug.h" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre):276 +#, no-wrap +msgid "\n#define dabort() \\\n { printf(\"Aborting at line %d in source file %s\\n\",__LINE__,__FILE__); abort(); }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):281 +msgid "We use this code to handle unrecoverable errors in our work crew code." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):288 +msgid "The work crew code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):291 +msgid "Speaking of the work crew code, here it is:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre:caption):295 +msgid "workcrew.c>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre):295 +#, no-wrap +msgid "\n#include <stdio.h>\n#include <stdlib.h>\n#include \"control.h\"\n#include \"queue.h\"\n#include \"dbug.h\"\n/* <comment>the work_queue holds tasks for the various threads to complete.</comment>*/\nstruct work_queue {\n data_control control;\n queue work;\n} wq;\n/* <comment>I added a job number to the work node. Normally, the work node\n would contain additional data that needed to be processed. </comment>*/\ntypedef struct work_node {\n struct node *next;\n int jobnum;\n} wnode;\n/* <comment>the cleanup queue holds stopped threads. Before a thread\n terminates, it adds itself to this list. Since the main thread is\n waiting for changes in this list, it will then wake up and clean up\n the newly terminated thread. </comment>*/\nstruct cleanup_queue {\n data_control control;\n queue cleanup;\n} cq;\n/* <comment>I added a thread number (for debugging/instructional purposes) and\n a thread id to the cleanup node. The cleanup node gets passed to\n the new thread on startup, and just before the thread stops, it\n attaches the cleanup node to the cleanup queue. The main thread\n monitors the cleanup queue and is the one that performs the\n necessary cleanup.</comment> */\ntypedef struct cleanup_node {\n struct node *next;\n int threadnum;\n pthread_t tid;\n} cnode;\nvoid *threadfunc(void *myarg) {\n wnode *mywork;\n cnode *mynode;\n mynode=(cnode *) myarg;\n pthread_mutex_lock(&wq.control.mutex);\n while (wq.control.active) {\n while (wq.work.head==NULL && wq.control.active) {\n pthread_cond_wait(&wq.control.cond, &wq.control.mutex);\n }\n if (!wq.control.active) \n break;\n //we got something!\n mywork=(wnode *) queue_get(&wq.work);\n pthread_mutex_unlock(&wq.control.mutex);\n //perform processing...\n printf(\"Thread number %d processing job %d\\n\",mynode->threadnum,mywork->jobnum);\n free(mywork);\n pthread_mutex_lock(&wq.control.mutex);\n }\n pthread_mutex_unlock(&wq.control.mutex);\n pthread_mutex_lock(&cq.control.mutex);\n queue_put(&cq.cleanup,(node *) mynode);\n pthread_mutex_unlock(&cq.control.mutex);\n pthread_cond_signal(&cq.control.cond);\n printf(\"thread %d shutting down...\\n\",mynode->threadnum);\n return NULL;\n \n}\n#define NUM_WORKERS 4\nint numthreads;\nvoid join_threads(void) {\n cnode *curnode;\n printf(\"joining threads...\\n\");\n while (numthreads) {\n pthread_mutex_lock(&cq.control.mutex);\n /* <comment>below, we sleep until there really is a new cleanup node. This\n takes care of any false wakeups... even if we break out of\n pthread_cond_wait(), we don't make any assumptions that the\n condition we were waiting for is true. </comment>*/\n while (cq.cleanup.head==NULL) {\n pthread_cond_wait(&cq.control.cond,&cq.control.mutex);\n }\n /* <comment>at this point, we hold the mutex and there is an item in the\n list that we need to process. First, we remove the node from\n the queue. Then, we call pthread_join() on the tid stored in\n the node. When pthread_join() returns, we have cleaned up\n after a thread. Only then do we free() the node, decrement the\n number of additional threads we need to wait for and repeat the\n entire process, if necessary</comment> */\n curnode = (cnode *) queue_get(&cq.cleanup);\n pthread_mutex_unlock(&cq.control.mutex);\n pthread_join(curnode->tid,NULL);\n printf(\"joined with thread %d\\n\",curnode->threadnum);\n free(curnode);\n numthreads--;\n }\n}\nint create_threads(void) {\n int x;\n cnode *curnode;\n for (x=0; x<NUM_WORKERS; x++) {\n curnode=malloc(sizeof(cnode));\n if (!curnode)\n return 1;\n curnode->threadnum=x;\n if (pthread_create(&curnode->tid, NULL, threadfunc, (void *) curnode))\n return 1;\n printf(\"created thread %d\\n\",x);\n numthreads++;\n }\n return 0;\n}\nvoid initialize_structs(void) {\n numthreads=0;\n if (control_init(&wq.control))\n dabort();\n queue_init(&wq.work);\n if (control_init(&cq.control)) {\n control_destroy(&wq.control);\n dabort();\n }\n queue_init(&wq.work);\n control_activate(&wq.control);\n}\nvoid cleanup_structs(void) {\n control_destroy(&cq.control);\n control_destroy(&wq.control);\n}\nint main(void) {\n int x;\n wnode *mywork;\n initialize_structs();\n /* CREATION */\n \n if (create_threads()) {\n printf(\"Error starting threads... cleaning up.\\n\");\n join_threads();\n dabort();\n }\n pthread_mutex_lock(&wq.control.mutex);\n for (x=0; x<16000; x++) {\n mywork=malloc(sizeof(wnode));\n if (!mywork) {\n printf(\"ouch! can't malloc!\\n\");\n break;\n }\n mywork->jobnum=x;\n queue_put(&wq.work,(node *) mywork);\n }\n pthread_mutex_unlock(&wq.control.mutex);\n pthread_cond_broadcast(&wq.control.cond);\n printf(\"sleeping...\\n\");\n sleep(2);\n printf(\"deactivating work queue...\\n\");\n control_deactivate(&wq.control);\n /* CLEANUP */\n join_threads();\n cleanup_structs();\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):455 +msgid "Code walkthrough" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):458 +msgid "Now it's time for a quick code walkthrough. The first struct defined is called \"wq\", and contains a data_control and a queue header. The data_control structure will be used to arbitrate access to the entire queue, including the nodes in the queue. Our next job is to define the actual work nodes. To keep the code lean to fit in this article, all that's contained here is a job number." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):466 +msgid "Next, we create the cleanup queue. The comments explain how this works. OK, now let's skip the threadfunc(), join_threads(), create_threads() and initialize_structs() calls, and jump down to main(). The first thing we do is initialize our structures -- this includes initializing our data_controls and queues, as well as activating our work queue." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):477 +msgid "Cleanup special" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):480 +msgid "Now it's time to initialize our threads. If you look at our create_threads() call, everything will look pretty normal -- except for one thing. Notice that we are allocating a cleanup node, and initializing its threadnum and TID components. We also pass a cleanup node to each new worker thread as an initial argument. Why do we do this?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):488 +msgid "Because when a worker thread exits, it'll attach its cleanup node to the cleanup queue, and terminate. Then, our main thread will detect this addition to the cleanup queue (by use of a condition variable) and dequeue the node. Because the TID (thread id) is stored in the cleanup node, our main thread will know exactly which thread terminated. Then, our main thread will call pthread_join(tid), and join with the appropriate worker thread. If we didn't perform such bookkeeping, our main thread would need to join with worker threads in an arbitrary order, possibly in the order that they were created. Because the threads may not necessarily terminate in this order, our main thread could be waiting to join with one thread while it could have been joining with ten others. Can you see how this design decision can really speed up our shutdown code, especially if we were to use hundreds of worker threads?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):506 +msgid "Creating work" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):509 +msgid "Now that we've started our worker threads (and they're off performing their threadfunc(), which we'll get to in a bit), our main thread begins inserting items into the work queue. First, it locks wq's control mutex, and then allocates 16000 work packets, inserting them into the queue one-by-one. After this is done, pthread_cond_broadcast() is called, so that any sleeping threads are woken up and able to do the work. Then, our main thread sleeps for two seconds, and then deactivates the work queue, telling our worker threads to terminate. Then, our main thread calls the join_threads() function to clean up all the worker threads." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):524 +msgid "threadfunc()" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):527 +msgid "Time to look at threadfunc(), the code that each worker thread executes. When a worker thread starts, it immediately locks the work queue mutex, gets one work node (if available) and processes it. If no work is available, pthread_cond_wait() is called. You'll notice that it's called in a very tight while() loop, and this is very important. When you wake up from a pthread_cond_wait() call, you should never assume that your condition is definitely true -- it will probably be true, but it may not. The while loop will cause pthread_cond_wait() to be called again if it so happens that the thread was mistakenly woken up and the list is empty." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):539 +msgid "If there's a work node, we simply print out its job number, free it, and exit. Real code would do something more substantial. At the end of the while() loop, we lock the mutex so we can check the active variable as well as checking for new work nodes at the top of the loop. If you follow the code through, you'll find that if wq.control.active is 0, the while loop will be terminated and the cleanup code at the end of threadfunc() will begin." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):548 +msgid "The worker thread's part of the cleanup code is pretty interesting. First, it unlocks the work_queue, since pthread_cond_wait() returns with the mutex locked. Then, it gets a lock on the cleanup queue, adds our cleanup node (containing our TID, which the main thread will use for its pthread_join() call), and then it unlocks the cleanup queue. After that, it signals any cq waiters (pthread_cond_signal(&cq.control.cond)) so that the main thread will know that there's a new node to process. We don't use pthread_cond_broadcast() because it's not necessary -- only one thread (the main thread) is waiting for new entries in the cleanup queue. Our worker thread prints a shutdown message, and then terminates, waiting to be pthread_joined() by the main thread when it calls join_threads()." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):565 +msgid "join_threads()" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):568 +msgid "If you want to see a simple example of how condition variables should be used, take a look at the join_threads() function. While we still have worker threads in existence, join_threads() loops, waiting for new cleanup nodes in our cleanup queue. If there is a new node, we dequeue the node, unlock the cleanup queue (so that other cleanup nodes can be added by our worker threads), join with our new thread (using the TID stored in the cleanup node), free the cleanup node, decrement the number of threads \"out there\", and continue." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):581 +msgid "Wrapping it up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):584 +msgid "We've reached the end of the \"POSIX threads explained\" series, and I hope that you're now ready to begin adding multithreaded code to your own applications. For more information, please see the <uri link=\"#resources\">Resources</uri> section, which also contains a tarball of all the sources used in this article. I'll see you next series!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):597 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):602 +msgid "A <uri link=\"/doc/en/files/l-posix-thread-3.tar.gz\">tarball of the sources</uri> used in this article is available." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):606 +msgid "Read Daniel's POSIX threads explained <uri link=\"l-posix1.xml\">Part 1</uri> and <uri link=\"l-posix2.xml\">Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):610 +msgid "Your friendly Linux pthread man pages (<c>man -k pthread</c>) are an excellent resource." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):614 +msgid "For a thorough treatment of POSIX threads, I recommend this book: <uri link=\"http://search.borders.com/fcgi-bin/db2www/search/search.d2w/Details?&mediaType=Book&prodID=2362607\">Programming with POSIX Threads</uri>, by David R. Butenhof (Addison-Wesley, 1997). This is arguably the best POSIX threads book available." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):621 +msgid "POSIX threads are also covered in this book: <uri link=\"http://search.borders.com/fcgi-bin/db2www/search/search.d2w/Details?&mediaType=Book&prodID=2362607\">UNIX Network Programming - Networking APIs: Sockets and XTI</uri>, by W. Richard Stevens (Prentice Hall, 1997). This is a classic book, but it doesn't cover threads in as much detail as does Programming with POSIX Threads, above." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):628 +msgid "See documentation on <uri link=\"http://metalab.unc.edu/pub/Linux/docs/faqs/Threads-FAQ/html/\">Linux threads</uri>, by Sean Walton, KB7rfa." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):633 +msgid "Take a POSIX threads <uri link=\"http://www.math.arizona.edu/swig/pthreads/threads.html\">tutorial</uri> by Mark Hays at the University of Arizona." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):638 +msgid "In <uri link=\"http://hwaci.com/sw/pttcl/pttcl.html\">An Introduction to Pthreads-Tcl</uri>, see changes to Tcl that enable it to be used with POSIX threads." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):643 +msgid "Take another tutorial, <uri link=\"http://dis.cs.umass.edu/~wagner/threads_html/tutorial.html\">Getting Started with POSIX Threads</uri>, by Tom Wagner and Don Towsley of the Computer Science Department at the University of Massachusetts, Amherst." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):649 +msgid "<uri link=\"http://moss.csc.ncsu.edu/~mueller/pthreads/\">FSU PThreads</uri> is a C library that implements POSIX threads for SunOS 4.1.x, Solaris 2.x, SCO UNIX, FreeBSD, Linux, and DOS." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):654 +msgid "Refer to the home page for <uri link=\"http://www.sai.msu.su/sal/C/2/PCTHREADS.html\">POSIX and DCE threads</uri> for Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):659 +msgid "See <uri link=\"http://pauillac.inria.fr/~xleroy/linuxthreads/\">The LinuxThreads library</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):663 +msgid "<uri link=\"http://www.users.itl.net.ua/~prool/proolix.html\">Proolix</uri> is a simple POSIX-compliant operating system for i8086+ under permanent development." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-redesign-1.xml.pot b/article/gettext/l-redesign-1.xml.pot new file mode 100644 index 0000000..e082b57 --- /dev/null +++ b/article/gettext/l-redesign-1.xml.pot @@ -0,0 +1,422 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(guide:link):5 +msgid "/doc/en/articles/l-redesign-1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):6 +msgid "The gentoo.org redesign, Part 1: A site reborn" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(abstract):12 +msgid "Have you ever woken up one morning and suddenly realized that your cute little personal development Web site isn't really that great? If so, you're in good company. In this series, Daniel Robbins shares his experiences as he redesigns the www.gentoo.org Web site using technologies like XML, XSLT, and Python. Along the way, you may find some excellent approaches to use for your next Web site redesign. In this article, Daniel creates a user-centric action plan and introduces pytext, an embedded Python interpreter." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(version):27 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(date):28 +msgid "2005-10-10" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):31 +msgid "An unruly horde" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):35 +msgid "Fellow software developer, may I ask you a question? Why is it that although many of us are intimately familiar with Web technologies such as HTML, CGI, Perl, Python, Java technology, and XML, our very own Web sites -- the ones devoted to our precious development projects -- look like they were thrown together by an unruly horde of hyperactive 12-year-olds? Why, oh why, is this so?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):44 +msgid "Could it be because most of the time, we've left our Web site out to rot while we squander our precious time hacking away on our free software projects? The answer, at least in my case, is a most definite \"Yes.\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):50 +msgid "When I'm not writing articles for IBM developerWorks or being a new dad, I'm feverishly working on the next release of Gentoo Linux, along with my skilled team of volunteers. And, yes, Gentoo Linux has its own Web site (see Resources). As of right now (March 2001), our Web site isn't that special; that's because we don't spend much time working on it because we're generally engrossed in improving Gentoo Linux itself. Sure, our site does have several admittedly cute logos that I whipped up using Xara X (see Resources), but when you look past the eye candy, our site leaves a lot to be desired. Maybe yours does too. If so, I have one thing to say to you -- welcome to the club." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):67 +msgid "www.gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):71 +msgid "In our case, our Web site dilemma exists because our project has been growing, and our Web site hasn't. Now that Gentoo Linux is approaching the 1.0 release (when it'll be officially ready for non-developers) and is growing in popularity, we need to start seriously looking at how our Web site can better serve its users. Here's a snapshot of www.gentoo.org:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(figure:link):80 +msgid "/images/docs/l-redesign-01.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(figure:caption):80 +msgid "The current (March 2001) state of affairs at www.gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):82 +msgid "As you can see, we have all the bare essentials -- a description of Gentoo Linux, a features list, a daily Changelog (automatically updated thanks to Python), and a bunch of important links (to the download sites, to our mailing list sign-up pages, and to cvsWeb). We also have links to three documentation resources -- the Gentoo Linux Install Guide and Development Guides, and Christian Zander's NVIDIA Troubleshooting Guide." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):91 +msgid "However, while the site seems O.K., we're missing a lot of things. The most obvious is documentation -- our installation and development guides need a lot of work. And then we need to add an FAQ, new links, new user information...the list is endless." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):101 +msgid "Content vs. display" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):104 +msgid "And now we come to our second problem. Right now, all of our work is done in raw HTML; I hack away at the index.html file until it looks O.K. Even worse, our Web documentation is written in raw HTML. This isn't a good thing from a development perspective because our raw content (consisting of paragraphs, sections, chapters) is garbled together with a bunch of display-related HTML tags. This, of course, makes it difficult to change both the content and the look of our site. While this approach has worked so far, it is bound to cause problems as our site continues to grow." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):115 +msgid "Clearly, we need to be using better technologies behind the scenes. Instead of using HTML directly, we need to start using things like XML, XSLT, and Python. The goal is to automate as much as possible so that we can add and expand our site with ease. If we do our job well, even major future changes to our site should be relatively painless." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):126 +msgid "A strategy!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):129 +msgid "It was clear that we had a lot of work ahead of us. In fact, there was so much to be done that I didn't know where to begin. Just as I was trying to sort out everything in my head, I came across Laura Wonnacott's \"Site Savvy\" InfoWorld column (see <uri link=\"#resources\">Resources</uri>). In it, she explained the concept of \"user-centric\" design -- how to improve a Web site while keeping the needs of your target audience (in this case, Gentoo Linux users and developers) in focus. Reading the article and taking a look at the \"Handbook of User-Centered Design\" link from the article helped me to formulate a strategy -- an action plan -- for the redesign:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):142 +msgid "First, clearly define the official goal of the Web site -- in writing. What's it there for, and what's it supposed to do?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):146 +msgid "Identify the different categories of users who will be using your site -- your target audience. Rank them in order of priority: Which ones are most important to you?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):151 +msgid "Set up a system for getting feedback from your target audience, so they can let you know what you're doing right and wrong." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):155 +msgid "Evaluate the feedback, and use it to determine what parts of the site need to be improved or redesigned. Tackle high-priority sections first." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):159 +msgid "Once you've selected the part of the site to improve, get to work! During your implementation, make sure that the content and design of the new section caters specifically to the needs of your target audience and fixes all known deficiencies." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):165 +msgid "When the section redesign is complete, add it to your live site, even if it has a look that's markedly different from your current site. This way, your users can begin benefitting from the newly redesigned section immediately. If there's a problem with the redesign, you'll get user feedback more quickly. Finally, making incremental improvements to your site (rather than revamping the whole site and then rolling it out all at once -- surprise!) will help prevent your users from feeling alienated by your (possibly dramatic) site changes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):175 +msgid "After completing step 6, jump to step 4 and repeat." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):181 +msgid "The mission statement" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):184 +msgid "I was happy to discover that we already had step 3 in place. We had received several e-mail suggestions from visitors to the site, and our developer mailing list also served as a way of exchanging suggestions and comments. However, I had never really completed steps 1 or 2. While the answers may seem obvious, I did find it helpful to actually sit down and write out our mission statement:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):192 +msgid "www.gentoo.org exists to assist those who use and develop for Gentoo Linux by providing relevant, up-to-date information about Gentoo Linux and Linux in general, focusing on topics related to Gentoo Linux installation, use, administration, and development. As the central hub for all things Gentoo, the site should also feature important news relevant to Gentoo Linux users and developers. In addition to catering to Gentoo Linux users and developers, www.gentoo.org has the secondary purpose of meeting the needs of potential Gentoo Linux users, providing the information they need to decide whether Gentoo Linux is right for them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):207 +msgid "The target audience" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):210 +msgid "So far, so good. Now for step 2 -- defining our target audience:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):214 +msgid "www.gentoo.org has three target audiences -- Gentoo Linux developers, users, and potential users. While no one group is absolutely a higher priority than another, right now the needs of Gentoo Linux developers are our highest priority, followed by Gentoo Linux users, and then potential users. This is because Gentoo Linux is currently in a prerelease state. When Gentoo Linux reaches version 1.0, Gentoo Linux users and potential users will also become a priority." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):227 +msgid "Comments and suggestions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):230 +msgid "O.K., now it's time to evaluate the suggestions and comments we've collected:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):234 +msgid "Over the past few months, we've received a number of suggestions from Web site visitors. Overwhelmingly, people are requesting better documentation -- for both developers and users. Several developers have asked if we could create a mailing list that would be devoted exclusively to describing CVS commits." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):241 +msgid "Interestingly, we've also received a couple of e-mails asking whether Gentoo Linux is a commercial or free product. I'm guessing that because our main logo is inscribed with the name \"Gentoo Technologies, Inc.\" (our legal corporation name), people assume that we have a commercial focus. Modifying our logo so that it reads \"Gentoo Linux\" and adding small opening paragraph to the main page explaining that we are a free software project should help." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):253 +msgid "The improvement list" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):256 +msgid "O.K., now let's turn these suggestions into a list of possible improvements:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):263 +msgid "Implementation: update logo and add free software blurb" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):264 +msgid "Goal: to clearly state that we are a free software project" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):265 +msgid "Target group: potential users" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):266 ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):274 +msgid "Difficulty: medium" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):261 +msgid "Revamp main page <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):271 +msgid "Implementation: new XML/XSLT system, verbose documentation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):272 +msgid "Goal: to make it easier for users to install Gentoo Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):273 +msgid "Target group: new users" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):269 +msgid "Improve basic user documentation <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):279 +msgid "Implementation: new XML/XSLT system, CVS guide, dev guide, Portage guide" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):280 +msgid "Goal: to help our developers to do a great job" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):281 ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):289 +msgid "Target group: developers" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):282 +msgid "Difficulty: hard" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):277 +msgid "Improve/create developer documentation <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):287 +msgid "Implementation: use our existing mailman mailing list manager" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):288 +msgid "Goal: to better inform our developers" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):290 +msgid "Difficulty: easy" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):285 +msgid "Add a CVS mailing list <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):298 +msgid "A selection!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):301 +msgid "Two things leap out from the list, for different reasons. The first is the CVS mailing list -- this one is a no-brainer because it's so easy to implement. Often, it makes sense to implement the easiest changes first so that users can benefit from them right away." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):308 +msgid "The second big thing that leaps out from the list is the need for developer documentation. This is a longer-term project that will require much more work. From my conversations with the other developers, we all appear to be in agreement that some kind of XML/XSL approach is the right solution." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):318 +msgid "The XML/XSL prototype" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):321 +msgid "To help start the process, I developed a prototype XML syntax to be used for all our online documentation. By using this XML syntax (called \"guide\"), our documentation will be clearly organized into paragraphs, sections, and chapters (using XML tags like <section>, <chapter>, etc.) while remaining free of any display-related tags. To create the HTML for display on our site, I created a prototype set of XSL transforms. By using an XSLT processor such as Sablotron, our guide XML files can be converted into HTML as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre:caption):331 +msgid "Converting guide XML files to HTML" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre):331 +#, no-wrap +msgid "\ndevguide.xml + guide.xsl ---XSLT processor---> devguide.html\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):335 +msgid "The great thing about this XML/XSLT approach is that it separates our raw content (XML) from the display-related information contained in the guide.xsl (XSLT) file. If we ever need to update the look of our Web pages, we simply modify the guide.xsl file and run all our XML through the XSLT processor (Sablotron), creating updated HTML pages. Or, if we need to add a few chapters to the development guide, we can modify devguide.xml. Once we're done, we then run the XML through Sablotron, which then spits out a fully-formatted devguide.html file with several added chapters. Think of XML as the content and XSLT as the display-related formatting macros." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):347 +msgid "While our entire team is convinced that XML/XSLT is the way to go, we haven't yet agreed upon an official XML syntax. Achim, our development lead, suggested that we use docbook instead of rolling our own XML syntax. However, the prototype guide XML format has helped to start the decision-making process. Because we developers are going to be the ones using the XML/XSL on a daily basis, it's important to choose a solution that we're comfortable with and meets all of our needs. By my next article, I should have a working XML/XSL doc system to show off to you." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):361 +msgid "Technology demo: pytext" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):364 +msgid "For the most part, our current Web site isn't using any new or super-cool technologies that are worth mentioning. However, there's one notable exception -- our tiny pytext embedded Python interpreter." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):370 +msgid "Like many of you, I'm a huge Python fan and much prefer it over other scripting languages, so when it came time to add some dynamic content to our Web site, I naturally wanted to use Python. And, as you probably know, when coding dynamic HTML content, it's usually much more convenient to embed the language commands inside the HTML, rather than the other way around. Thus, the need for an embedded Python interpreter that can take a document like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre:caption):379 +msgid "Source document" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre):379 +#, no-wrap +msgid "\n<p>\nYeah, sure; I got some questions:<br>\n<!--code\nnames=[\"bob\",\"jimmy\",\"ralph\"]\nitems=[\"socks\",\"lunch\",\"accordion\"]\nfor x in items:\nfor y in names:\nprint \"Anyone seen\",y+\"'s\",x+\"?<br>\"\n-->\nSee, told you so.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):392 +msgid "....and transform it into this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre:caption):396 +msgid "Target document" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre):396 +#, no-wrap +msgid "\n<p>\nYeah, sure; I got some questions:<br>\nAnyone seen bob's socks?<br>\nAnyone seen jimmy's socks?<br>\nAnyone seen ralph's socks?<br>\nAnyone seen bob's lunch?<br>\nAnyone seen jimmy's lunch?<br>\nAnyone seen ralph's lunch?<br>\nAnyone seen bob's accordion?<br>\nAnyone seen jimmy's accordion?<br>\nAnyone seen ralph's accordion?<br>\nSee, told you so.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):411 +msgid "Here's the source code for pytext:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre:caption):415 +msgid "The pytext embedded Python interpreter" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre):415 +#, no-wrap +msgid "\n#!/usr/bin/env python\n\n# pytext 2.1\n# Copyright 1999-2001 Daniel Robbins\n# Distributed under the GPL\n\nimport sys\n\ndef runfile(myarg):\n \"interprets a text file with embedded elements\"\n mylocals={}\n try:\n a=open(myarg,'r')\n except IOError:\n sys.stderr.write(\"!!! Error opening \"+myarg+\"!\\n\")\n return\n mylines=a.readlines()\n a.close()\n pos=0\n while pos<len(mylines):\n if mylines[pos][0:8]==\"<!--code\":\n mycode=\"\"\n pos=pos+1\n while (pos<len(mylines)) and (mylines[pos][0:3]!=\"-->\"):\n mycode=mycode+mylines[pos]\n pos=pos+1\n exec(mycode,globals(),mylocals)\n else:\n sys.stdout.write(mylines[pos])\n pos=pos+1\n\nif len(sys.argv)>1:\n for x in sys.argv[1:]:\n runfile(x)\n sys.exit(0)\nelse:\n sys.stderr.write\n (\"pytext 2.1 -- Copyright 1999-2001 Daniel Robbins. \")\n sys.stderr.write\n (\"Distributed under the\\nGNU Public License\\n\\n\")\n sys.stderr.write\n (\"Usage: \"+sys.argv[0]+\" file0 [file1]...\\n\")\n sys.exit(1)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):464 +msgid "How pytext works" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):467 +msgid "Here's how it works. It scans each input line, and most of the time, each input line is simply echoed to stdout. However, if pytext encounters a line beginning with <!--code, then the contents of every line up to the first line beginning with --> are appended to a string called mycode. Pytext then executes the mycode string using the built-in exec() function, effectively creating an embedded Python interpreter." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):476 +msgid "There's something really beautiful about this particular implementation -- we call exec() in such a way that all modifications to the global and local namespaces are saved. This makes it possible to import a module or define a variable in one embedded block, and then access this previously-created object in a later block, as this example clearly demonstrates:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre:caption):484 +msgid "Sample code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre):484 +#, no-wrap +msgid "\n<!--code\nimport os\nfoo=23\n-->\n\nHello\n\n<!--code\nprint foo\nif os.path.exists(\"/tmp/mytmpfile\"):\nprint \"it exists\"\nelse:\nprint \"I don't see it\"\n-->\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):501 +msgid "Handy, eh? pytext serves is an excellent demonstration of the power of Python, and is an extremely useful tool for Python fans. For our current site, we call pytext from a cron job, using it to periodically generate the HTML code for our main page Changelog:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre:caption):508 +msgid "Generating the HTML code for main page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre):508 +#, no-wrap +msgid "\npytext index.ehtml > index.html\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):512 +msgid "That's it for now; I'll see you next time when we'll take a look at the first stage of the www.gentoo.org redesign!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):522 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):531 +msgid "In <uri link=\"/doc/en/articles/l-redesign-2.xml\">Part 2</uri>, Daniel shows off the new documentation system and sets up a daily CVS-log mailing list (May 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):536 +msgid "In <uri link=\"/doc/en/articles/l-redesign-3.xml\">Part 3</uri>, he creates a new look for the site (July 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):540 +msgid "In <uri link=\"/doc/en/articles/l-redesign-4.xml\">Part 4</uri>, Daniel completes the conversion to XML/XSLT, fixes a host of Netscape 4.x browser compatibility bugs, and adds an auto-generated XML Changelog to the site (Aug 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):527 +msgid "Read the other articles in this developerWorks series about the redesign of the www.gentoo.org Web site using technologies like XML, XSLT, and Python: <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):548 +msgid "If you haven't started using Python yet, you're only hurting yourself. Find it at <uri>http://www.python.org</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):552 +msgid "Laura Wonnacott's <uri link=\"http://www.infoworld.com/articles/op/xml/01/03/05/010305opsavvy.xml\">Site Savvy</uri> column appears regularly on InfoWorld.com." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):557 +msgid "Check out <uri link=\"http://www.xara.com/\">Xara.com</uri>, the home of Xara X -- an excellent vector drawing package for Windows. With virtually no bloat and blazing speed, it has my personal recommendation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):562 +msgid "Learn more about XSLT at <uri>http://www.xslt.com</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):563 +msgid "When you wake up, check out Sablotron, a fast XSLT processor available from <uri link=\"http://www.gingerall.com\">Gingerall</uri>" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-redesign-2.xml.pot b/article/gettext/l-redesign-2.xml.pot new file mode 100644 index 0000000..7c417b2 --- /dev/null +++ b/article/gettext/l-redesign-2.xml.pot @@ -0,0 +1,266 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(guide:link):5 +msgid "/doc/en/articles/l-redesign-2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):6 +msgid "The gentoo.org redesign, Part 2: A site reborn" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(abstract):12 +msgid "Have you ever woken up in the morning to the realization that your personal development Web site isn't really that great? If so, you're in good company. In this series, Daniel Robbins shares his experiences as he redesigns the www.gentoo.org Web site using technologies like XML, XSLT, and Python. Along the way, you may find some excellent approaches to use in your next Web site redesign. In this, the second installment, Daniel shows off the new documentation system and sets up a daily CVS-log mailing list." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(version):27 +msgid "1.0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(date):28 +msgid "2005-10-10" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):31 +msgid "The doc system" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):35 +msgid "If you've read the <uri link=\"/doc/en/articles/l-redesign-1.xml\">first installment</uri> of my series on the gentoo.org redesign, then you know that I'm the Chief Architect of Gentoo Linux, making me responsible for the Gentoo Linux Web site. And right now, the site leaves a lot to be desired. Yes, it does look somewhat attractive, but when you look beyond the cute graphics you will see that it really doesn't serve the needs of its primary target audience: Gentoo Linux developers, users, and potential users." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):45 +msgid "Last time, I used a user-centric design approach to create a set of priorities for the site, and then used these priorities to create an action plan for revamping gentoo.org. Two things were at the top of the priority list: new developer documentation and a new mailing list to communicate to developers changes made to our CVS repository. While adding the new CVS mailing list was relatively easy (though, as you will see, it was more difficult than I thought), the new developer documentation required a lot of planning and work." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):55 +msgid "Not only did I need to create some actual documentation (a task that I had been ignoring for too long), but I also had to choose an official XML syntax that our new master documentation would use. You see, until a few weeks ago, I was creating the documentation in raw HTML. This was definitely a naughty thing to do, because by doing this content was being mixed (the actual information) with presentation (the display-related HTML tags). And what did I end up with? An inflexible mess, that's what. It was hard to edit the actual documentation and extremely difficult to make site-wide HTML improvements." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):66 +msgid "In this article, I'll proudly demonstrate the site's new flexible XML documentation solution. But first, I'll recap my experiences in adding the CVS log mailing list to our site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):75 +msgid "Adding the CVS log mailing list" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):78 +msgid "The goal of the CVS log mailing list is to inform developers of new commits made to our CVS repository. Since I already had the mailman mailing list manager (see <uri link=\"#resources\">Resources</uri>) installed, I thought that creating this new list would be easy. First, I would simply create the mailing list, then add the proper \"hook\" to the CVS repository so that e-mails would be automatically generated and sent out, describing the changes to our sources as they happened." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):88 +msgid "I first started researching a special file in my repository's CVSROOT called \"loginfo.\" Theoretically, by modifying this file, I could instruct CVS to execute a script when any commit (and thus, modification) was made to the repository. So I created a special loginfo script and plugged it into my existing repository. And it did indeed send out e-mails to the new \"gentoo-cvs\" mailing list whenever modifications were made to our sources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):97 +msgid "Unfortunately, this solution wasn't all I'd hoped it would be. First of all, it generated lots of e-mail messages -- one for each modified file -- and secondly, the messages were cryptic and sometimes even empty! I quickly removed my loginfo script and put the gentoo-cvs mailing list project on hold. It was clear that CVS's loginfo hook wasn't appropriate for my needs, and I had a hard time tracking down any loginfo-related documentation that could help me solve my problem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):110 +msgid "cvs2cl.pl" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):113 +msgid "Several weeks later I started looking for an alternative to loginfo. This time I did the smart thing and headed over to <uri>http://freshmeat.net</uri>. There I quickly found just what I was looking for: the incredibly wonderful <path>cvs2cl.pl</path> perl script available from <uri>http://red-bean.com</uri> (see <uri link=\"#resources\">Resources</uri>). Instead of using the loginfo hook, <path>cvs2cl.pl</path> uses the <c>cvs log</c> command to connect directly to the repository and extract the appropriate relevant log information. Also, rather than spitting out relatively cryptic CVS log messages, it does a great job of reformatting everything into a readable ChangeLog format:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(pre:caption):126 +msgid "Output generated by cvs2cl.pl" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(pre):126 +#, no-wrap +msgid "\n2001-04-09 20:58 drobbins\n * app-doc/gentoo-web/files/xml/dev.xml: new fixes\n2001-04-09 20:47 drobbins\n * app-doc/gentoo-web/: gentoo-web-1.0.ebuild, \n files/pyhtml/index.pyhtml, files/xml/gentoo-howto.xml: new gentoo-howto\n fixes\n2001-04-09 20:03 drobbins\n * app-doc/gentoo-web/files/xml/dev.xml: typo fix\n2001-04-09 20:02 drobbins\n * app-doc/gentoo-web/files/pyhtml/index.pyhtml: little update\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):139 +msgid "<path>cvs2cl.pl</path> can also be instructed to generate output in XML format, and in my next article I'll take advantage of this by incorporating an up-to-date ChangeLog into the new developer section of our site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):148 +msgid "The cvslog.sh script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):151 +msgid "Here's the script I now use to generate the daily ChangeLog e-mails. First, it changes the current working directory to the location of my checked-out CVS repository. Then, it creates $yesterday and $today environment variables that contain the appropriate dates in RFC 822 format. Notice that both date variables have the time set to either \"00:00\" or midnight. These variables are, in turn, used to create a $cvsdate variable that is then passed to cvs2cl.pl to specify the date range that I'm interested in -- the span of time from yesterday at midnight to today at midnight. Thus, the $cvsdate variable contains a datespec that informs <path>cvs2cl.pl</path> to log only changes made yesterday, but not others." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):164 +msgid "In addition, I also created a $nicedate variable (used in the mail subject line) and use the mutt mailer (in mailx compatibility mode [see Resources]) to send the e-mail to the gentoo-cvs mailing list:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(pre:caption):170 +msgid "cvslog.sh script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(pre):170 +#, no-wrap +msgid "\n#!/bin/bash\ncd /usr/portage\ncvs -q update -dP\nyesterday=`date -d \"1 day ago 00:00\" -R`\ntoday=`date -d \"00:00\" -R`\ncvsdate=-d\\'${yesterday}\\<${today}\\'\nnicedate=`date -d yesterday +\"%d %b %Y %Z (%z)\"`\n/home/drobbins/gentoo/cvs2cl.pl -f /home/drobbins/gentoo/cvslog.txt -l \"${cvsdate}\" \nmutt -x gentoo-cvs -s \"cvs log for $nicedate\" <\\\n/home/drobbins/gentoo/cvslog.txt\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):183 +msgid "Using cron, I run this script every night at midnight. Thanks to <path>cvs2cl.pl</path>, my developers now get accurate and readable daily CVS updates." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):192 +msgid "The documentation project" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):195 +msgid "Now, for the Gentoo Linux documentation project. Our new documentation system involves two groups of people or target audiences: the documentation creators and the documentation readers. The creators need a well-designed XML syntax that doesn't get in their way; the readers, who couldn't care less about the XML, want generated HTML documentation that is both functional and attractive. The implementation challenge is to put together a complete system that addresses the needs of both audiences. Oh, and I suppose there is a third \"audience\" -- me, the webmaster and the person designing the new system. Since I'm going to be interacting with the new doc system whenever the site is upgraded, I need it to be reliable and flexible." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):211 +msgid "The Web-ready HTML" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):214 +msgid "First, let's talk a bit about the Web-ready HTML that'll be generated from my master XML files. To make great, readable documentation, I'll need to have support for the proper XML tags. For example, the ability to insert notes, important messages, and warnings into the body of the document (and have them prominently displayed in the resultant HTML) is a must. Also, I must be able to insert blocks of code, and it would be great if actual user input could somehow be offset from program output. I could even add tags that highlight the source code comments in an alternate color so that the code blocks are more readable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):225 +msgid "The documents should have a table of contents (with hyperlinks to the appropriate chapters), a synopsis, a revision date, version, and an authors list at the top of the document. And, of course, every document should have a header at the extreme top of the page containing a small Gentoo Linux logo. Clicking on this logo should bring you back to the main Gentoo Linux page. Last but not least, every document should have a footer that contains copyright information, along with a contact e-mail address." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):238 +msgid "The spiffy new logo" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):241 +msgid "This was a hefty list of requirements, and I decided to focus on the most entertaining part first, the new Gentoo Linux logo that would appear in the upper-left corner of every Gentoo Linux document. I used the \"g\" from the \"gentoo\" graphic (created using the excellent and free Blender 3D program) on our main page as the basis for the new smaller logo. I tweaked the extrusion settings a bit and then added a chrome environment map. Finally, I positioned the lights and camera just so, and the new logo was complete. After importing it into Xara X (see <uri link=\"#resources\">Resources</uri>) and adding some text, this was the result:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(figure:link):254 +msgid "/images/docs/l-redesign-02.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(figure:caption):254 +msgid "The new Gentoo Linux logo" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):256 +msgid "I used this new logo as inspiration for the rest of the HTML color scheme, using a purplish theme throughout. I made heavy use of cascading style sheets (CSS) to control font attributes and spacing. Once I had a decent HTML prototype in place, I started focusing on the guts of the new documentation -- the new XML syntax. I wanted the syntax to be as simple as possible, so I created just enough XML tags to allow for the proper organization of the document, but no more. Then I started working on the XSLT to transform the XML into the target HTML." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):270 +msgid "The result!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):273 +msgid "After much tweaking and a good amount of feedback from one of my developers, the new documentation system reached the point where it was ready for use. I immediately began work on our first new development guide, \"The Gentoo Linux Documentation Guide\" (xml-guide.html), which contains a complete description of the new XML format. Not only did this allow other developers to begin work on the new-style documentation, but it also served as an excellent example of the new documentation system in action. Be sure to read this guide to get a complete understanding of our new XML syntax." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):287 +msgid "DocBook vs. Guide" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):290 +msgid "If you're working on your own documentation solution, you may also want to consider the DocBook XML and SGML formats (see Resources). DocBook is well-suited for large-scale technical documentation and book projects, is very flexible, and has many (maybe too many) features. In addition, there are a number of existing packages that can be used to convert DocBook XML/SGML to man pages, texinfo files, Postscript, PDF, and, of course, HTML formats." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):299 +msgid "I <e>didn't</e> choose DocBook because a lightweight XML syntax worked best for Gentoo's needs. Right now, our XML guide syntax has around 20 tags and about 10 attributes. The limited tagset makes guide XML easy to transform into other formats such as HTML, and also ensures a certain level of consistency throughout our entire documentation set, since the format is so simple. Because I have my own XML format, I'll be able to extend the format with new tags as needed. I like having that level of control. I view XML as a technology that should be used by people to structure their data in ways that they find most helpful. In other words, the ability to define our own elements and attributes is a precious thing, and I should take full advantage of it. After all, it's the defining feature of XML." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):313 +msgid "Of course, creating your own XML syntax is not always the best solution, especially when data interchange is important to you. Amid all the XML hype, one thing that is often overlooked is that <e>conversion to and from different XML formats can be extremely difficult</e>. In many cases, the two formats won't be 100% compatible, and you'll have the unpleasant choice of either throwing away data and/or metadata, intentionally avoiding use of certain elements or attributes, or creating a \"super-format\" that will accommodate the data and metadata from both XML formats. In the documentation world, DocBook is a pretty good choice as a \"super-format\" because it's so flexible; it can easily accommodate documentation imported from a variety of sources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):326 +msgid "However, DocBook's richness and flexibility can also create problems. For example, there may be hundreds of tags that you may never need, and supporting all these tags in your XSLT can make conversion to other formats more difficult. So, while DocBook is a great container for documentation converted from other formats, your own minimal XML syntax will almost always be easier to convert to other formats." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):335 +msgid "The most important thing is to carefully evaluate any potential solution while keeping the needs of your target audience(s) in mind." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):343 +msgid "Wrapping it up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):346 +msgid "With the new doc system in place, I converted all our docs to the new format and posted the new docs on our existing site. In addition, I created a link to the gentoo-cvs mailing list subscription page. The key point here is that I integrated these features into the existing site so that users could benefit from the improvements right away." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):359 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):368 +msgid "In <uri link=\"/doc/en/articles/l-redesign-1.xml\">Part 1</uri>, the author creates a user-centric action plan and introduces pytext, an embedded Python interpreter (March 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):373 +msgid "In <uri link=\"/doc/en/articles/l-redesign-3.xml\">Part 3</uri>, he creates a new look for the site (July 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):377 +msgid "In <uri link=\"/doc/en/articles/l-redesign-4.xml\">Part 4</uri>, Daniel completes the conversion to XML/XSLT, fixes a host of Netscape 4.x browser compatibility bugs, and adds an auto-generated XML Changelog to the site (Aug 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):364 +msgid "Read the other articles in this developerWorks series about the redesign of the www.gentoo.org Web site using technologies like XML, XSLT, and Python: <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):385 +msgid "If you haven't started using <uri link=\"http://www.python.org\">Python</uri> yet, you're only hurting yourself. Go check it out." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):389 +msgid "<uri link=\"http://www.xara.com/\">Xara.com</uri> is the home of Xara X -- an excellent vector drawing package for Windows. With virtually no bloat and blazing speed, it has my personal recommendation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):394 +msgid "Learn more about <uri link=\"http://www.xslt.com\">XSLT</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):395 +msgid "When you wake up, check out Sablotron, a fast XSLT processor available from <uri link=\"http://www.gingerall.com\">Gingerall</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):399 +msgid "You can find the wonderful <uri link=\"http://www.red-bean.com/cvs2cl/\">cvs2cl.pl</uri> CVS-to-ChangeLog script at <uri link=\"http://www.red-bean.com/\">Red-Bean</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):404 +msgid "Learn more about DocBook at <uri>http://www.docbook.org</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):405 +msgid "If you're looking for a great mailing list manager, be sure to take a look at <uri link=\"http://www.list.org/\">Mailman</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):409 +msgid "Check out <uri link=\"http://www.mutt.org\">www.mutt.org</uri> for the most current version of the Mutt e-mail client." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-redesign-3.xml.pot b/article/gettext/l-redesign-3.xml.pot new file mode 100644 index 0000000..ddcb3f3 --- /dev/null +++ b/article/gettext/l-redesign-3.xml.pot @@ -0,0 +1,308 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(guide:link):5 +msgid "/doc/en/articles/l-redesign-3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):6 +msgid "The gentoo.org redesign, Part 3: A site reborn" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(abstract):12 +msgid "Have you ever woken up one morning and suddenly realized that your cute little personal development Web site isn't really that great? If so, you're in good company. In this series, Daniel Robbins shares his experiences as he redesigns the www.gentoo.org Web site using technologies like XML, XSLT, and Python. Along the way, you may find some excellent approaches to use for your next Web site redesign. In this installment, Daniel creates a new look for the site as a whole." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(version):27 +msgid "1.0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(date):28 +msgid "2005-10-10" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):31 +msgid "The new main pages" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):33 +msgid "The site so far" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):36 +msgid "So far, www.gentoo.org is showing marked improvement. In the <uri link=\"/doc/en/articles/l-redesign-2.xml\">last article</uri>, I designed a new documentation system using XML and XSLT, so all our site documentation is looking great and is serving the needs of our visitors. However, the look of the site as a whole hasn't changed; that's because I haven't really touched the HTML that users see when they initially visit our site. Our main page still looks the same as it did before." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):46 +msgid "Well, it's time for that to change. As I mentioned in the <uri link=\"/doc/en/articles/l-redesign-1.xml\">first article</uri>, our main page is getting too congested and we have no room for expansion. As you can see, I've packed quite a bit of content into <uri link=\"/images/docs/l-redesign-13.gif\">the page</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):54 +msgid "I can't continue piling important links and paragraphs onto the main page -- there isn't any room! Fortunately for us, real estate on the Web is absolutely free." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):60 +msgid "So, to solve this problem, I'll split our single main page (index.html) into several subject-specific category pages (index-about.html, index-download.html, etc.) and create a menu system that will allow the user to easily move from one category page to another. The default page that loads when a user visits <b>http://www.gentoo.org</b> will be the \"About Gentoo Linux\" category page. This is an excellent choice because it provides general information about the project that will be of interest to first-time visitors." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):73 +msgid "Site goals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):76 +msgid "Now, I'm going to outline the goals of this new \"category page\" system, as well as some general design goals that you can apply to your own projects. Then, we'll take a look at how the category page redesign meets these goals." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):85 +msgid "Modularity" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):88 +msgid "The new category page system needs to be modular. What does this mean, exactly? Well, at the moment I have \"About Gentoo Linux\" and \"Download/Install\" categories in mind, but in the future I may need to add \"About the Team\" or \"Support\" categories as well. Having the ability to easily add new categories in the future requires that accommodations be put in place during the design stage. I'll have to make sure that there's room for additional category links on my navigation menu, and that the layout of the page is general-purpose enough so that it can be used to present many different kinds of information. Then, adding new categories will be relatively easy and I'll be able to avoid completely redesigning the site, if in a few months I once again find that things don't fit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):102 +msgid "There is a very important second step to modular design -- the use of XML and XSLT to separate presentation from content. If you've read part 2 of this series, then you're at least familiar with this type of design. Once I have the proper XSL template created, I can generate as many category pages as I like by simply providing the proper XML. And unlike the HTML, my XML will contain no display-related information; it's pure content. We'll take a look at the XML/XSLT implementation of the category pages in the fourth and final installment in this series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):116 +msgid "General style guidelines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):119 +msgid "It's also very important that the new category layout be visually appealing. Remember, when a user types in http://www.gentoo.org, the \"About Gentoo Linux\" category page will appear first, so I want this to be an attractive page. Now, the word \"attractive\" means different things to different people, but this article presents a few good general guidelines that I am using during the design of the new category page that should apply to almost any Web site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):131 +msgid "That boxy look" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):134 +msgid "For general page layout, simple is best. If you're going to organize a bunch of complicated information, why not use a master table to split the page into various regions? This will also help to ensure that various parts of the page line up, which makes for a clean, attractive design. For example, this particular type of page layout is generally not very appealing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:link):143 +msgid "/images/docs/l-redesign-03.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:caption):143 +msgid "A sub-optimal page layout" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):145 +msgid "However, if the same information is presented using a common master grid, the site starts looking a lot cleaner:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:link):151 +msgid "/images/docs/l-redesign-04.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:caption):151 +msgid "Aligned to a grid, things become less confusing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):153 +msgid "And remember, the simpler your layout, the more information you'll be able to pack into the page without annoying your visitors" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):161 +msgid "Text and background color" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):164 +msgid "Next, we come to color choice. I have to admit that I happen to find bright green text on a dark blue background very appealing. But let's face it -- no matter how exotic and nifty they may look, dark backgrounds are a poor choice for text regions on a Web site. People expect to see dark text on a light background, and I for one think we should give them what they want." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):172 +msgid "Well, I should clarify my position. Using light text on a dark background is a horrible choice for presenting paragraphs of information, but can be quite attractive and functional for your menu bar, or a small list of links. In other words, inverted text can be a great accent, but go with a traditional color scheme for your main text content areas; you'll thank me later. This will also help to ensure that your site looks good on paper." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):184 +msgid "Contrast" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):187 +msgid "Besides the dark text/light background issue, there aren't many hard rules when it comes to Web site design. If you like dark colors, it's perfectly fine to make the top part of the page dark blue, for example. Now, hear me correctly: If you make the entire page dark blue, you've done a bad thing. If you make a portion of the page (preferably a portion of the page that doesn't have much text in it) dark blue, you might actually be doing a very good thing, because that dark blue will contrast nicely with your white text area and add some additional drama to your new site. In fact, a large portion of your page can contain saturated or dark colors; again, just make sure that your main text content is presented in a traditional fashion." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):203 +msgid "Functional layout" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):206 +msgid "I also want to ensure that the Web page is neither too cluttered nor too sparse. I suppose that all of us struggle with this challenge; some of us have a tendency to pack so much information into a page that it becomes totally unintelligible, while others include so many large margins and useless empty spaces that users are forced to scroll down several pages to find the information they need. For the new category pages, I want to use minimal margins -- just enough to keep things readable would be good, I figure. I'll only use empty spaces on the page if things are truly getting too cluttered. After all, the whole purpose of these category pages is to solve a space problem, and it would be good to concentrate as much information into as small a space as possible, as long as readability isn't compromised in the process." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):220 +msgid "A high information density has another advantage: Users are less likely to need to scroll down to find the information they need. This makes the page significantly more pleasant to use. (If you don't believe me, design a couple of mock-up pages and see for yourself.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):230 +msgid "Content supercedes art" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):233 +msgid "In working on the site layout, I have quickly learned that a Web page redesign should primarily be used as an opportunity to present content (actual information that's useful to my visitors) in a readable and meaningful way, rather than just another occasion to make an artistic statement or to exude large quantities of -- er -- corporate identity. Not that artistic statements are necessarily forbidden, but if by making one I hurt the presentation of my content, then I'm not doing my visitors a favor." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):243 +msgid "Once in a while, it's a good idea to step back and acknowledge that the people who are visiting our site are primarily looking for information rather than zany new approaches to Web design. If this is something you struggle with, be comforted: I, too, am tempted to focus on artsy stuff and leave all other priorities at the wayside." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):254 +msgid "The result" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):257 +msgid "Now that we've covered some of my redesign goals, let's take a look at the new gentoo.org category pages. Here's the new page that you're greeted with when you visit <b>http://www.gentoo.org</b>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:link):264 +msgid "/images/docs/l-redesign-05.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:caption):264 +msgid "The new www.gentoo.org main page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):266 +msgid "I have to say that I'm really pleased with the redesign, and I really like the look of the new site. Notice how tables are used to break the page into four regions: the top left logo area, the black menu area, the gray infobar area, and the white main content area. Also notice that the clean alignment of these four regions makes the design simple yet attractive." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):274 +msgid "Now, look at the colors. As I mentioned earlier, I'm a big fan of extremely dark Web sites. However, because a very dark site is a bad thing, I reached a compromise: Dark parts were limited to the top regions, and inverted text was used only in the menu region, the logo and the title for the floating \"Gentoo Linux Features\" box. Because these parts of the page aren't used to present large quantities of text, I'm not going to annoy my visitors. Instead, they serve as nice accents to the main (white) text content area. Here's a snapshot of the \"Download/Install\" category page:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:link):286 +msgid "/images/docs/l-redesign-06.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:caption):286 +msgid "The www.gentoo.org download/install page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):288 +msgid "Another thing worth commenting on: You have probably noticed that the blue \"flying saucer guy\" and the red \"gentoo\" logo are from my original site. I decided to integrate these graphics into the new design so that the new main index.html page still looks familiar to my regular visitors. However, I omitted the \"flying saucer guy\" on every other page besides the main page so that more information could fit on the screen. The red \"gentoo\" logo was kept on every page because it helps to make the white content area more visually appealing and draws attention to the category title." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):302 +msgid "The nav-menu and title" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):305 +msgid "As you can see, the name of the current page is highlighted in bright green in the navigation menu, thanks to cascading style sheets (or CSS), and the current page name is repeated immediately below the red \"gentoo\" logo in the main content area. While I initially thought that this wasn't necessary, I found that simply highlighting the current page's navigation menu entry in green wasn't enough to provide users with an indication of what page they were on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):314 +msgid "Despite the clean look of the new site, I am cramming quite a bit of information into the page. One advantage to this is that under most display resolutions, a visitor will only need to scroll down to finish reading the main text. However, all hyperlinks should be immediately visible and accessible, requiring no vertical scrolling by the user. This makes the site as a whole easier to navigate -- a big win for usability." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):326 +msgid "Lost in Xara" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):329 +msgid "Just looking at the site doesn't really give you an idea of what the redesign process was like. I actually made a number of major logistical mistakes from the onset of the redesign. My greatest error was to immediately fire up Xara in an attempt to develop the new look for the category pages." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):336 +msgid "Once in Xara, I wasted a lot of time focusing almost exclusively on eye candy rather than on page layout. By doing so, I put the cart before the horse and ended up creating around 20 design prototypes that I eventually had to throw away. In the end, these prototypes were of no use to me because they did not deal with how to present the content." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):344 +msgid "Finally, I regained my senses, exited Xara, fired up a text editor, and wrotes the raw text that would appear on the page. Once the content was written, I developed a general page layout to present this text to the user -- no color schemes or eye candy just yet. Then, and only then, did I return to Xara and finalize the new look for the site, developing a color scheme and enhancing our logo. This time, the graphical design process went smoothly and relatively quickly because I had an existing framework (the text and layout) to direct my steps. Without this structure, I could have spent the rest of my life playing around in Xara, developing thousands of what-if design possibilities for the new site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):357 +msgid "When you redesign your site, remember that content comes first, layout second, and graphical embellishments a distant third. By taking this approach, you'll end up saving yourself a lot of time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):366 +msgid "User-centric IRC" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):369 +msgid "So, I did make a few mistakes during the design process, but I also did a couple of things right, and one of them was to allow the Gentoo Linux developers to review and comment on my work as it progressed. As you may recall from my first article, my action plan identified developers as my highest-priority target audience, so getting our existing developers involved in the design was clearly a wise choice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):378 +msgid "Doing this was easy. I just kept an IRC client running and connected to our IRC channel as I normally do, and then whenever I made any significant progress, I'd generate a .png snapshot of the current site and post it to our Web server. Then, everyone in the channel could take a look and comment on my work in real-time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):386 +msgid "These developers acted as my barometer, letting me know what designs and colors were the most popular, and what types of layouts worked best. If the site design became too crowded or complicated, someone would let me know and I'd adjust the HTML accordingly. When the category page design became more finalized, I started creating tarballs of the site HTML/images so that developers could play with the code and make any necessary fixes. Thus, the IRC channel allowed the HTML to be developed in a truly user-centric way. Last, but not least, the Gentoo Linux developers really helped me to debug the HTML code so that it was rendered optimally in a variety of modern browsers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):401 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):404 +msgid "Well, that's it for now. Join me in my <uri link=\"/doc/en/articles/l-redesign-4.xml\">next article</uri> when I finally convert the entire site to a fully-modular XML/XSLT-based system. That should provide some excitement as well as an opportunity to look at a lot of juicy behind-the-scenes XML development details!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):417 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):426 +msgid "In <uri link=\"/doc/en/articles/l-redesign-1.xml\">Part 1</uri>, the author creates a user-centric action plan and introduces pytext, an embedded Python interpreter (March 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):431 +msgid "In <uri link=\"/doc/en/articles/l-redesign-2.xml\">Part 2</uri>, Daniel shows off the new documentation system and sets up a daily CVS-log mailing list (May 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):436 +msgid "In <uri link=\"/doc/en/articles/l-redesign-4.xml\">Part 4</uri>, Daniel completes the conversion to XML/XSLT, fixes a host of Netscape 4.x browser compatibility bugs, and adds an auto-generated XML Changelog to the site (Aug 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):422 +msgid "Read the other articles in this developerWorks series about the redesign of the www.gentoo.org Web site using technologies like XML, XSLT, and Python: <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):444 +msgid "Learn more about cascading style sheets (CSS) by visiting the <uri link=\"http://www.w3.org/Style/CSS/\">CSS page</uri> at the World Wide Web Consortium, or W3C." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):449 +msgid "Check out <uri link=\"http://www.xara.com/\">Xara.com</uri>, the home of Xara X -- an excellent vector drawing package for Windows. With virtually no bloat, and blazing speed, it has my personal recommendation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):454 +msgid "Learn more about XSLT at <uri>http://www.xslt.com</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):455 +msgid "When you wake up, check out Sablotron, a nice, fast XSLT processor available from <uri link=\"http://www.gingerall.com/\">Ginger Alliance</uri>" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-redesign-4.xml.pot b/article/gettext/l-redesign-4.xml.pot new file mode 100644 index 0000000..9b24432 --- /dev/null +++ b/article/gettext/l-redesign-4.xml.pot @@ -0,0 +1,338 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(guide:link):5 +msgid "/doc/en/articles/l-redesign-4.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):6 +msgid "The gentoo.org redesign, Part 4: A site reborn" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(abstract):12 +msgid "Have you ever woken up one morning and suddenly realized that your cute little personal development Web site isn't really that great? If so, you're in good company. In this series, Daniel Robbins shares his experiences as he redesigns the Gentoo Linux Web site using technologies like XML, XSLT, and Python. This article: Daniel completes the conversion to XML/XSLT, fixes a host of Netscape 4.x browser compatibility bugs, and adds an auto-generated XML Changelog to the site." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(version):27 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(date):28 +msgid "2005-10-10" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):31 +msgid "The final touch" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):33 +msgid "A new look, but..." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):36 +msgid "At the end of the previous article, the Gentoo Linux Web site had a completely new look, but there are still some things that aren't quite complete. In this article, the final installment in this series, I finally put those finishing touches on the site, resulting in a fully-functional, refined, and modular XML-based site that's ready for the future. Here's what was missing from the site since the last article:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):48 +msgid "Loose ends" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):51 +msgid "First, while the site has a completely new look, only the documentation portion of the site is XML-based. The main \"category\" pages are still in raw HTML and need to be converted to an XML/XSLT solution to make things more maintainable and expandable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):58 +msgid "Also, my developers have found several problems with the raw HTML itself. The site looks particularly bad when viewed under Netscape 4.77 -- obviously, this is a problem. Also, there are a number of other minor rendering problems that appear in more modern browsers, the most annoying of which is a thin vertical black line that does not extend completely down the entire page, ruining the illusion that the main content area is being spoken by our flying-saucer guy. Also, our documentation pages don't completely match the more refined look of our new main category pages -- clearly something worth updating." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):72 +msgid "The goal" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):75 +msgid "Here's the plan for the final rework of the Gentoo Linux site. First, we'll totally rework the main page HTML, keeping the same overall look, but making the page more browser-compatible. At the same time, we'll add a few presentation-related refinements suggested by our visitors, and also fix browser compatibility problems with our existing \"guide\" documentation system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):83 +msgid "Next, we'll completely move the site over to XML and XSLT. By the end of this article, any change made to the site will be made by modifying XML or XSLT rather than directly editing HTML, which will now be generated automatically with the help of xsltproc. This will make the site a whole lot easier to maintain. Because Gentoo Linux is a community-developed project, this will, in turn, allow our developers (and me) to maintain and improve the site as needed. I'm really excited about this since it will save us a bunch of time and ensure that our visitors are greeted with up-to-date content." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):97 +msgid "Compatibility issues" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):100 +msgid "While Netscape 4.x is still a very widely used browser, it is difficult for me to decide exactly how many hoops to jump through in order to make the site look better when viewed through this browser. Should I merely ensure that the site is readable (without any major glitches) or should I do everything I can to make sure the site looks absolutely perfect under Netscape 4.x, even if that means using less or no CSS and adding strange compatibility hacks to the existing HTML?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):110 +msgid "In the end, I decide to make several major changes to the HTML so that the site will still look quite good under Netscape 4.x without focusing too much on minor bug-related table spacing and font-rendering issues. Here are some of the changes made to the site's HTML to get everything 4.x compatible. (The Gentoo Linux development team has submitted several of these fixes.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):118 +msgid "First, Netscape 4.x has a bug that causes CSS background colors of block elements to be displayed incorrectly. For example, here's how a particular portion of a guide document is supposed to be rendered:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:link):125 +msgid "/images/docs/l-redesign-07.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:caption):125 +msgid "A sample guide document in IE5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):127 +msgid "And, here is how Netscape 4.x renders this same portion when background colors are specified using CSS:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:link):133 +msgid "/images/docs/l-redesign-08.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:caption):133 +msgid "A sample guide document in Netscape 4.7; some fixes are needed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):135 +msgid "This is ugly. To fix it, existing block-level elements, such as this one..." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre:caption):139 +msgid "Sample paragraph" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre):139 +#, no-wrap +msgid "\n<p class=\"note\">This paragraph doesn't look so good in 4.x</p>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):143 +msgid "...were replaced with tables, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre:caption):147 +msgid "Sample table" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre):147 +#, no-wrap +msgid "\n<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n <tr>\n <td bgcolor=\"#ddffff\"><p class=\"note\">\n This looks a whole lot better in 4.x</p></td>\n </tr>\n</table>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):156 +msgid "This hack fixes the background-rendering problem. However, this \"fix\" also requires color information to be included in the HTML, which undermines the benefits of using CSS in the first place. This is an unfortunate situation, especially for fans of CSS like myself, but is required for Netscape 4.x compatibility." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):167 +msgid "Rebuilding the HTML" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):170 +msgid "Now it's time to deal with the black vertical line that doesn't always extend all the way to the bottom of the screen. I have been unable to find a solution to this problem that works in both a 4.x and 5.x browser; every 5.x version has triggered bugs in Netscape 4.x, and every 4.x-compatible version looks horrible in a 5.x browser. So, I decide to simply remove the black line entirely: Finally, the site works in all popular browsers. Next, I will to create a guide-like syntax for creating the main pages." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):183 +msgid "Approaching the XML" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):186 +msgid "Instead of implementing a completely new tagset for the main page, I think it would be a good idea to try to use as many of the \"guide\" XML documentation tags as possible (see part 2 of this series for more information on the guide XML format). So, I hack away at some new XSL, using my guide XSL as a template for my work. After an hour or two, I have a fully-functional set of XSL transformations for turning a guide-like syntax into an HTML main page. Revision 2 of the new main page looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:link):197 +msgid "/images/docs/l-redesign-09.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:caption):197 +msgid "The new main page revision" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):199 +msgid "Now that the main page is using a new XML/XSLT backend, I direct my attention to the \"guide\" system's HTML output. Not only do I need to fix a host of Netscape 4.7 compatibility bugs, but I also need to further update the generated HTML and graphics so that they will match those of my newly-revised main page. Then the idea strikes me: Why not simply tweak my new main page XML/XSL just a little bit so that it can also generate HTML for my documentation? After all, I have just added support for nearly every \"guide\" XML tag, so that they can also be used for main page content." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):210 +msgid "This solution turns out to be really easy to implement. I just tweak the new XSLT file so that it will remove the left-hand \"link bar\" and perform a few other minor changes to the output HTML when it processes documentation pages. Since most of the XSLT is still the same, I can use a single set of master XSLT templates for both the guide documentation and the category pages:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:link):218 +msgid "/images/docs/l-redesign-10.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:caption):218 +msgid "How the new XSL works" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):220 +msgid "Not only do I now have a single set of XSLT templates to maintain, but because both flavors of output HTML are based on the same master document, they now share the same CSS stylesheet. This means that there is no need to \"synchronize the look\" between two disparate sets of stylesheets and output HTML. And as you can see, the new documentation HTML is a perfect match for the new main page:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:link):229 +msgid "/images/docs/l-redesign-11.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:caption):229 +msgid "The new documentation pages perfectly match the new main page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):234 +msgid "The XML implementation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):237 +msgid "The actual implementation is quite easy; my existing guide XML syntax requires that every document be part of a single master <guide> element. To add support for main category pages, I create a new master element: <mainpage>. To create a main category page, I place everything inside a <mainpage> element instead of a <guide> element, and the XSLT makes the appropriate changes to the output. Besides this, the only major change required is the addition of an optional <sidebar> element that's used to specify the contents of the floating table on a main category page. The existing <guide> XSLT template looks something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre:caption):249 +msgid "XSLT template" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre):249 +#, no-wrap +msgid "\n<xsl:template match=\"/guide\">\n <html>\n <head>\n guide header goes here\n </head>\n <body>\n top part of guide body HTML content goes here\n<!--next, we insert our content-->\n <xsl:apply-templates select=\"chapter\" />\n bottom part of guide body HTML content goes here\n </body>\n </html>\n</xsl:template>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):265 +msgid "If you're not too familiar with XSLT, this template tells an XSLT processor to replace the <guide> </guide> tags with the shell of an HTML document, as well as recursively applying templates to any <chapter> elements (opening/closing tag pairs) inside the <guide> element and inserting the resultant output into the middle of the HTML shell." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):273 +msgid "So, to add support for the main category pages, I need to specify that a different HTML shell should be used if everything happens to be enclosed in a single <mainpage> element. To do this, I add a new template, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre:caption):279 +msgid "The new template" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre):279 +#, no-wrap +msgid "\n<xsl:template match=\"/mainpage\">\n <html>\n <head>\n mainpage header goes here\n </head>\n <body>\n top part of mainpage body HTML content goes here\n<!--next, we insert our content-->\n <xsl:apply-templates select=\"chapter\" />\n bottom part of mainpage body HTML content goes here\n </body>\n </html>\n</xsl:template>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):295 +msgid "Because nearly every other XML element (from <chapter> all the way on down) produces identical HTML output for both guide and main category pages, almost every other XSLT template can be shared for both types of pages. Thus, we can get along just fine with a single XSLT file that specifies two \"HTML shells\" and a common set of XML-to-HTML XSLT templates. As always, code reuse is definitely a good thing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):307 +msgid "The Changelog page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):310 +msgid "You'll remember that in Part 2 of this series I mentioned that the cvs2cl.pl CVS Changelog generation script could produce XML output and that I wanted to eventually use this feature as the basis for a daily CVS Changelog page that would appear on the new Web site. Now, with the new XML backend in place, adding the new Changelog page is a piece of cake. Here's an enhanced version of the <path>cvslog.sh</path> script that also takes care of handling the XML-to-HTML conversion:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre:caption):320 +msgid "Enhanced version of cvslog.sh script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre):320 +#, no-wrap +msgid "\n#!/bin/bash\n#various paths\nHOMEDIR=/home/drobbins\nCVSDIR=${HOMEDIR}/gentoo/gentoo-x86\nOUTLOG=${HOMEDIR}/gentoo/xmlcvslog.txt\nOUTMAIL=${HOMEDIR}/gentoo/cvslog.txt\nWEBDIR=/usr/local/httpd/htdocs\nXSLTP=/opt/gnome/bin/xsltproc\nTMPFILE=${HOMEDIR}/gentoo/xmlcvslog.tmp\nUSER=drobbins\n#if $CVSMAIL is undefined, set it to \"yes\"\nif [ -z \"$CVSMAIL\" ]\nthen\n export CVSMAIL=\"yes\"\nfi\n#the main script\ncd $CVSDIR \ncvs -q update -dP\nyesterday=`date -d \"1 day ago 00:00\" -R`\ntoday=`date -d \"00:00\" -R`\ncvsdate=-d\\'${yesterday}\\<${today}\\'\nnicedate=`date -d yesterday +\"%d %b %Y %Z (%z)\"`\n#generate cvs2cl.pl XML output\n/usr/bin/cvs2cl.pl --xml -f $OUTLOG -l \"${cvsdate}\" \n#use sed to remove \"xmlns=\" from cvs2cl.pl output\n/usr/bin/sed -e 's/xmlns=\".*\"//' $OUTLOG > ${OUTLOG}.2\n#convert cvs2cl.pl XML output to guide format using $XLSTP\n$XSLTP ${WEBDIR}/xsl/cvs.xsl ${OUTLOG}.2 > $TMPFILE\n#convert guide XML output to HTML format using $XLSTP\n$XSLTP ${WEBDIR}/xsl/guide-main.xsl \n$TMPFILE > ${WEBDIR}/index-changelog.html\n#fix perms\nchmod 0644 ${WEBDIR}/index-changelog.html\n#automatically send cvs mail if $CVSMAIL is set to \"yes\"\nif [ \"$CVSMAIL\" = \"yes\" ]\nthen\n /usr/bin/cvs2cl.pl -f ${OUTMAIL} -l \"${cvsdate}\" \n mutt -x gentoo-cvs -s \"cvs log for $nicedate\" > ${OUTMAIL} \nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):362 +msgid "While this script may look significantly more complicated than the earlier version, it really only contains four or five key additional lines; the rest of the additions are either comments or environment variable definitions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):368 +msgid "Here's how the new XML-related parts of the cvslog.sh script work. First, we call cvs2cl.pl and instruct it to generate an XML-based Changelog containing all the files that were modified yesterday. Then, this XML output is run through sed to remove an unneeded xmlns= attribute from the XML. Next, we hand this slightly tweaked XML over to xsltproc and tell it to apply the processing found in cvs.xsl; these instructions transform the XML output from cvs2cl.pl's into a proper guide XML document. Finally, we again use xsltproc to convert this guide XML document into Web-ready HTML, which is piped into our Web server's htdocs directory. The generated HTML Changelog page is complete, and this is the result:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:link):382 +msgid "/images/docs/l-redesign-12.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:caption):382 +msgid "The automatically generated Changelog page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):384 +msgid "You might be surprised at the simplicity of the XSLT contained in cvs.xsl. In it, we specify three templates for <changelog>, <entry>, and <file>. We also make reference to a few other tags in the source XML, including <date>, <author>, and <msg> (which cvs2cl.pl uses to specify the CVS committer's comments). cvs.xsl does quite a bit considering that it is only around 35 lines long:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre:caption):393 +msgid "The cvs.xsl" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre):393 +#, no-wrap +msgid "\n<?xml version='1.0' encoding=\"iso-8859-1\"?>\n<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\n<xsl:output encoding=\"iso-8859-1\" method=\"xml\" indent=\"yes\"/>\n<xsl:template match=\"/changelog\">\n <mainpage id=\"changelog\">\n <title>Gentoo Linux Development Changelog for <xsl:value-of select=\"entry/date\"/></title>\n <author title=\"script\">cvs-xml.xsl</author>\n <standout>\n <title>About the Development Changelog</title>\n <body>\n This page contains a daily Changelog, listing all modifications made to our\n CVS tree on <xsl:value-of select=\"entry/date\"/> (yesterday).\n </body>\n </standout>\n <version>1.0.0</version>\n <date><xsl:value-of select=\"entry/date\"/></date>\n <chapter>\n <xsl:apply-templates select=\"entry\"/>\n </chapter>\n </mainpage>\n</xsl:template>\n<xsl:template match=\"entry\">\n <section>\n <title>Files modified by <xsl:value-of select=\"author\"/> at \n <xsl:value-of select=\"time\"/>\n </title>\n <body>\n <note><xsl:value-of select=\"msg\"/></note>\n <ul>\n <xsl:apply-templates select=\"file\"/>\n </ul>\n </body>\n </section>\n</xsl:template>\n<xsl:template match=\"file\">\n <li><path><xsl:value-of select=\"name\"/></path>, <xsl:value-of select=\"revision\"/></li>\n</xsl:template>\n</xsl:stylesheet>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):437 +msgid "Project complete!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):440 +msgid "Since the beginning of the Gentoo Linux Web site redesign, we've created a user-centric action plan, designed a new XML-based documentation system, a new logo, a new look for the site, converted all remaining parts to XML, and added a new XML-based Changelog page. Phew! I hope that you've enjoyed following my progress, and have found ample ideas and inspiration along the way. I've received several requests for more information and code related to the redesign, so I've set up a special <uri link=\"http://www.gentoo.org/proj/en/site.xml\">Gentoo Linux XML Projects</uri> page that contains the most recent XML, XSLT, scripts, and documentation used for www.gentoo.org. In addition to visiting the Projects page, be sure to check out the valuable resources listed below." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):459 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):464 +msgid "Check out the <uri link=\"http://www.gentoo.org/proj/en/site.xml\">Gentoo Linux XML Projects</uri> page if you're interested in using the Gentoo Linux guide XML system as a basis for your own projects. All the latest XML/XSLT stuff can be found here." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):474 +msgid "In <uri link=\"/doc/en/articles/l-redesign-1.xml\">Part 1</uri>, the author creates a user-centric action plan and introduces pytext, an embedded Python interpreter (March 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):479 +msgid "In <uri link=\"/doc/en/articles/l-redesign-2.xml\">Part 2</uri>, Daniel shows off the new documentation system and sets up a daily CVS-log mailing list (May 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):484 +msgid "In <uri link=\"/doc/en/articles/l-redesign-3.xml\">Part 3</uri>, he creates a new look for the site (July 2001)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):470 +msgid "Read the other articles in this developerWorks series about the redesign of the www.gentoo.org Web site using technologies like XML, XSLT, and Python: <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):490 +msgid "Learn more about CSS (cascading style sheets) by visiting the <uri link=\"http://www.w3.org/Style/CSS/\">CSS</uri> page at the World Wide Web Consortium, or W3C. You can find out more about <uri link=\"http://www.w3.org/XML\">XML</uri>, <uri link=\"http://www.w3.org/TR/xslt\">XSLT</uri> and a host of other technologies as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):498 +msgid "Check out <uri link=\"http://xara.com\">Xara.com</uri>, the home of Xara X -- an excellent vector drawing package for Windows. With virtually no bloat and blazing speed, it has my personal recommendation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):503 +msgid "Learn even more about XSLT at <uri>http://www.xslt.com</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):504 +msgid "When you wake up, check out Sablotron, a nice, fast XSLT processor available from <uri>http://www.gingerall.com</uri>" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-sed1.xml.pot b/article/gettext/l-sed1.xml.pot new file mode 100644 index 0000000..46fc03d --- /dev/null +++ b/article/gettext/l-sed1.xml.pot @@ -0,0 +1,481 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(guide:link):5 +msgid "/doc/en/articles/l-sed1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):6 +msgid "Sed by example, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(abstract):12 +msgid "In this series of articles, Daniel Robbins will show you how to use the very powerful (but often forgotten) UNIX stream editor, sed. Sed is an ideal tool for batch-editing files or for creating shell scripts to modify existing files in powerful ways." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(version):24 +msgid "1.5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(date):25 +msgid "2010-05-14" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):28 +msgid "Get to know the powerful UNIX editor" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):30 +msgid "Pick an editor" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):33 +msgid "In the UNIX world, we have a lot of options when it comes to editing files. Think of it -- vi, emacs, and jed come to mind, as well as many others. We all have our favorite editor (along with our favorite keybindings) that we have come to know and love. With our trusty editor, we are ready to tackle any number of UNIX-related administration or programming tasks with ease." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):40 +msgid "While interactive editors are great, they do have limitations. Though their interactive nature can be a strength, it can also be a weakness. Consider a situation where you need to perform similar types of changes on a group of files. You could instinctively fire up your favorite editor and perform a bunch of mundane, repetitive, and time-consuming edits by hand. But there's a better way." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):52 +msgid "Enter sed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):55 +msgid "It would be nice if we could automate the process of making edits to files, so that we could \"batch\" edit files, or even write scripts with the ability to perform sophisticated changes to existing files. Fortunately for us, for these types of situations, there is a better way -- and the better way is called sed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):62 +msgid "sed is a lightweight stream editor that's included with nearly all UNIX flavors, including Linux. sed has a lot of nice features. First of all, it's very lightweight, typically many times smaller than your favorite scripting language. Secondly, because sed is a stream editor, it can perform edits to data it receives from stdin, such as from a pipeline. So, you don't need to have the data to be edited stored in a file on disk. Because data can just as easily be piped to sed, it's very easy to use sed as part of a long, complex pipeline in a powerful shell script. Try doing that with your favorite editor." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):76 +msgid "GNU sed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):79 +msgid "Fortunately for us Linux users, one of the nicest versions of sed out there happens to be GNU sed, which is currently at version 3.02. Every Linux distribution has GNU sed, or at least should. GNU sed is popular not only because its sources are freely distributable, but because it happens to have a lot of handy, time-saving extensions to the POSIX sed standard. GNU sed also doesn't suffer from many of the limitations that earlier and proprietary versions of sed had, such as a limited line length -- GNU sed handles lines of any length with ease." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):93 +msgid "The newest GNU sed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):96 +msgid "While researching this article, I noticed that several online sed aficionados made reference to a GNU sed 3.02a. Strangely, I couldn't find sed 3.02a on <uri>ftp://ftp.gnu.org</uri> (see <uri link=\"#resources\">Resources</uri> for these links), so I had to go look for it elsewhere. I found it at <uri>ftp://alpha.gnu.org</uri>, in <path>/pub/sed</path>. I happily downloaded it, compiled it, and installed it, only to find minutes later that the most recent version of sed is 3.02.80 -- and you can find its sources right next to those for 3.02a, at <uri>ftp://alpha.gnu.org</uri>. After getting GNU sed 3.02.80 installed, I was finally ready to go." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):111 +msgid "The right sed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):114 +msgid "In this series, we will be using GNU sed 3.02.80. Some (but very few) of the most advanced examples you'll find in my upcoming, follow-on articles in this series will not work with GNU sed 3.02 or 3.02a. If you're using a non-GNU sed, your results may vary. Why not take some time to install GNU sed 3.02.80 now? Then, not only will you be ready for the rest of the series, but you'll also be able to use arguably the best sed in existence!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):126 +msgid "Sed examples" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):129 +msgid "Sed works by performing any number of user-specified editing operations (\"commands\") on the input data. Sed is line-based, so the commands are performed on each line in order. And, sed writes its results to standard output (stdout); it doesn't modify any input files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):136 +msgid "Let's look at some examples. The first several are going to be a bit weird because I'm using them to illustrate how sed works rather than to perform any useful task. However, if you're new to sed, it's very important that you understand them. Here's our first example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):143 +msgid "Example of sed usage" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):143 +#, no-wrap +msgid "\n$ <i>sed -e 'd' /etc/services</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):147 +msgid "If you type this command, you'll get absolutely no output. Now, what happened? In this example, we called sed with one editing command, <c>d</c>. Sed opened the <path>/etc/services</path> file, read a line into its pattern buffer, performed our editing command (\"delete line\"), and then printed the pattern buffer (which was empty). It then repeated these steps for each successive line. This produced no output, because the <c>d</c> command zapped every single line in the pattern buffer!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):157 +msgid "There are a couple of things to notice in this example. First, <path>/etc/services</path> was not modified at all. This is because, again, sed only reads from the file you specify on the command line, using it as input -- it doesn't try to modify the file. The second thing to notice is that sed is line-oriented. The <c>d</c> command didn't simply tell sed to delete all incoming data in one fell swoop. Instead, sed read each line of /etc/services one by one into its internal buffer, called the pattern buffer. Once a line was read into the pattern buffer, it performed the <c>d</c> command and printed the contents of the pattern buffer (nothing in this example). Later, I'll show you how to use address ranges to control which lines a command is applied to -- but in the absence of addresses, a command is applied to all lines." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):171 +msgid "The third thing to notice is the use of single quotes to surround the <c>d</c> command. It's a good idea to get into the habit of using single quotes to surround your sed commands, so that shell expansion is disabled." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):180 ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):188 +msgid "Another sed example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):183 +msgid "Here's an example of how to use sed to remove the first line of the <path>/etc/services</path> file from our output stream:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):188 +#, no-wrap +msgid "\n$ <i>sed -e '1d' /etc/services | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):192 +msgid "As you can see, this command is very similar to our first <c>d</c> command, except that it is preceded by a <c>1</c>. If you guessed that the <c>1</c> refers to line number one, you're right. While in our first example, we used <c>d</c> by itself, this time we use the <c>d</c> command preceded by an optional numerical address. By using addresses, you can tell sed to perform edits only on a particular line or lines." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):204 +msgid "Address ranges" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):207 +msgid "Now, let's look at how to specify an address range. In this example, sed will delete lines 1-10 of the output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):212 +msgid "Specifying an adress range" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):212 +#, no-wrap +msgid "\n$ <i>sed -e '1,10d' /etc/services | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):216 +msgid "When we separate two addresses by a comma, sed will apply the following command to the range that starts with the first address, and ends with the second address. In this example, the <c>d</c> command was applied to lines 1-10, inclusive. All other lines were ignored." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):226 +msgid "Addresses with regular expressions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):229 +msgid "Now, it's time for a more useful example. Let's say you wanted to view the contents of your <path>/etc/services</path> file, but you aren't interested in viewing any of the included comments. As you know, you can place comments in your <path>/etc/services</path> file by starting the line with the '#' character. To avoid comments, we'd like sed to delete lines that start with a '#'. Here's how to do it:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):238 +msgid "Deleting lines starting with #" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):238 +#, no-wrap +msgid "\n$ <i>sed -e '/^#/d' /etc/services | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):242 +msgid "Try this example and see what happens. You'll notice that sed performs its desired task with flying colors. Now, let's figure out what happened." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):247 +msgid "To understand the '/^#/d' command, we first need to dissect it. First, let's remove the 'd' -- we're using the same delete line command that we've used previously. The new addition is the '/^#/' part, which is a new kind of regular expression address. Regular expression addresses are always surrounded by slashes. They specify a pattern, and the command that immediately follows a regular expression address will only be applied to a line if it happens to match this particular pattern." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):257 +msgid "So, '/^#/' is a regular expression. But what does it do? Obviously, this would be a good time for a regular expression refresher." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):265 +msgid "Regular expression refresher" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):268 +msgid "We can use regular expressions to express patterns that we may find in the text. If you've ever used the '*' character on the shell command line, you've used something that's similar, but not identical to, regular expressions. Here are the special characters that you can use in regular expressions:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(th):277 +msgid "Character" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(th):278 ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(th):311 +msgid "Description" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):281 +msgid "^" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):282 +msgid "Matches the beginning of the line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):285 +msgid "$" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):286 +msgid "Matches the end of the line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):289 +msgid "." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):290 +msgid "Matches any single character" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):293 +msgid "*" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):294 +msgid "Will match zero or more occurrences of the previous character" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):297 +msgid "[ ]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):298 +msgid "Matches all the characters inside the [ ]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):302 +msgid "Probably the best way to get your feet wet with regular expressions is to see a few examples. All of these examples will be accepted by sed as valid addresses to appear on the left side of a command. Here are a few:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(th):310 +msgid "Regular expression" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):314 +msgid "/./" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):315 +msgid "Will match any line that contains at least one character" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):318 +msgid "/../" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):319 +msgid "Will match any line that contains at least two characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):322 +msgid "/^#/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):323 +msgid "Will match any line that begins with a '#'" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):326 +msgid "/^$/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):327 +msgid "Will match all blank lines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):330 +msgid "/}$/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):331 +msgid "Will match any lines that ends with '}' (no spaces)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):334 +msgid "/} *$/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):335 +msgid "Will match any line ending with '}' followed by zero or more spaces" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):338 +msgid "/[abc]/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):339 +msgid "Will match any line that contains a lowercase 'a', 'b', or 'c'" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):342 +msgid "/^[abc]/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):343 +msgid "Will match any line that begins with an 'a', 'b', or 'c'" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):347 +msgid "I encourage you to try several of these examples. Take some time to get familiar with regular expressions, and try a few regular expressions of your own creation. You can use a regexp this way:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):353 +msgid "Proper way of using regexp" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):353 +#, no-wrap +msgid "\n$ <i>sed -e '/regexp/d' /path/to/my/test/file | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):357 +msgid "This will cause sed to delete any matching lines. However, it may be easier to get familiar with regular expressions by telling sed to print regexp matches, and delete non-matches, rather than the other way around. This can be done with the following command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):364 +msgid "Printing regexp matches" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):364 +#, no-wrap +msgid "\n$ <i>sed -n -e '/regexp/p' /path/to/my/test/file | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):368 +msgid "Note the new '-n' option, which tells sed to not print the pattern space unless explicitly commanded to do so. You'll also notice that we've replaced the <c>d</c> command with the <c>p</c> command, which as you might guess, explicitly commands sed to print the pattern space. Voila, now only matches will be printed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):379 +msgid "More on addresses" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):382 +msgid "Up till now, we've taken a look at line addresses, line range addresses, and regexp addresses. But there are even more possibilities. We can specify two regular expressions separated by a comma, and sed will match all lines starting from the first line that matches the first regular expression, up to and including the line that matches the second regular expression. For example, the following command will print out a block of text that begins with a line containing \"BEGIN\", and ending with a line that contains \"END\":" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):392 +msgid "Printing out a desired block of text" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):392 +#, no-wrap +msgid "\n$ <i>sed -n -e '/BEGIN/,/END/p' /my/test/file | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):396 +msgid "If \"BEGIN\" isn't found, no data will be printed. And, if \"BEGIN\" is found, but no \"END\" is found on any line below it, all subsequent lines will be printed. This happens because of sed's stream-oriented nature -- it doesn't know whether or not an \"END\" will appear." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):406 +msgid "C source example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):409 +msgid "If you want to print out only the main() function in a C source file, you could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):414 +msgid "Printing main() function in a C source file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):414 +#, no-wrap +msgid "\n$ <i>sed -n -e '/main[[:space:]]*(/,/^}/p' sourcefile.c | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):418 +msgid "This command has two regular expressions, '/main[[:space:]]*(/' and '/^}/', and one command, <c>p</c>. The first regular expression will match the string \"main\" followed by any number of spaces or tabs, followed by an open parenthesis. This should match the start of your average ANSI C main() declaration." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):425 +msgid "In this particular regular expression, we encounter the '[[:space:]]' character class. This is simply a special keyword that tells sed to match either a TAB or a space. If you wanted, instead of typing '[[:space:]]', you could have typed '[', then a literal space, then Control-V, then a literal tab and a ']' -- The Control-V tells bash that you want to insert a \"real\" tab rather than perform command expansion. It's clearer, especially in scripts, to use the '[[:space:]]' command class." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):435 +msgid "OK, now on to the second regexp. '/^}/' will match a '}' character that appears at the beginning of a new line. If your code is formatted nicely, this will match the closing brace of your main() function. If it's not, it won't -- one of the tricky things about performing pattern matching." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):442 +msgid "The <c>p</c> command does what it always does, explicitly telling sed to print out the line, since we are in '-n' quiet mode. Try running the command on a C source file -- it should output the entire main() { } block, including the initial \"main()\" and the closing '}'." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):452 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):455 +msgid "Now that we've touched on the basics, we'll be picking up the pace for the next two articles. If you're in the mood for some meatier sed material, be patient -- it's coming! In the meantime, you might want to check out the following sed and regular expression resources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):467 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):469 +msgid "Useful links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):473 +msgid "Read Daniel's other sed articles on developerWorks: Common threads: Sed by example, <uri link=\"l-sed2.xml\">Part 2</uri> and <uri link=\"l-sed3.xml\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):478 +msgid "Check out Eric Pement's excellent <uri link=\"http://sed.sourceforge.net/sedfaq.html\">sed FAQ</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):482 +msgid "You can find the sources to sed at <uri>ftp://ftp.gnu.org/pub/gnu/sed</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):486 +msgid "Eric Pement also has a handy list of <uri link=\"http://sed.sourceforge.net/sed1line.txt\">sed one-liners</uri> that any aspiring sed guru should definitely look at." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):491 +msgid "If you'd like a good old-fashioned book, <uri link=\"http://www.oreilly.com/catalog/sed2/\">O'Reilly's sed & awk, 2nd Edition</uri> would be wonderful choice." +msgstr "" + +#. FIXME BOTH DEAD and not possible to find other locations, sorry +#. <li> +#. Maybe you'd like to read <uri +#. link="http://www.softlab.ntua.gr/unix/docs/sed.txt">7th edition UNIX's sed +#. man page</uri> (circa 1978!). +#. </li> +#. <li> +#. Take Felix von Leitner's short <uri +#. link="http://www.math.fu-berlin.de/~leitner/sed/tutorial.html">sed +#. tutorial</uri>. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):508 +msgid "Read David Mertz's article on <uri link=\"http://www-106.ibm.com/developerworks/linux/library/l-python5.html\">Text processing in Python</uri> on developerWorks." +msgstr "" + +#. Dead link +#. <li> +#. Brush up on <uri link="http://vision.eng.shu.ac.uk/C++/misc/regexp/">using +#. regular expressions</uri> to find and modify patterns in text in this free, +#. dW-exclusive tutorial. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):520 +msgid "See the regular expressions <uri link=\"http://docs.python.org/dev/howto/regex.html\">how-to document</uri> from <uri link=\"http://python.org\">python.org</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):525 +msgid "Refer to an <uri link=\"http://www.uky.edu/ArtsSciences/Classics/regex.html\">overview of regular expressions</uri> from the University of Kentucky." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-sed2.xml.pot b/article/gettext/l-sed2.xml.pot new file mode 100644 index 0000000..6a20ab4 --- /dev/null +++ b/article/gettext/l-sed2.xml.pot @@ -0,0 +1,615 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(guide:link):5 +msgid "/doc/en/articles/l-sed2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):6 +msgid "Sed by example, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(abstract):12 +msgid "Sed is a very powerful and compact text stream editor. In this article, the second in the series, Daniel shows you how to use sed to perform string substitution; create larger sed scripts; and use sed's append, insert, and change line commands." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(version):24 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(date):25 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):28 +msgid "How to further take advantage of the UNIX text editor" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):30 +msgid "Substitution!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):33 +msgid "Let's look at one of sed's most useful commands, the substitution command. Using it, we can replace a particular string or matched regular expression with another string. Here's an example of the most basic use of this command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):39 +msgid "Most basic use of substitution command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):39 +#, no-wrap +msgid "\n$ <i>sed -e 's/foo/bar/' myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):43 +msgid "The above command will output the contents of myfile.txt to stdout, with the first occurrence of 'foo' (if any) on each line replaced with the string 'bar'. Please note that I said first occurrence on each line, though this is normally not what you want. Normally, when I do a string replacement, I want to perform it globally. That is, I want to replace all occurrences on every line, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):52 +msgid "Replacing all the occurences on every line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):52 +#, no-wrap +msgid "\n$ <i>sed -e 's/foo/bar/g' myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):56 +msgid "The additional 'g' option after the last slash tells sed to perform a global replace." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):61 +msgid "Here are a few other things you should know about the <c>s///</c> substitution command. First, it is a command, and a command only; there are no addresses specified in any of the above examples. This means that the <c>s///</c> command can also be used with addresses to control what lines it will be applied to, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):69 +msgid "Specifying lines command will be applied to" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):69 +#, no-wrap +msgid "\n$ <i>sed -e '1,10s/enchantment/entrapment/g' myfile2.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):73 +msgid "The above example will cause all occurrences of the phrase 'enchantment' to be replaced with the phrase 'entrapment', but only on lines one through ten, inclusive." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):79 +msgid "Specifying more options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):79 +#, no-wrap +msgid "\n$ <i>sed -e '/^$/,/^END/s/hills/mountains/g' myfile3.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):83 +msgid "This example will swap 'hills' for 'mountains', but only on blocks of text beginning with a blank line, and ending with a line beginning with the three characters 'END', inclusive." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):89 +msgid "Another nice thing about the <c>s///</c> command is that we have a lot of options when it comes to those <c>/</c> separators. If we're performing string substitution and the regular expression or replacement string has a lot of slashes in it, we can change the separator by specifying a different character after the 's'. For example, this will replace all occurrences of <path>/usr/local</path> with <path>/usr</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):98 +msgid "Replacing all the occurences of one string with another one" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):98 +#, no-wrap +msgid "\n$ <i>sed -e 's:/usr/local:/usr:g' mylist.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(note):102 +msgid "In this example, we're using the colon as a separator. If you ever need to specify the separator character in the regular expression, put a backslash before it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):111 +msgid "Regexp snafus" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):114 +msgid "Up until now, we've only performed simple string substitution. While this is handy, we can also match a regular expression. For example, the following sed command will match a phrase beginning with '<' and ending with '>', and containing any number of characters inbetween. This phrase will be deleted (replaced with an empty string):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):122 +msgid "Deleting specified phrase" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):122 +#, no-wrap +msgid "\n$ <i>sed -e 's/<.*>//g' myfile.html</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):126 +msgid "This is a good first attempt at a sed script that will remove HTML tags from a file, but it won't work well, due to a regular expression quirk. The reason? When sed tries to match the regular expression on a line, it finds the longest match on the line. This wasn't an issue in my previous sed article, because we were using the <c>d</c> and <c>p</c> commands, which would delete or print the entire line anyway. But when we use the <c>s///</c> command, it definitely makes a big difference, because the entire portion that the regular expression matches will be replaced with the target string, or in this case, deleted. This means that the above example will turn the following line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):138 +msgid "Sample HTML code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):138 +#, no-wrap +msgid "\n<b>This</b> is what <b>I</b> meant.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):142 +msgid "Into this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):146 +msgid "Not desired effect" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):146 +#, no-wrap +msgid "\nmeant.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):150 +msgid "Rather than this, which is what we wanted to do:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):154 +msgid "Desired effect" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):154 +#, no-wrap +msgid "\nThis is what I meant.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):158 +msgid "Fortunately, there is an easy way to fix this. Instead of typing in a regular expression that says \"a '<' character followed by any number of characters, and ending with a '>' character\", we just need to type in a regexp that says \"a '<' character followed by any number of non-'>' characters, and ending with a '>' character\". This will have the effect of matching the shortest possible match, rather than the longest possible one. The new command looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):168 +#, no-wrap +msgid "\n$ <i>sed -e 's/<[^>]*>//g' myfile.html</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):172 +msgid "In the above example, the '[^>]' specifies a \"non-'>'\" character, and the '*' after it completes this expression to mean \"zero or more non-'>' characters\". Test this command on a few sample html files, pipe them to more, and review their results." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):182 +msgid "More character matching" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):185 +msgid "The '[ ]' regular expression syntax has some more additional options. To specify a range of characters, you can use a '-' as long as it isn't in the first or last position, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):191 +msgid "Specifying a rangle of characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):191 +#, no-wrap +msgid "\n'[a-x]*'\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):195 +msgid "This will match zero or more characters, as long as all of them are 'a','b','c'...'v','w','x'. In addition, the '[:space:]' character class is available for matching whitespace. Here's a fairly complete list of available character classes:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(th):205 +msgid "Character class" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(th):206 +msgid "Description" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):209 +msgid "[:alnum:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):210 +msgid "Alphanumeric [a-z A-Z 0-9]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):213 +msgid "[:alpha:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):214 +msgid "Alphabetic [a-z A-Z]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):217 +msgid "[:blank:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):218 +msgid "Spaces or tabs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):221 +msgid "[:cntrl:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):222 +msgid "Any control characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):225 +msgid "[:digit:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):226 +msgid "Numeric digits [0-9]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):229 +msgid "[:graph:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):230 +msgid "Any visible characters (no whitespace)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):233 +msgid "[:lower:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):234 +msgid "Lower-case [a-z]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):237 +msgid "[:print:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):238 +msgid "Non-control characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):241 +msgid "[:punct:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):242 +msgid "Punctuation characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):245 +msgid "[:space:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):246 +msgid "Whitespace" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):249 +msgid "[:upper:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):250 +msgid "Upper-case [A-Z]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):253 +msgid "[:xdigit:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):254 +msgid "hex digits [0-9 a-f A-F]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):258 +msgid "It's advantageous to use character classes whenever possible, because they adapt better to nonEnglish speaking locales (including accented characters when necessary, etc.)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):267 +msgid "Advanced substitution stuff" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):270 +msgid "We've looked at how to perform simple and even reasonably complex straight substitutions, but sed can do even more. We can actually refer to either parts of or the entire matched regular expression, and use these parts to construct the replacement string. As an example, let's say you were replying to a message. The following example would prefix each line with the phrase \"ralph said: \":" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):278 +msgid "Prefixing each line with certain string" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):278 +#, no-wrap +msgid "\n$ <i>sed -e 's/.*/ralph said: &/' origmsg.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):282 +msgid "The output will look like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):286 ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):355 ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):483 +msgid "Output of the above command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):286 +#, no-wrap +msgid "\nralph said: Hiya Jim,\nralph said:\nralph said: I sure like this sed stuff!\nralph said:\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):293 +msgid "In this example, we use the '&' character in the replacement string, which tells sed to insert the entire matched regular expression. So, whatever was matched by '.*' (the largest group of zero or more characters on the line, or the entire line) can be inserted anywhere in the replacement string, even multiple times. This is great, but sed is even more powerful." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):304 +msgid "Those wonderful backslashed parentheses" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):307 +msgid "Even better than '&', the <c>s///</c> command allows us to define regions in our regular expression, and we can refer to these specific regions in our replacement string. As an example, let's say we have a file that contains the following text:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):314 +msgid "Sample text" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):314 +#, no-wrap +msgid "\nfoo bar oni\neeny meeny miny\nlarry curly moe\njimmy the weasel\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):321 +msgid "Now, let's say we wanted to write a sed script that would replace \"eeny meeny miny\" with \"Victor eeny-meeny Von miny\", etc. To do this, first we would write a regular expression that would match the three strings, separated by spaces:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):327 +msgid "Matching regular expression" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):327 +#, no-wrap +msgid "\n'.* .* .*'\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):331 +msgid "There. Now, we will define regions by inserting backslashed parentheses around each region of interest:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):336 +msgid "Defining regions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):336 +#, no-wrap +msgid "\n'\\(.*\\) \\(.*\\) \\(.*\\)'\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):340 +msgid "This regular expression will work the same as our first one, except that it will define three logical regions that we can refer to in our replacement string. Here's the final script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):346 +msgid "Final script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):346 +#, no-wrap +msgid "\n$ <i>sed -e 's/\\(.*\\) \\(.*\\) \\(.*\\)/Victor \\1-\\2 Von \\3/' myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):350 +msgid "As you can see, we refer to each parentheses-delimited region by typing '\\x', where x is the number of the region, starting at one. Output is as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):355 +#, no-wrap +msgid "\nVictor foo-bar Von oni\nVictor eeny-meeny Von miny\nVictor larry-curly Von moe\nVictor jimmy-the Von weasel\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):362 +msgid "As you become more familiar with sed, you will be able to perform fairly powerful text processing with a minimum of effort. You may want to think about how you'd have approached this problem using your favorite scripting language -- could you have easily fit the solution in one line?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):372 +msgid "Mixing things up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):375 +msgid "As we begin creating more complex sed scripts, we need the ability to enter more than one command. There are several ways to do this. First, we can use semicolons between the commands. For example, this series of commands uses the '=' command, which tells sed to print the line number, as well as the <c>p</c> command, which explicitly tells sed to print the line (since we're in '-n' mode):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):384 +msgid "First method, semicolons" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):384 +#, no-wrap +msgid "\n$ <i>sed -n -e '=;p' myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):388 +msgid "Whenever two or more commands are specified, each command is applied (in order) to every line in the file. In the above example, first the '=' command is applied to line 1, and then the <c>p</c> command is applied. Then, sed proceeds to line 2, and repeats the process. While the semicolon is handy, there are instances where it won't work. Another alternative is to use two -e options to specify two separate commands:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):397 +msgid "Second method, multiple -e" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):397 +#, no-wrap +msgid "\n$ <i>sed -n -e '=' -e 'p' myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):401 +msgid "However, when we get to the more complex append and insert commands, even multiple '-e' options won't help us. For complex multiline scripts, the best way is to put your commands in a separate file. Then, reference this script file with the -f options:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):408 +msgid "Third method, external file with commands" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):408 +#, no-wrap +msgid "\n$ <i>sed -n -f mycommands.sed myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):412 +msgid "This method, although arguably less convenient, will always work." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):419 +msgid "Multiple commands for one address" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):422 +msgid "Sometimes, you may want to specify multiple commands that will apply to a single address. This comes in especially handy when you are performing lots of <c>s///</c> to transform words or syntax in the source file. To perform multiple commands per address, enter your sed commands in a file, and use the '{ }' characters to group commands, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):430 +msgid "Entering multiple commands per address" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):430 +#, no-wrap +msgid "\n1,20{\n s/[Ll]inux/GNU\\/Linux/g\n s/samba/Samba/g\n s/posix/POSIX/g\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):438 +msgid "The above example will apply three substitution commands to lines 1 through 20, inclusive. You can also use regular expression addresses, or a combination of the two:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):444 +msgid "Combination of both methods" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):444 +#, no-wrap +msgid "\n1,/^END/{\n s/[Ll]inux/GNU\\/Linux/g \n s/samba/Samba/g \n s/posix/POSIX/g \n p\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):453 +msgid "This example will apply all the commands between '{ }' to the lines starting at 1 and up to a line beginning with the letters \"END\", or the end of file if \"END\" is not found in the source file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):462 +msgid "Append, insert, and change line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):465 +msgid "Now that we're writing sed scripts in separate files, we can take advantage of the append, insert, and change line commands. These commands will insert a line after the current line, insert a line before the current line, or replace the current line in the pattern space. They can also be used to insert multiple lines into the output. The insert line command is used as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):473 +msgid "Using the insert line command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):473 +#, no-wrap +msgid "\ni\\\nThis line will be inserted before each line\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):478 +msgid "If you don't specify an address for this command, it will be applied to each line and produce output that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):483 +#, no-wrap +msgid "\nThis line will be inserted before each line\nline 1 here\nThis line will be inserted before each line\nline 2 here\nThis line will be inserted before each line\nline 3 here\nThis line will be inserted before each line\nline 4 here\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):494 +msgid "If you'd like to insert multiple lines before the current line, you can add additional lines by appending a backslash to the previous line, like so:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):499 +msgid "Inserting multiple lines before the current one" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):499 +#, no-wrap +msgid "\ni\\\ninsert this line\\\nand this one\\\nand this one\\\nand, uh, this one too.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):507 +msgid "The append command works similarly, but will insert a line or lines after the current line in the pattern space. It's used as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):512 +msgid "Appending lines after the current one" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):512 +#, no-wrap +msgid "\na\\\ninsert this line after each line. Thanks! :)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):517 +msgid "On the other hand, the \"change line\" command will actually replace the current line in the pattern space, and is used as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):522 +msgid "Because the append, insert, and change line commands need to be entered on multiple lines, you'll want to type them in to text sed scripts and tell sed to source them by using the '-f' option. Using the other methods to pass commands to sed will result in problems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):532 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):535 +msgid "Next time, in the final article of this series on sed, I'll show you lots of excellent real-world examples of using sed for many different kinds of tasks. Not only will I show you what the scripts do, but why they do what they do. After you're done, you'll have additional excellent ideas of how to use sed in your various projects. I'll see you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):548 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):550 +msgid "Useful links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(li):554 +msgid "Read Daniel's other sed articles from developerWorks: Common threads: Sed by example, <uri link=\"l-sed1.xml\">Part 1</uri> and <uri link=\"l-sed3.xml\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(li):559 +msgid "Check out Eric Pement's excellent <uri link=\"http://sed.sourceforge.net/sedfaq.html\">sed FAQ</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(li):564 +msgid "You can find the sources to sed at <uri>ftp://ftp.gnu.org/pub/gnu/sed</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(li):568 +msgid "Eric Pement also has a handy list of <uri link=\"http://sed.sourceforge.net/sed1line.txt\">sed one-liners</uri> that any aspiring sed guru should definitely look at." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(li):573 +msgid "If you'd like a good old-fashioned book, <uri link=\"http://www.oreilly.com/catalog/sed2/\">O'Reilly's sed & awk, 2nd Edition</uri> would be wonderful choice." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/l-sed3.xml.pot b/article/gettext/l-sed3.xml.pot new file mode 100644 index 0000000..7d15941 --- /dev/null +++ b/article/gettext/l-sed3.xml.pot @@ -0,0 +1,453 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(guide:link):5 +msgid "/doc/en/articles/l-sed3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):6 +msgid "Sed by example, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(abstract):12 +msgid "In this conclusion of the sed series, Daniel Robbins gives you a true taste of the power of sed. After introducing a handful of essential sed scripts, he'll demonstrate some radical sed scripting by converting a Quicken .QIF file into a text-readable format. This conversion script is not only functional, it also serves as en excellent example of sed scripting power." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(version):25 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(date):26 +msgid "2008-02-14" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):29 +msgid "Taking it to the next level: Data crunching, sed style" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):31 +msgid "Muscular sed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):34 +msgid "In <uri link=\"l-sed2.xml\">my second sed article</uri>, I offered examples that demonstrated how sed works, but very few of these examples actually did anything particularly useful. In this final sed article, it's time to change that pattern and put sed to good use. I'll show you several excellent examples that not only demonstrate the power of sed, but also do some really neat (and handy) things. For example, in the second half of the article, I'll show you how I designed a sed script that converts a .QIF file from Intuit's Quicken financial program into a nicely formatted text file. Before doing that, we'll take a look at some less complicated yet useful sed scripts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):49 +msgid "Text translation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):52 +msgid "Our first practical script converts UNIX-style text to DOS/Windows format. As you probably know, DOS/Windows-based text files have a CR (carriage return) and LF (line feed) at the end of each line, while UNIX text has only a line feed. There may be times when you need to move some UNIX text to a Windows system, and this script will perform the necessary format conversion for you." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):60 +msgid "Format conversion between UNIX and Windows" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):60 +#, no-wrap +msgid "\n$ <i>sed -e 's/$/\\r/' myunix.txt > mydos.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):64 +msgid "In this script, the '$' regular expression will match the end of the line, and the '\\r' tells sed to insert a carriage return right before it. Insert a carriage return before a line feed, and presto, a CR/LF ends each line. Please note that the '\\r' will be replaced with a CR only when using GNU sed 3.02.80 or later. If you haven't installed GNU sed 3.02.80 yet, see <uri link=\"l-sed1.xml\">my first sed article</uri> for instructions on how to do this." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):74 +msgid "I can't tell you how many times I've downloaded some example script or C code, only to find that it's in DOS/Windows format. While many programs don't mind DOS/Windows format CR/LF text files, several programs definitely do -- the most notable being bash, which chokes as soon as it encounters a carriage return. The following sed invocation will convert DOS/Windows format text to trusty UNIX format:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):83 +msgid "Converting C code from Windows to UNIX format" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):83 +#, no-wrap +msgid "\n$ <i>sed -e 's/.$//' mydos.txt > myunix.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):87 +msgid "The way this script works is simple: our substitution regular expression matches the last character on the line, which happens to be a carriage return. We replace it with nothing, causing it to be deleted from the output entirely. If you use this script and notice that the last character of every line of the output has been deleted, you've specified a text file that's already in UNIX format. No need for that!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):99 +msgid "Reversing lines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):102 +msgid "Here's another handy little script. This one will reverse lines in a file, similar to the \"tac\" command that's included with most Linux distributions. The name \"tac\" may be a bit misleading, because \"tac\" doesn't reverse the position of characters on the line (left and right), but rather the position of lines in the file (up and down). Tacing the following file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):110 +msgid "Sample file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):110 +#, no-wrap +msgid "\nfoo\nbar\noni\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):116 +msgid "....produces the following output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):120 +msgid "Output file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):120 +#, no-wrap +msgid "\noni\nbar\nfoo\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):126 +msgid "We can do the same thing with the following sed script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):130 +msgid "Doing same with script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):130 +#, no-wrap +msgid "\n$ <i>sed -e '1!G;h;$!d' forward.txt > backward.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):134 +msgid "You'll find this sed script useful if you're logged in to a FreeBSD system, which doesn't happen to have a \"tac\" command. While handy, it's also a good idea to know why this script does what it does. Let's dissect it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):143 +msgid "Reversal explained" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):146 +msgid "First, this script contains three separate sed commands, separated by semicolons: '1!G', 'h' and '$!d'. Now, it's time to get an good understanding of the addresses used for the first and third commands. If the first command were '1G', the 'G' command would be applied only to the first line. However, there is an additional '!' character -- this '!' character negates the address, meaning that the 'G' command will apply to all but the first line. For the '$!d' command, we have a similar situation. If the command were '$d', it would apply the 'd' command to only the last line in the file (the '$' address is a simple way of specifying the last line). However, with the '!', '$!d' will apply the 'd' command to all but the last line. Now, all we need to to is understand what the commands themselves do." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):160 +msgid "When we execute our line reversal script on the text file above, the first command that gets executed is 'h'. This command tells sed to copy the contents of the pattern space (the buffer that holds the current line being worked on) to the hold space (a temporary buffer). Then, the 'd' command is executed, which deletes \"foo\" from the pattern space, so it doesn't get printed after all the commands are executed for this line." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):169 +msgid "Now, line two. After \"bar\" is read into the pattern space, the 'G' command is executed, which appends the contents of the hold space (\"foo\\n\") to the pattern space (\"bar\\n\"), resulting in \"bar\\n\\foo\\n\" in our pattern space. The 'h' command puts this back in the hold space for safekeeping, and 'd' deletes the line from the pattern space so that it isn't printed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):177 +msgid "For the last \"oni\" line, the same steps are repeated, except that the contents of the pattern space aren't deleted (due to the '$!' before the 'd'), and the contents of the pattern space (three lines) are printed to stdout." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):183 +msgid "Now, it's time to do some powerful data conversion with sed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):190 +msgid "sed QIF magic" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):193 +msgid "For the last few weeks, I've been thinking about purchasing a copy of Quicken to balance my bank accounts. Quicken is a very nice financial program, and would certainly perform the job with flying colors. But, after thinking about it, I decided that I could easily write some software that would balance my checkbook. After all, I reasoned, I'm a software developer!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):201 +msgid "I developed a nice little checkbook balancing program (using awk) that calculates by balance by parsing a text file containing all my transactions. After a bit of tweaking, I improved it so that I could keep track of different credit and debit categories, just like Quicken can. But, there was one more feature I wanted to add. I recently switched my accounts to a bank that has an online Web account interface. One day, I noticed that my bank's Web site allowed me to to download my account information in Quicken's .QIF format. In very little time, I decided that it would be really neat if I could convert this information into text format." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):216 +msgid "A tale of two formats" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):219 +msgid "Before we look at the QIF format, here's what my checkbook.txt format looks like:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):224 +msgid "Sample of QIF format" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):224 +#, no-wrap +msgid "\n28 Aug 2000 food - - Y Supermarket 30.94\n25 Aug 2000 watr - 103 Y Check 103 52.86\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):229 +msgid "In my file, all fields are separated by one or more tabs, with one transaction per line. After the date, the next field lists the type of expense (or \"-\" if this is an income item). The third field lists the type of income (or \"-\" if this is an expense item). Then, there's a check number field (again, \"-\" if empty), a transaction cleared field (\"Y\" or \"N\"), a comment and a dollar amount. Now, we're ready to take a look at the QIF format. When I viewed my downloaded QIF file in a text viewer, this is what I saw:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):239 +msgid "Malformed file output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):239 +#, no-wrap +msgid "\n!Type:Bank\nD08/28/2000\nT-8.15\nN\nPCHECKCARD SUPERMARKET\n^\nD08/28/2000\nT-8.25\nN\nPCHECKCARD PUNJAB RESTAURANT\n^\nD08/28/2000\nT-17.17\nN\nPCHECKCARD SUPERMARKET\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):257 +msgid "After scanning the file, wasn't very hard to figure out the format -- ignoring the first line, the format is as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):262 +msgid "File format" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):262 +#, no-wrap +msgid "\nD<date>\nT<transaction amount>\nN<check number>\nP<description>\n^\n<comment>(this is the field separator)</comment>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):274 +msgid "Starting the process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):277 +msgid "When you're tackling a significant sed project like this, don't get discouraged -- sed allows you to gradually massage the data into its final form. As you progress, you can continue to refine your sed script until your output appears exactly as intended. You don't need to get it exactly right on the first try." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):284 +msgid "To start off, I created a file called <path>qiftrans.sed</path>, and started massaging the data:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):289 +msgid "qiftrans.sed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):289 +#, no-wrap +msgid "\n1d\n/^^/d\ns/[[:cntrl:]]//g\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):295 +msgid "The first '1d' command deletes the first line, and the second command removes those pesky '^' characters from the output. The last line removes any control characters that may exist in the file. Since I'm dealing with a foreign file format, I want to eliminate the risk of encountering any control characters along the way. So far, so good. Now, it's time to add some processing punch to this basic script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):304 +msgid "Improved basic script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):304 +#, no-wrap +msgid "\n1d\n/^^/d\ns/[[:cntrl:]]//g\n/^D/ {\n s/^D\\(.*\\)/\\1\\tOUTY\\tINNY\\t/\n s/^01/Jan/\n s/^02/Feb/\n s/^03/Mar/\n s/^04/Apr/\n s/^05/May/\n s/^06/Jun/\n s/^07/Jul/\n s/^08/Aug/\n s/^09/Sep/\n s/^10/Oct/\n s/^11/Nov/\n s/^12/Dec/\n s:^\\(.*\\)/\\(.*\\)/\\(.*\\):\\2 \\1 \\3: \n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):326 +msgid "First, I add a '/^D/' address so that sed will only begin processing when it encounters the first character of the QIF date field, 'D'. All of the commands in the curly braces will execute in order as soon as sed reads such a line into its pattern space." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):333 +msgid "The first line in the curly braces will transform a line that looks like:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):337 +msgid "First line before change" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):337 +#, no-wrap +msgid "\nD08/28/2000\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):341 +msgid "into one that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):345 +msgid "First line after change" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):345 +#, no-wrap +msgid "\n08/28/2000 OUTY INNY\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):349 +msgid "Of course, this format isn't perfect right now, but that's OK. We'll gradually refine the contents of the pattern space as we go. The next 12 lines have the net effect of transforming the date to a three-letter format, with the last line removing the three slashes from the date. We end up with this line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):356 +msgid "Final look of the line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):356 +#, no-wrap +msgid "\nAug 28 2000 OUTY INNY\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):360 +msgid "The OUTY and INNY fields are serving as placeholders and will get replaced later. I can't specify them just yet, because if the dollar amount is negative, I'll want to set OUTY and INNY to \"misc\" and \"-\", but if the dollar amount is positive, I'll want to change them to \"-\" and \"inco\" respectively. Since the dollar amount hasn't been read yet, I need to use placeholders for the time being." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):372 +msgid "Refinement" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):375 +msgid "Now, it's time for some further refinement:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):379 +msgid "Further refinement" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):379 +#, no-wrap +msgid "\n1d \n/^^/d\ns/[[:cntrl:]]//g \n/^D/ { \n s/^D\\(.*\\)/\\1\\tOUTY\\tINNY\\t/ \n s/^01/Jan/ \n s/^02/Feb/ \n s/^03/Mar/ \n s/^04/Apr/ \n s/^05/May/ \n s/^06/Jun/ \n s/^07/Jul/ \n s/^08/Aug/ \n s/^09/Sep/ \n s/^10/Oct/ \n s/^11/Nov/ \n s/^12/Dec/ \n s:^\\(.*\\)/\\(.*\\)/\\(.*\\):\\2 \\1 \\3: \n N \n N \n N \n s/\\nT\\(.*\\)\\nN\\(.*\\)\\nP\\(.*\\)/NUM\\2NUM\\t\\tY\\t\\t\\3\\tAMT\\1AMT/ \n s/NUMNUM/-/ \n s/NUM\\([0-9]*\\)NUM/\\1/ \n s/\\([0-9]\\),/\\1/ \n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):408 +msgid "The next seven lines are a bit complicated, so we'll cover them in detail. First, we have three 'N' commands in a row. The 'N' command tells sed to read in the next line in the input and append it to our current pattern space. The three 'N' commands cause the next three lines to be appended to our current pattern space buffer, and now our line looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):416 +msgid "New look of our lines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):416 +#, no-wrap +msgid "\n28 Aug 2000 OUTY INNY \\nT-8.15\\nN\\nPCHECKCARD SUPERMARKET\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):420 +msgid "Sed's pattern space got ugly -- we need to remove the extra newlines and perform some additional formatting. To do this, we'll use the substitution command. The pattern we want to match is:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):426 +msgid "Removing extra lines and applying some additional formatting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):426 +#, no-wrap +msgid "\n'\\nT.*\\nN.*\\nP.*'\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):430 +msgid "This will match a newline, followed by a 'T', followed by zero or more characters, followed by a newline, followed by an 'N', followed by any number of characters and a newline, followed by a 'P', followed by any number of characters. Phew! This regexp will match the entire contents of the three lines we just appended to the pattern space. But we want to reformat this region, not replace it entirely. The dollar amount, check number (if any) and description need to reappear in our replacement string. To do this, we surround those \"interesting parts\" with backslashed parentheses, so that we can refer to them in our replacement string (using '\\1', '\\2\\, and '\\3' to tell sed where to insert them). Here is the final command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):443 +msgid "The final command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):443 +#, no-wrap +msgid "\ns/\\nT\\(.*\\)\\nN\\(.*\\)\\nP\\(.*\\)/NUM\\2NUM\\t\\tY\\t\\t\\3\\tAMT\\1AMT/\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):447 +msgid "This command transforms our line into:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):451 +msgid "Result of the above command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):451 +#, no-wrap +msgid "\n28 Aug 2000 OUTY INNY NUMNUM Y CHECKCARD SUPERMARKET AMT-8.15AMT\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):455 +msgid "While this line is getting better, there are a few things that at first glance appear a bit...er...interesting. The first is that silly \"NUMNUM\" string -- what purpose does that serve? You'll find out as you inspect the next two lines of the sed script, which will replace \"NUMNUM\" with a \"-\", while \"NUM\"<number>\"NUM\" will be replaced with <number>. As you can see, surrounding the check number with a silly tag allows us to conveniently insert a \"-\" if the field is empty." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):468 +msgid "Finishing touches" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):471 +msgid "The last line removes a comma following a number. This converts dollar amounts like \"3,231.00\" to \"3231.00\", which is the format I use. Now, it's time to take a look at the final, production script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):477 +msgid "The final, production script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):477 +#, no-wrap +msgid "\n1d\n/^^/d\ns/[[:cntrl:]]//g\n/^D/ {\n s/^D\\(.*\\)/\\1\\tOUTY\\tINNY\\t/\n s/^01/Jan/\n s/^02/Feb/\n s/^03/Mar/\n s/^04/Apr/\n s/^05/May/\n s/^06/Jun/\n s/^07/Jul/\n s/^08/Aug/\n s/^09/Sep/\n s/^10/Oct/\n s/^11/Nov/\n s/^12/Dec/\n s:^\\(.*\\)/\\(.*\\)/\\(.*\\):\\2 \\1 \\3:\n N\n N\n N\n s/\\nT\\(.*\\)\\nN\\(.*\\)\\nP\\(.*\\)/NUM\\2NUM\\t\\tY\\t\\t\\3\\tAMT\\1AMT/\n s/NUMNUM/-/\n s/NUM\\([0-9]*\\)NUM/\\1/\n s/\\([0-9]\\),/\\1/\n /AMT-[0-9]*.[0-9]*AMT/b fixnegs\n s/AMT\\(.*\\)AMT/\\1/\n s/OUTY/-/\n s/INNY/inco/\n b done\n:fixnegs\n s/AMT-\\(.*\\)AMT/\\1/\n s/OUTY/misc/\n s/INNY/-/\n:done\n}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):516 +msgid "The additional eleven lines use substitution and some branching functionality to perfect the output. We'll want to take a look at this line first:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):521 +msgid "First line worth looking at" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):521 +#, no-wrap +msgid "\n /AMT-[0-9]*.[0-9]*AMT/b fixnegs \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):525 +msgid "This line contains a branch command, which is of the format \"/regexp/b label\". If the pattern space matches the regexp, sed will branch to the fixnegs label. You should be able to easily spot this label, which appears as \":fixnegs\" in the code. If the regexp doesn't match, processing continues as normal with the next command." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):533 +msgid "Now that you understand the workings of the command itself, let's take a look at the branches. If you look at the branch regular expression, you'll see that it will match the string 'AMT', followed by a '-', followed by any number of digits, a '.', any number of digits and 'AMT'. As I'm sure you've figured out, this regexp deals specifically with a negative dollar amount. Earlier, we surrounded our dollar amount with 'AMT' strings so we could easily find it later. Because the regexp only matches dollar amounts that begin with a '-', our branch will only happen if we happen to be dealing with a debit. If we are dealing with a debit, OUTY should be set to 'misc', INNY should be set to '-', and the negative sign in front of the debit amount should be removed. If you follow the code, you'll see that this is exactly what happens. If the branch isn't executed, OUTY gets replaced with '-', and INNY gets replaced with 'inco'. We're finished! Our output line is now perfect:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):549 +msgid "The perfect output line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):549 +#, no-wrap +msgid "\n28 Aug 2000 misc - - Y CHECKCARD SUPERMARKET -8.15\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):556 +msgid "Don't get confused" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):559 +msgid "As you can see, converting data using sed isn't all that hard, as long as you approach the problem incrementally. Don't try to do everything with a single sed command, or all at once. Instead, gradually work your way toward the goal, and continue to enhance your sed script until your output looks just the way you want it to. Sed packs a lot of punch, and I hope that you've become very familiar with its inner workings and that you'll continue to grow in your sed mastery!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(li):570 +msgid "Read Daniel's other sed articles from developerWorks: Common threads: Sed by example, <uri link=\"l-sed1.xml\">Part 1</uri> and <uri link=\"l-sed2.xml\">Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(li):575 +msgid "Check out Eric Pement's excellent <uri link=\"http://sed.sourceforge.net/sedfaq.html\">sed FAQ</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(li):579 +msgid "You can find the latest sources to sed at <uri> ftp://ftp.gnu.org/pub/gnu/sed</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(li):583 +msgid "Eric Pement also has a handy list of <uri link=\"http://sed.sourceforge.net/sed1line.txt\">sed one-liners</uri> that any aspiring sed guru should definitely look at." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/linux-24-stateful-fw-design.xml.pot b/article/gettext/linux-24-stateful-fw-design.xml.pot new file mode 100644 index 0000000..c94dfd5 --- /dev/null +++ b/article/gettext/linux-24-stateful-fw-design.xml.pot @@ -0,0 +1,765 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(guide:link):5 +msgid "/doc/en/articles/linux-24-stateful-fw-design.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):6 +msgid "Linux 2.4 stateful firewall design" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(abstract):12 +msgid "This tutorial shows you how to use netfilter to set up a powerful Linux stateful firewall." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(version):22 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(date):23 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):26 +msgid "About this tutorial" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):28 +msgid "Should I take this tutorial?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):31 +msgid "This tutorial shows you how to use netfilter to set up a powerful Linux stateful firewall. All you need is an existing Linux system that's currently using a Linux 2.4 kernel. A laptop, workstation, router or server with a Linux 2.4 kernel will do." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):38 +msgid "You should be reasonably familiar with standard network terminology like IP addresses, source and destination port numbers, TCP, UDP and ICMP, etc. By the end of the tutorial, you'll understand how Linux stateful firewalls are put together and you'll have several example configurations to use in your own projects." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):49 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):52 +msgid "For technical questions about the content of this tutorial, contact the author, Daniel Robbins, at <mail link=\"drobbins@gentoo.org\">drobbins@gentoo.org</mail>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):57 +msgid "Residing in Albuquerque, New Mexico, Daniel Robbins was the President/CEO of Gentoo Technologies, Inc., the creator of Gentoo Linux, an advanced Linux for the PC, and the Portage system, a next-generation ports system for Linux. He has also served as a contributing author for the Macmillan books Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade, when he was first exposed to the Logo programming language as well as a potentially dangerous dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife, Mary, and his new baby daughter, Hadassah." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):75 +msgid "First steps" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):77 +msgid "Defining our goal" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):80 +msgid "In this tutorial, we're going to put together a Linux stateful firewall. Our firewall is going to run on a Linux laptop, workstation, server, or router; its primary goal is to allow only certain types of network traffic to pass through. To increase security, we're going to configure the firewall to drop or reject traffic that we're not interested in, as well as traffic that could pose a security threat." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):92 +msgid "Getting the tools" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):95 +msgid "Before we start designing a firewall, we need to do two things. First, we need to make sure that the <c>iptables</c> command is available. As root, type <c>iptables</c> and see if it exists. If it doesn't, then we'll need to get it installed first. Here's how we do that:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):102 +msgid "Installing necessary tools" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):102 +#, no-wrap +msgid "\n# <i>emerge iptables</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):109 +msgid "Kernel configuration" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):112 +msgid "Once installed, you should have an <c>iptables</c> command available for use, as well as the handy iptables man page (<c>man iptables</c>). Great; now all we need is to make sure that we have the necessary functionality built into the kernel. This tutorial assumes that you compile your own kernels. Head over to <path>/usr/src/linux</path>, and type <c>make menuconfig</c> or <c>make xconfig</c>; we're going to enable some kernel network functionality." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):121 +msgid "Under the \"Networking options\" section, make sure that you enable at least the following options:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):126 +msgid "Necessary kernel options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):126 +#, no-wrap +msgid "\n<*> Packet socket\n[*] Network packet filtering (replaces ipchains)\n<*> Unix domain sockets\n[*] TCP/IP networking\n[*] IP: advanced router\n[*] IP: policy routing\n[*] IP: use netfilter MARK value as routing key\n[*] IP: fast network address translation\n[*] IP: use TOS value as routing key\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):138 +msgid "Then, under the \"IP: Netfilter Configuration ->\" menu, enable every option so that we'll have full netfilter functionality. We won't use all the netfilter features, but it's good to enable them so that you can do some experimentation later on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):145 +msgid "There's one networking option under the \"Networking options\" category that you <e>shouldn't</e> enable: explicit congestion notification. Leave this option disabled:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):151 +msgid "Option we have to disable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):151 +#, no-wrap +msgid "\n[ ] IP: TCP Explicit Congestion Notification support\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):155 +msgid "If this option is enabled, your Linux machine won't be able to carry on network communications with 8% of the Internet. When ECN is enabled, some packets that your Linux box sends out will have the ECN bit set; however, this bit freaks out a number of Internet routers, so it's very important that ECN is disabled." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):162 +msgid "OK, now that the kernel's configured correctly for our needs, compile a new one, install it, and reboot. Time to start playing with netfilter :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):170 +msgid "Firewall design basics" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):173 +msgid "In putting together our firewall, the <c>iptables</c> command is our friend. It's what we use to interact with the network packet filtering rules in the kernel. We'll use the <c>iptables</c> command to create new rules, list existing rules, flush rules, and set default packet handling policies. This means that to create our firewall, we're going to enter a series of iptables commands, and here's the first one we're going to take a look at (please don't type this in just yet!)..." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):183 +msgid "Changing chain policy to DROP" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):183 +#, no-wrap +msgid "\n# <i>iptables -P INPUT DROP</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):187 +msgid "You're looking at an almost \"perfect\" firewall. If you type in this command, you'll be incredibly well protected against any form of incoming malicious attack. That's because this command tells the kernel to drop all incoming network packets. While this firewall is extremely secure, it's a bit silly. But before moving on, let's take a look at exactly how this command does what it does." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):199 +msgid "Setting chain policy" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):202 +msgid "An <c>iptables -P</c> command is used to set the default policy for a chain of packet filtering rules. In this example, <c>iptables -P</c> is used to set the default policy for the INPUT chain, a built-in chain of rules that's applied to every incoming packet. By setting the default policy to DROP, we tell the kernel that any packets that reach the end of the INPUT rule chain should be dropped (that is, discarded). And, since we haven't added any rules to the INPUT chain, all packets reach the end of the chain, and all packets are dropped." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):212 +msgid "Again, by itself this command is totally useless. However, it demonstrates a good strategy for firewall design. We'll start by dropping all packets by default, and then gradually start opening up our firewall so that it meets our needs. This will ensure that our firewall is as secure as possible." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):224 +msgid "Defining rules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):226 +msgid "A (small) improvement" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):229 +msgid "In this example, let's assume that we're designing a firewall for a machine with two network interfaces, eth0 and eth1. The eth0 network card is connected to our LAN, while the eth1 network card is attached to our DSL router, our connection to the Internet. For such a situation, we could improve our \"ultimate firewall\" by adding one more line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):237 +msgid "Improving our ultimate firewall" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):237 +#, no-wrap +msgid "\n# <i>iptables -P INPUT DROP</i>\n# <i>iptables -A INPUT -i ! eth1 -j ACCEPT</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):242 +msgid "This additional <c>iptables -A</c> line adds a new packet filtering rule to the end of our INPUT chain. After this rule is added, our INPUT chain consists of a single rule and a drop-by-default policy. Now, let's take a look at what our semi-complete firewall does." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):252 +msgid "Following the INPUT chain" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):255 +msgid "When a packet comes in on any interface (lo, eth0, or eth1), the netfilter code directs it to the INPUT chain and checks to see if the packet matches the first rule. If it does, the packet is accepted, and no further processing is performed. If not, the INPUT chain's default policy is enforced, and the packet is discarded (dropped)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):263 +msgid "That's the conceptual overview. Specifically, our first rule matches all packets coming in from eth0 and lo, immediately allowing them in. Any packets coming in from eth1 are dropped. So, if we enable this firewall on our machine, it'll be able to interact with our LAN but be effectively disconnected from the Internet. Let's look at a couple of ways to enable Internet traffic." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):274 +msgid "Traditional firewalls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):277 +msgid "Obviously, for our firewall to be useful, we need to selectively allow some incoming packets to reach our machine via the Internet. There are two approaches to opening up our firewall to the point where it is useful: one uses static rules, and the other uses dynamic, stateful rules." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):284 +msgid "Let's take downloading Web pages as an example. If we want our machine to be able to download Web pages from the Internet, we can add a static rule that will always be true for every incoming http packet, regardless of origin:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):290 +msgid "Accepting all the incoming http packets" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):290 +#, no-wrap +msgid "\n# <i>iptables -A INPUT --sport 80 -j ACCEPT</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):294 +msgid "Since all standard Web traffic originates from a source port of 80, this rule effectively allows our machine to download Web pages. However, this traditional approach, while marginally acceptable, suffers from a bunch of problems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):303 +msgid "Traditional firewall bummers" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):306 +msgid "Here's a problem: while most Web traffic originates from port 80, some doesn't. So, while this rule would work most of the time, there would be rare instances where this rule wouldn't work. For example, maybe you've seen a URL that looks like this: \"http://www.foo.com:81\". This example URL points to a Web site on port 81 rather than the default port 80, and would be unviewable from behind our current firewall. Taking into account all these special cases can quickly turn a fairly secure firewall into swiss cheese and quickly fill our INPUT chain with a bunch of rules to handle the occasional oddball Web site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):317 +msgid "However, the major problem with this rule is security related. Sure, it's true that only traffic with a source port of 80 will be allowed through our firewall. But the source port of a packet is not something that we have any control over, and it can be easily altered by an intruder. For example, if an intruder knew how our firewall were designed, he could bypass our firewall by simply making sure that all his incoming connections originated from port 80 on one of his machines! Because this static firewall rule is so easy to exploit, a more secure dynamic approach is needed. Thankfully, iptables and kernel 2.4 provide everything we need to enable dynamic, stateful filtering." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):334 +msgid "Stateful firewalls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):336 +msgid "State basics" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):339 +msgid "Rather than opening up holes in our firewall based on static protocol characteristics, we can use Linux's new connection tracking functionality to make firewall decisions based on the dynamic connection state of packets. Conntrack works by associating every packet with an individual bidirectional communications channel, or connection." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):347 +msgid "For example, consider what happens when you use telnet or ssh to connect to a remote machine. If you view your network traffic at the packet level, all you see is a bunch of packets zipping from one machine to another. However, at a higher level, this exchange of packets is actually a bidirectional communications channel between your local machine and a remote machine. Traditional (old-fashioned) firewalls only look at the individual packets, not recognizing that they're actually part of a larger whole, a connection." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):360 +msgid "Inside conntrack" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):363 +msgid "That's where connection tracking technology comes in. Linux's conntrack functionality can \"see\" the higher-level connections that are taking place, recognizing your ssh session as a single logical entity. Conntrack can even recognize UDP and ICMP packet exchanges as logical \"connections\", even though UDP and ICMP are connectionless in nature; this is very helpful because it allows us to use conntrack to handle ICMP and UDP packet exchanges." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):372 +msgid "If you've already rebooted and are using your new netfilter-enabled kernel, you can view a list of active network connections that your machine is participating in by typing <c>cat /proc/net/ip_conntrack</c>. Even with no firewall configured, Linux's conntrack functionality is working behind the scenes, keeping track of the connections that your machine is participating in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):383 +msgid "The NEW connection state" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):386 +msgid "Conntrack doesn't just recognize connections, it also classifies every packet that it sees into one of four connection states. The first state that we're going to talk about is called NEW. When you type <c>ssh remote.host.com</c>, the initial packet or burst of packets that originate from your machine and are destined for remote.host.com are in the NEW state. However, as soon as you receive even just a single reply packet from remote.host.com, any further packets you send to remote.host.com as part of this connection aren't considered NEW packets anymore. So, a packet is only considered NEW when it's involved in establishing a new connection, and no traffic has yet been received from the remote host (as part of this particular connection, of course)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):399 +msgid "I've described outgoing NEW packets, but it's also very possible (and common) to have incoming NEW packets. Incoming NEW packets generally originate from a remote machine, and are involved in initiating a connection with you. The initial packet(s) your Web server receives as part of a HTTP request would be considered incoming NEW packets; however, once you reply to just a single incoming NEW packet, any additional packets you receive that are related to this particular connection are no longer in the NEW state." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):412 +msgid "The ESTABLISHED state" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):415 +msgid "Once a connection has seen traffic in both directions, additional packets relating to this connection are considered to be in an ESTABLISHED state. The distinction between NEW and ESTABLISHED is an important one, as we'll see in a minute." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):425 +msgid "The RELATED state" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):428 +msgid "The third connection state category is called RELATED. RELATED packets are those that are starting a new connection, but are related to another currently existing connection. The RELATED state can be used to regulate connections that are part of a multi-connection protocol, such as ftp, as well as error packets related to existing connections (such as ICMP error packets related to an existing connection)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):440 +msgid "The INVALID state" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):443 +msgid "Finally, there are INVALID packets: those that can't be classified into one of the above three categories. It's important to note that if a packet is considered INVALID, it isn't automatically discarded; it's still up to you to insert the appropriate rules and set chain policy so that they're handled correctly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):454 ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):463 +msgid "Adding a stateful rule" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):457 +msgid "OK, now that we have a good understanding of connection tracking, it's time to take a look at a single additional rule that transforms our non-functional firewall into something quite useful:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):463 +#, no-wrap +msgid "\n# <i>iptables -P INPUT DROP</i>\n# <i>iptables -A INPUT -i ! eth1 -j ACCEPT</i>\n# <i>iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):472 +msgid "How the rule works" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):475 +msgid "This single rule, when inserted at the end of our existing INPUT chain, will allow us to establish connections with remote machines. It works as follows. Let's say we want to ssh over to remote.host.com. After typing <c>ssh remote.host.com</c>, our machine sends out a packet to initiate the connection. This particular packet is in the NEW state, and our firewall allows it out, because we're only blocking packets coming in to our firewall, not going out." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):484 +msgid "When we get a reply packet from remote.host.com, this packet trickles through our INPUT chain. It doesn't match our first rule (since it comes in on eth1), so it moves on to our next, and final rule. If it matches this rule, it will be accepted, and if it doesn't, it will fall off the end of the INPUT chain and the default policy will be applied to the packet (DROP). So, is this incoming reply packet accepted or dropped on the floor?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):493 +msgid "Answer: accepted. When the kernel inspects this incoming packet, it first recognizes that it's part of an already existing connection. Then, the kernel needs to decide whether this is a NEW or ESTABLISHED packet. Since this is an incoming packet, it checks to see if this connection has had any outgoing traffic, and finds that it has (our initial NEW packet that we sent out). Therefore, this incoming packet is categorized as ESTABLISHED, as are any further packets we receive or send that are associated with this connection." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):506 +msgid "Incoming NEW packets" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):509 +msgid "Now, let's consider what happens if someone on a remote machine tries to ssh in to us. The initial packet we receive is classified as NEW, and doesn't match rule 1, so it advances to rule 2. Because this packet isn't in an ESTABLISHED or RELATED state, it falls off the end of the INPUT chain and the default policy, DROP, is applied. Our incoming ssh connection request is dropped to the floor without so much as a reply (or TCP reset) from us." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):521 +msgid "A near-perfect firewall" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):524 +msgid "So, what kind of firewall do we have so far? An excellent one for a laptop or a workstation where you don't want anyone from the Internet connecting to you, but where you need to connect to sites on the Internet. You'll be able to use Netscape, konqueror, ftp, ping, perform DNS lookups, and more. Any connection that you initiate will get back in through the firewall. However, any unsolicited connection that comes in from the Internet will be dropped, unless it's related to an existing connection that you initiated. As long as you don't need to provide any network services to the outside, this is a near-perfect firewall." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):539 ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):547 +msgid "A basic firewall script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):542 +msgid "Here's a simple script that can be used to set up/tear down our first basic workstation firewall:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):547 +#, no-wrap +msgid "\n#!/bin/bash\n<comment># A basic stateful firewall for a workstation or laptop that isn't running any</comment>\n<comment># network services like a web server, SMTP server, ftp server, etc.</comment>\n\nif [ \"$1\" = \"start\" ]\nthen\n echo \"Starting firewall...\"\n iptables -P INPUT DROP\n iptables -A INPUT -i ! eth1 -j ACCEPT\n iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\nelif [ \"$1\" = \"stop\" ]\nthen\n echo \"Stopping firewall...\"\n iptables -F INPUT\n iptables -P INPUT ACCEPT\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):569 +msgid "Using the script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):572 +msgid "Using this script, you can bring down the firewall by typing <c>./firewall stop</c>, and bring it back up again by typing <c>./firewall start</c>. To bring down the firewall, we flush our rules out of the INPUT chain with a <c>iptables -F INPUT</c>, and then switch the default INPUT policy back to ACCEPT with a <c>iptables -P INPUT ACCEPT</c> command. Now, let's look at a bunch of improvements that we can make to our existing workstation firewall. Once I've explained every improvement, I'll present a final workstation firewall script. Then, we'll start customizing our firewall for servers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):588 +msgid "Stateful improvements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):590 ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):602 +msgid "Explicitly turn off ECN" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):593 +msgid "I mentioned earlier that it's important to turn off ECN (explicit congestion notification) so that Internet communications will work properly. While you may have disabled ECN in the kernel per my suggestion, it's possible that in the future, you'll forget to do so. Or, possibly, you'll pass your firewall script along to someone who has ECN enabled. For these reasons, it's a good idea to use the <path>/proc</path> interface to explicitly disable ECN, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):602 +#, no-wrap +msgid "\nif [ -e /proc/sys/net/ipv4/tcp_ecn ]\nthen\n echo 0 > /proc/sys/net/ipv4/tcp_ecn\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):612 ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):624 +msgid "Forwarding" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):615 +msgid "If you're using your Linux machine as a router, then you'll want to enable IP forwarding, which will give the kernel permission to allow packets to travel between eth0 and eth1, and vice versa. In our example configuration, where eth0 is connected to our LAN, and eth1 is connected to the Internet, enabling IP forwarding is a necessary step in allowing our LAN to connect to the Internet via our Linux box. To enable IP forwarding, use this line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):624 +#, no-wrap +msgid "\n# <i>echo 1 > /proc/sys/net/ipv4/ip_forward</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):631 ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):652 +msgid "Handling rejection" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):634 +msgid "So far, we've been dropping all unsolicited traffic coming in from the Internet. While this is an effective way to deter unwanted network activity, it does have some drawbacks. The biggest problem with this approach is that it's easy for an intruder to detect that we're running a firewall, since our machine isn't replying with the standard TCP reset and ICMP port-unreachable responses: the responses that a normal machine would send back to indicate a failed connection attempt to a non-existent service." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):644 +msgid "Rather than let potential intruders know that we're running a firewall (and thus tip them off to the fact that we may be running some valuable services that they can't get to), it would be to our advantage to make it appear as if we aren't running any services at all. By adding these two rules to the end of our INPUT chain, we can successfully accomplish this task:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):652 +#, no-wrap +msgid "\n# <i>iptables -A INPUT -p tcp -i eth1 -j REJECT --reject-with tcp-reset</i>\n# <i>iptables -A INPUT -p udp -i eth1 -j REJECT --reject-with icmp-port-unreachable</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):657 +msgid "Our first rule takes care of correctly zapping TCP connections, while the second handles UDP. With these two rules in place, it becomes very difficult for an intruder to detect that we're actually running a firewall; hopefully, this will cause the intruder to leave our machine and search for other targets with more potential for abuse." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):665 +msgid "In addition to making our firewall more \"stealthy\", these rules also eliminate the delay involved in connecting to certain ftp and irc servers. This delay is caused by the server performing an ident lookup to your machine (connecting to port 113) and eventually (after about 15 seconds) timing out. Now, our firewall will return a TCP reset and the ident lookup will fail immediately instead of retrying for 15 seconds (while you're patiently waiting for a response from the server)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):678 ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):693 +msgid "Spoof protection" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):681 +msgid "In many distributions, when the network interface(s) are brought up, several old ipchains rules are also added to the system. These special rules were added by the creators of the distribution to deal with a problem called spoofing, in which the source address of packets have been tweaked so that they contains an invalid value (something that script kiddies do). While we can create similar iptables rules that will also block spoofed packets, there's an easier way. These days, the kernel has the built-in ability to dropped spoofed packets; all we need to do is enable it via a simple <path>/proc</path> interface. Here's how." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):693 +#, no-wrap +msgid "\nfor x in lo eth0 eth1\ndo\n echo 1 > /proc/sys/net/ipv4/conf/${x}/rp_filter\ndone\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):700 +msgid "This shell script will tell the kernel to drop any spoofed packets on interfaces lo, eth0, and eth1. You can either add these lines to your firewall script, or add them to the script that brings up your lo, eth0, and eth1 interfaces." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):709 ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):720 +msgid "Masquerading" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):712 +msgid "NAT (network address translation) and IP masquerading, while not directly related to firewalls, are often used in conjunction with them. We're going to look at two common NAT/masquerading configurations that you may need to use. This first rule would take care of situations where you have a dialup link to the Internet (ppp0) that uses a dynamic IP:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):720 +#, no-wrap +msgid "\n# <i>iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):724 +msgid "If you're in this situation, you'll also want to convert my firewall scripts so that all references to \"eth1\" (our example DSL router) are changed to \"ppp0\". And it's perfectly fine to add firewalling rules that refer to \"ppp0\" when the ppp0 interface doesn't yet exist. As soon as ppp0 is up, everything will work perfectly. Make sure you enable IP forwarding as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):735 ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):762 +msgid "SNAT" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):738 +msgid "If you're using DSL to connect to the Internet, you probably have one of two possible configurations. One possibility is that your DSL router or modem has its own IP number and performs network address translation for you. If you're in this situation, you don't need Linux to perform NAT for you since your DSL router is taking care of it already." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):746 +msgid "However, if you want to have more control over your NAT functionality, you may want to talk to your ISP about configuring your DSL connection so that your DSL router is in \"bridged mode\". In bridged mode, your firewall becomes an official part of your ISP's network, and your DSL router transparently forwards IP traffic back and forth between your ISP and your Linux box without letting anyone know that it's there. It no longer has an IP number; instead, eth1 (in our example) sports the IP. If someone pings your IP from the Internet, they get a reply back from your Linux box, rather than your router." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):757 +msgid "With this kind of setup, you'll want to use SNAT (source NAT) rather than masquerading. Here's the line you should add to your firewall:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):762 +#, no-wrap +msgid "\n# <i>iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 1.2.3.4</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):766 +msgid "In this example, eth1 should be changed to the ethernet interface connected directly to your DSL router, and 1.2.3.4 should be changed to your static IP (the IP of your ethernet interface). Again, remember to enable IP forwarding." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):775 +msgid "NAT issues" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):778 +msgid "Fortunately for us, NAT and masquerading get along just fine with a firewall. When writing your firewall filtering rules, just ignore the fact that you're using NAT. Your rules should accept, drop, or reject packets based on their \"real\" source and destination addresses. The firewall filtering code sees the original source address for a packet, and the final destination address. This is great for us, because it allows our firewall to continue working properly even if we temporarily disable NAT or masquerading." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):791 +msgid "Understanding tables" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):794 +msgid "In the above NAT/masquerading examples, we're appending rules to a chain, but we're also doing something a bit different. Notice the \"-t\" option. The \"-t\" option allows us to specify the table that our chain belongs to. When omitted, the default table defaults to \"filter\". So, all our previous non-NAT related commands were modifying the INPUT chain that's part of the \"filter\" table. The \"filter\" table contains all the rules associated with accepting or rejecting packets, while the \"nat\" table (as you would assume) contains rules relating to network address translation. There are also other built-in iptables chains and they are described in detail in the iptables man page, as well as in Rusty's HOWTOs (see the <uri link=\"#resources\">Resources</uri> section at the end of this tutorial for links)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):811 ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):819 +msgid "Our enhanced script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):814 +msgid "Now that we've taken a look at a bunch of possible enhancements, it's time to take a look at a second more flexible firewall up/down script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):819 +#, no-wrap +msgid "\n\n#!/bin/bash\n\n<comment># An enhanced stateful firewall for a workstation, laptop or router that isn't</comment>\n<comment># running any network services like a web server, SMTP server, ftp server, etc.</comment>\n\n<comment># Change this to the name of the interface that provides your \"uplink\"</comment>\n<comment># (connection to the Internet)</comment>\n\nUPLINK=\"eth1\"\n\n<comment># If you're a router (and thus should forward IP packets between interfaces),</comment>\n<comment># you want ROUTER=\"yes\"; otherwise, ROUTER=\"no\"</comment>\n\nROUTER=\"yes\"\n\n<comment># Change this next line to the static IP of your uplink interface for static SNAT, or</comment>\n<comment># \"dynamic\" if you have a dynamic IP. If you don't need any NAT, set NAT to \"\" to</comment>\n<comment># disable it.</comment>\n\nNAT=\"1.2.3.4\"\n\n<comment># Change this next line so it lists all your network interfaces, including lo</comment>\n\nINTERFACES=\"lo eth0 eth1\"\n\nif [ \"$1\" = \"start\" ]\nthen\n echo \"Starting firewall...\"\n iptables -P INPUT DROP\n iptables -A INPUT -i ! ${UPLINK} -j ACCEPT\n iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\n iptables -A INPUT -p tcp -i ${UPLINK} -j REJECT --reject-with tcp-reset\n iptables -A INPUT -p udp -i ${UPLINK} -j REJECT --reject-with icmp-port-unreachable\n\n <comment># Explicitly disable ECN</comment>\n if [ -e /proc/sys/net/ipv4/tcp_ecn ]\n then\n echo 0 > /proc/sys/net/ipv4/tcp_ecn\n fi\n\n <comment># Disable spoofing on all interfaces</comment>\n for x in ${INTERFACES}\n do\n echo 1 > /proc/sys/net/ipv4/conf/${x}/rp_filter\n done\n\n if [ \"$ROUTER\" = \"yes\" ]\n then\n <comment># We're a router of some kind, enable IP forwarding</comment>\n echo 1 > /proc/sys/net/ipv4/ip_forward\n if [ \"$NAT\" = \"dynamic\" ]\n then\n <comment># Dynamic IP address, use masquerading</comment>\n echo \"Enabling masquerading (dynamic ip)...\"\n iptables -t nat -A POSTROUTING -o ${UPLINK} -j MASQUERADE\n elif [ \"$NAT\" != \"\" ]\n then\n <comment># Static IP, use SNAT</comment>\n echo \"Enabling SNAT (static ip)...\"\n iptables -t nat -A POSTROUTING -o ${UPLINK} -j SNAT --to ${UPIP}\n fi\n fi\n\nelif [ \"$1\" = \"stop\" ]\nthen\n echo \"Stopping firewall...\"\n iptables -F INPUT\n iptables -P INPUT ACCEPT\n <comment># Turn off NAT/masquerading, if any</comment>\n iptables -t nat -F POSTROUTING\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):899 +msgid "Stateful servers" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):901 ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):910 +msgid "Viewing rules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):904 +msgid "Before we start making customizations to our firewall so that it can be used on a server, I need to show you how to list your currently active firewall rules. To view the rules in the filter table's INPUT chain, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):910 +#, no-wrap +msgid "\n# <i>iptables -v -L INPUT</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):914 +msgid "The -v option gives us a verbose output, so that we can see the total packets and bytes transferred per rule. We can also look at our nat POSTROUTING table with the following command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):920 +msgid "Viewing POSTROUTING table rules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):920 +#, no-wrap +msgid "\n# <i>iptables -t nat -v -L POSTROUTING</i>\nChain POSTROUTING (policy ACCEPT 399 packets, 48418 bytes)\npkts bytes target prot opt in out source destination\n2728 170K SNAT all -- any eth1 anywhere anywhere\nto:215.218.215.2\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):931 +msgid "Getting ready for service" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):934 +msgid "Right now, our firewall doesn't allow the general public to connect to services on our machine because it only accepts incoming ESTABLISHED or RELATED packets. Because it drops any incoming NEW packets, any connection attempt is rejected unconditionally. However, by selectively allowing some incoming traffic to cross our firewall, we can allow the general public to connect to the services that we specify." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):946 +msgid "Stateful HTTP" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):949 +msgid "While we want to accept some incoming connections, we probably don't want to accept every kind of incoming connection. It makes sense to start with a \"deny by default\" policy (as we have now) and begin opening up access to those services that we'd like people to be able to connect to. For example, if we're running a Web server, we'll allow NEW packets into our machine, as long as they are headed for port 80 (HTTP). That's all we need to do. Once we allow the NEW packets in, we've allowed a connection to be established. Once the connection is established, our existing rule allowing incoming ESTABLISHED and RELATED packets kicks in, allowing the HTTP connection to proceed unhindered." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):964 ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):972 +msgid "Stateful HTTP example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):967 +msgid "Let's take a look at the \"heart\" of our firewall and the new rule that allows incoming HTTP connections:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):972 +#, no-wrap +msgid "\niptables -P INPUT DROP\niptables -A INPUT -i ! ${UPLINK} -j ACCEPT\niptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\n<comment># Our new rule follows</comment>\niptables -A INPUT -p tcp --dport http -m state --state NEW -j ACCEPT\niptables -A INPUT -p tcp -i ${UPLINK} -j REJECT --reject-with tcp-reset\niptables -A INPUT -p udp -i ${UPLINK} -j REJECT --reject-with\nicmp-port-unreachable\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):983 +msgid "This new rule allows incoming NEW TCP packets destined for our machine's port 80 (http) to come in. Notice the placement of this rule. It's important that it appears before our REJECT rules. Since iptables will apply the first matching rule, putting it after our REJECT lines would cause this rule to have no effect." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):993 ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):1001 +msgid "Our final firewall script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):996 +msgid "Now, let's take a look at our final firewall script, one that can be used on a laptop, workstation, router, or server (or some combination thereof!)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):1001 +#, no-wrap +msgid "\n\n#!/bin/bash\n\n<comment># Our complete stateful firewall script. This firewall can be customized for</comment>\n<comment># a laptop, workstation, router or even a server. :)</comment>\n\n<comment># Change this to the name of the interface that provides your \"uplink\"</comment>\n<comment># (connection to the Internet)</comment>\n\nUPLINK=\"eth1\"\n\n<comment># If you're a router (and thus should forward IP packets between interfaces),</comment>\n<comment># you want ROUTER=\"yes\"; otherwise, ROUTER=\"no\"</comment>\n\nROUTER=\"yes\"\n\n<comment># Change this next line to the static IP of your uplink interface for static SNAT, or</comment>\n<comment># \"dynamic\" if you have a dynamic IP. If you don't need any NAT, set NAT to \"\" to</comment>\n<comment># disable it.</comment>\n\nNAT=\"1.2.3.4\"\n\n<comment># Change this next line so it lists all your network interfaces, including lo</comment>\n\nINTERFACES=\"lo eth0 eth1\"\n\n<comment># Change this line so that it lists the assigned numbers or symbolic names (from</comment>\n<comment># /etc/services) of all the services that you'd like to provide to the general</comment>\n<comment># public. If you don't want any services enabled, set it to \"\"</comment>\n\nSERVICES=\"http ftp smtp ssh rsync\"\n\nif [ \"$1\" = \"start\" ]\nthen\n echo \"Starting firewall...\"\n iptables -P INPUT DROP\n iptables -A INPUT -i ! ${UPLINK} -j ACCEPT\n iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\n\n <comment># Enable public access to certain services</comment>\n for x in ${SERVICES}\n do\n iptables -A INPUT -p tcp --dport ${x} -m state --state NEW -j ACCEPT\n done\n\n iptables -A INPUT -p tcp -i ${UPLINK} -j REJECT --reject-with tcp-reset\n iptables -A INPUT -p udp -i ${UPLINK} -j REJECT --reject-with icmp-port-unreachable\n\n <comment># Explicitly disable ECN</comment>\n if [ -e /proc/sys/net/ipv4/tcp_ecn ]\n then\n echo 0 > /proc/sys/net/ipv4/tcp_ecn\n fi\n\n <comment># Disable spoofing on all interfaces</comment>\n for x in ${INTERFACES}\n do\n echo 1 > /proc/sys/net/ipv4/conf/${x}/rp_filter\n done\n\n if [ \"$ROUTER\" = \"yes\" ]\n then\n <comment># We're a router of some kind, enable IP forwarding</comment>\n echo 1 > /proc/sys/net/ipv4/ip_forward\n if [ \"$NAT\" = \"dynamic\" ]\n then\n <comment># Dynamic IP address, use masquerading</comment>\n echo \"Enabling masquerading (dynamic ip)...\"\n iptables -t nat -A POSTROUTING -o ${UPLINK} -j MASQUERADE\n elif [ \"$NAT\" != \"\" ]\n then\n <comment># Static IP, use SNAT</comment>\n echo \"Enabling SNAT (static ip)...\"\n iptables -t nat -A POSTROUTING -o ${UPLINK} -j SNAT --to ${UPIP}\n fi\n fi\n\nelif [ \"$1\" = \"stop\" ]\nthen\n echo \"Stopping firewall...\"\n iptables -F INPUT\n iptables -P INPUT ACCEPT\n <comment># Turn off NAT/masquerading, if any</comment>\n iptables -t nat -F POSTROUTING\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1094 +msgid "Building a better server firewall" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1096 +msgid "Server improvements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1099 +msgid "It's often possible to make a firewall just an eensy bit \"better\". Of course, what \"better\" means depends on your specific needs. Our existing script could meet yours exactly, or maybe some additional tweaking is in order. This section is intended to serve as a cookbook of ideas, demonstrating ways to enhance your existing stateful firewall." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1110 +msgid "Logging techniques" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1113 +msgid "So far, we haven't discussed how to go about logging anything. There's a special target called LOG that you can use to log things. Along with LOG, there's a special option called <c>--log-prefix</c> that allows you to specify some text that will appear alongside the packet dump in the system logs. Here's an example log rule:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):1121 +msgid "Example log rule" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):1121 +#, no-wrap +msgid "\n# <i> iptables -A INPUT -j LOG --log-prefix \"bad input:\"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1125 +msgid "You wouldn't want to add this as the first rule in your INPUT chain, as it would cause a log entry to be recorded for every packet that you receive! Instead, place log rules further down in your INPUT chain with the intention of logging strange packets and other anomalies." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1132 +msgid "Here's an important note about the LOG target. Normally, when a rule matches, a packet is either accepted, rejected, or dropped, and no further rules are processed. However, when a log rule matches, the packet is logged. However, it is not accepted, rejected, or dropped. Instead, the packet continues on to the next rule, or the default chain policy is applied if the log rule is the last on the chain." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1141 +msgid "The LOG target can also be combined with the \"limit\" module (described in the iptables man page) to minimize duplicate log entries. Here's an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):1146 +msgid "Limiting log entries" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):1146 +#, no-wrap +msgid "\n# <i>iptables -A INPUT -m state --state INVALID -m limit --limit 5/minute -j LOG --log-prefix \"INVALID STATE:\"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1153 +msgid "Creating your own chains" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1156 +msgid "<c>iptables</c> allows you to create your own user-defined chains that can be specified as targets in your rules. If you want to learn how to do this, spend some time going through the Packet filtering HOWTO at the netfilter/iptables project home page (<uri>http://www.netfilter.org/</uri>)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1166 +msgid "Enforcing network usage policy" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1169 +msgid "Firewalls offer a lot of power for those who want to enforce a network usage policy for a corporate or academic LAN. You can control what packets your machine forwards by adding rules to and setting policy for the FORWARD chain. By adding rules to the OUTPUT chain, you can also control what happens to packets that are generated locally, by users on the Linux box itself. iptables also has the incredible ability to filter locally-created packets based on owner (uid or gid). For more information on this, search for \"owner\" in the iptables man page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1182 +msgid "Other security angles" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1185 +msgid "In our example firewall, we've assumed that all internal LAN traffic is trustworthy, and that only incoming Internet traffic must be carefully monitored. Depending on your particular network, that may or may not be the case. There's certainly nothing stopping you from configuring your firewall to provide protection from incoming LAN traffic. Consider other \"angles\" of your network that you may want to protect. It may also be appropriate to configure two separate LAN security \"zones\", each with its own security policy." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1200 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1202 +msgid "tcpdump" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1205 +msgid "In this section, I'll point out a number of resources that you'll find helpful as you put together your own stateful firewall. Let's start with an important tool..." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1211 +msgid "<uri link=\"http://www.tcpdump.org/\">tcpdump</uri> is an essential tool for exploring low-level packet exchanges and verifying that your firewall is working correctly. If you don't have it, get it. If you've got it, start using it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1220 +msgid "netfilter.kernelnotes.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1223 +msgid "Visit the netfilter/iptables project home page (<uri>http://www.netfilter.org</uri>). You'll find many resources at this site, including the iptables sources and a <uri link=\"http://www.netfilter.org/documentation/index.html#documentation-faq\">netfilter FAQ</uri>. Also <uri link=\"http://people.netfilter.org/~rusty/unreliable-guides/index.html\">Rusty's Remarkably Guides</uri> are excellent, and include a basic networking concepts HOWTO, a netfilter (iptables) HOWTO, a NAT HOWTO, and a netfilter hacking HOWTO for developers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1238 +msgid "iptables man page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1241 +msgid "Thankfully, there are a lot of good online netfilter resources; however, don't forget the basics. The iptables man page is very detailed and is a shining example of what a man page should be. It's actually an enjoyable read." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1250 +msgid "Advanced Linux routing and traffic control HOWTO" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1253 +msgid "There's now an <uri link=\"http://www.ds9a.nl/2.4Routing/\">Advanced Linux Routing and Traffic Control HOWTO</uri> available. There's a good section that shows how to use iptables to mark packets, and then use Linux routing functionality to route the packets based on these marks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(note):1260 +msgid "This HOWTO contains references to Linux's traffic control (quality of service) functionality (accessed through the new <c>tc</c> command). This new functionality, although very cool, is very poorly documented, and attempting to figure out all aspects of Linux traffic control can be a very frustrating task at this point." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1270 +msgid "Mailing lists" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1273 +msgid "Users who have questions on netfilter/iptables usage, setup, or configuration, or who want to help other users by sharing their experience and knowledge, can contact the <uri link=\"http://www.netfilter.org/mailinglists.html#ml-user\">netfilter user mailing list</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1281 +msgid "Netfilter/iptables developers who have questions, suggestions, or contributions to netfilter/iptables development can contact the <uri link=\"http://www.netfilter.org/mailinglists.html#ml-devel\">netfilter developer mailing list</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1288 +msgid "You can also browse the list archives at these URLs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1295 +msgid "Building Internet Firewalls, Second Edition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1298 +msgid "In June 2000, O'Reilly released an excellent book -- <uri link=\"http://www.oreilly.com/catalog/fire2/\">Building Internet Firewalls, Second Edition</uri>. It's great reference book, especially for those times when you want to configure your firewall to accept (or flat-out reject) a little-known protocol that you're unfamiliar with." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1306 +msgid "Well, that's it for our resources list, and our tutorial is complete. I hope that this tutorial has been helpful to you, and I look forward to your feedback." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1314 +msgid "Your feedback" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1317 +msgid "We look forward to getting your feedback on this tutorial. Additionally, you are welcome to contact the author, Daniel Robbins, at <mail link=\"drobbins@gentoo.org\">drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/linux-kernel-compiling.xml.pot b/article/gettext/linux-kernel-compiling.xml.pot new file mode 100644 index 0000000..957f3d8 --- /dev/null +++ b/article/gettext/linux-kernel-compiling.xml.pot @@ -0,0 +1,447 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(guide:link):5 +msgid "/doc/en/articles/linux-kernel-compiling.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):6 +msgid "Compiling the Linux kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by: Joshua Saddler (nightmorph@gentoo.org) +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(abstract):13 +msgid "Daniel Robbins introduces the Linux kernel, and then walks you through locating and downloading sources, configuring the kernel, compiling and installing the kernel, and boot configuration." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(version):24 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(date):25 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):28 +msgid "Introducing the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):30 +msgid "The kernel is... Linux!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):33 +msgid "What do you think of when you hear the word \"Linux\"? When I hear it, I typically think of an entire Linux distribution and all the cooperating programs that make the distribution work." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):39 +msgid "However, you may be surprised to find out that, technically, Linux is a kernel, and a kernel only. While the other parts of what we commonly call \"Linux\" (such as a shell and compiler) are essential parts of a distribution, they are technically separate from Linux (the kernel). While many people use the word \"Linux\" to mean \"Linux-based distribution,\" everyone can at least agree that the Linux kernel is the <e>heart</e> of every distribution." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):51 +msgid "Interfacing with hardware" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):54 +msgid "The primary role of the Linux kernel is to interface directly with the hardware in your system. The kernel provides a <e>layer of abstraction</e> between the raw hardware and application programs. This way, the programs themselves do not need to know the details of your specific motherboard chipset or disk controller -- they can instead operate at the higher level of reading and writing files to disk, for example." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):66 +msgid "CPU abstraction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):69 +msgid "The Linux kernel also provides a level of abstraction on top of the processor(s) in your system -- allowing for multiple programs to appear to run simultaneously. Linux does this by allowing several UNIX <e>processes</e> to run at once -- and the kernel takes care of giving each one a fair share of the processor(s)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):77 +msgid "A Linux kernel can support either a single or multiple CPUs -- and the kernel that you are using now is either uniprocessor-aware (UP-aware) or symmetric multiprocessor-aware (SMP-aware). If you happen to have an SMP motherboard, but you're using a UP kernel, Linux won't \"see\" your extra processors! To fix this, you'll want to compile a special SMP kernel for your hardware. Currently, SMP kernels will also work on uniprocessor systems, but at a slight performance hit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):90 +msgid "Abstracting I/O" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):93 +msgid "The kernel also handles the much-needed task of abstracting all forms of file I/O. Imagine what would happen if every program had to interface with your particular hardware directly -- if you changed disk controllers, all your programs would stop working! Fortunately, the Linux kernel follows the UNIX model of providing a simple abstraction of disk I/O that all programs can use. That way, your favorite database doesn't need to be concerned whether it is storing data on an IDE disk, a SCSI RAID array, or a network-mounted file system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):107 +msgid "Networking Central" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):110 +msgid "One of Linux's main claims to fame is its robust networking, especially TCP/IP support. And, if you guessed that the TCP/IP stack is in the Linux kernel, you're right! The kernel provides a nice, high-level interface for programs that want to send data over the network. Behind the scenes, the Linux kernel interfaces directly with your particular ethernet card or modem, and handles the low-level Internet communication details." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):122 +msgid "Networking goodies" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):125 +msgid "One of the greatest things about Linux is all of the useful features that are available in the kernel, especially those related to networking. For example, you can configure a kernel that will allow your entire home network to access the Internet via your Linux modem -- this is called IP Masquerading, or IP NAT (network address translating)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):133 +msgid "Additionally, the Linux kernel can be configured to export or mount network-based NFS file systems, allowing for other UNIX machines on your LAN to easily share data with your Linux system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):142 +msgid "Booting, part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):145 +msgid "When you turn on your Linux-based system, the kernel is loaded from disk to memory by a boot loader, such as LILO. At this point, the kernel takes control of your system. The first thing it does is detect and initialize all the hardware that it finds -- and it has been compiled to support. Once the hardware has been initialized properly, it is then ready to run processes. The first process it runs is called <c>init</c>, which is located in <path>/sbin</path>. Then, <c>init</c> starts additional processes, as specified in <path>/etc/inittab</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):159 +msgid "Booting, part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):162 +msgid "<c>init</c> typically starts several copies of a program called <c>getty</c>, which waits for logins from the console. After <c>getty</c> successfully processes a login request, your default shell is loaded (which is typically <c>bash</c>). Once you're in bash, you have the power to launch any program you'd like." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):170 +msgid "While all these new processes are started, the kernel is still in control, carefully time-slicing the CPU so that each process has a fair share. In addition, the kernel continues to provide hardware abstraction and networking services for the various running processes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):180 +msgid "Introducing... modules!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):183 +msgid "All recent Linux kernels support kernel modules. Kernel modules are really neat things -- they're pieces of the kernel that reside on disk, until needed. As soon as the kernel needs the functionality of a particular module, it's loaded from disk, automatically integrated with the kernel, and available for use. In addition, if a kernel module hasn't been used for several minutes, the kernel can voluntarily unload it from memory -- something that's called \"autocleaning.\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):196 +msgid "Modules, part deux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):199 +msgid "Kernel modules live in <path>/lib/modules</path>, and each module has a <path>.o</path> or <path>.ko</path> at the end of its name. As you may guess, modules each represent a particular component of kernel functionality -- one module may provide FAT filesystem support, while another may support a particular ISA ethernet card." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):207 +msgid "Modules allow you to have a low kernel memory footprint. You can create a kernel that contains only the features necessary for booting your computer, and all other features can be loaded from modules on demand. Because the kernel autocleans any modules it loads, your system's memory can be put to good use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):217 +msgid "Modules -- important stuff!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):220 +msgid "You can't put <e>everything</e> in a module. Because modules are stored on disk, your bootable kernel image needs to have compiled-in support for your disk controller as well as for your native file system (typically the ext2 filesystem). If you don't have these essential components compiled into your kernel image (but compile them as modules instead), then your kernel won't have the necessary ability to load these modules from disk -- creating a rather ugly chicken-and-egg problem!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):235 +msgid "Locating and downloading sources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):237 +msgid "Kernel versions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):240 +msgid "To compile a recent kernel, you need to download the sources first. But before you download the kernel sources, you need to know what you're looking for. The first question to ask yourself is this -- do you want to use a stable or <e>experimental</e> kernel?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):247 +msgid "Stable kernels always have an even second digit -- for example, 2.0.38, 2.2.15, 2.2.18, and 2.4.1 are all considered \"stable\" kernels (due to the 0, 2, 2, and 4, respectively.) If you'd like to test out an experimental kernel, you'll typically look for the highest-numbered kernel that has an odd second number. For example, 2.3.99 and 2.1.38 are both experimental kernels (due to their 3 and 1, respectively)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):259 +msgid "Kernel version history" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):262 +msgid "The 2.2 series is considered a modern, stable kernel. If \"modern\" and \"stable\" are things that sound good to you, look for a 2.2 kernel with the highest third number you can find (2.2.16 is the most recent version at the moment)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):268 +msgid "While the 2.2 series kernel was being developed, the 2.3 series began. This series was created to serve as a testing ground for new, advanced features that would eventually show up in the stable 2.4 series. As of right now, the 2.3 series has already reached 2.3.99, and 2.3 development has stopped. These days, developers are working on getting the 2.4.0 <e>test</e> kernels into shape. If you'd like to be on the cutting-edge, you'll want to try the most recent 2.4.0-test kernel you can get your hands on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):281 +msgid "2.4 kernel warning" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):284 +msgid "Once a <e>real</e> 2.4 series kernel comes out (like 2.4.0), don't assume that the kernel is ready for use on a mission-critical system like a server. Even though 2.4 is supposed to be a stable series, early 2.4 kernels are likely to be not quite up to snuff. As is often the case in the computer industry, the first version of anything can have fairly sizable bugs. While this may not be a problem if you're testing the kernel on your home workstation, it is a risk you may want to avoid when you machine provides valuable services to others." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):297 +msgid "Downloading the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):300 +msgid "If you simply want to compile a new version of your installed kernel (for example, to enable SMP support), then no downloading is necessary -- skip past this and the next section." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):306 +msgid "You can find kernels at <uri>http://www.kernel.org/pub/linux/kernel</uri>. When you go there, you'll find the kernel sources organized into several different directories, based on kernel version (v2.2, v2.3, etc.) Inside each directory, you'll find files labelled \"<path>linux-x.y.z.tar.gz</path>\" and \"<path>linux-x.y.z.tar.bz2</path>\". These are the Linux kernel sources. You'll also see files labelled \"<path>patch-x.y.z.gz</path>\" and \"<path>patch-x.y.z.bz2</path>\". These files are patches that can be used to update the previous version of complete kernel sources. If you want to compile a new kernel release, you'll need to download one of the \"linux\" files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):321 +msgid "Unpacking the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):324 +msgid "If you downloaded a new kernel from kernel.org, now it's time to unpack it. To do so, <c>cd</c> into <path>/usr/src</path>. If there is an existing <path>linux</path> directory there, move it to <path>linux.old</path> (<c>mv linux linux.old</c>, as root.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):331 +msgid "Now, it's time to extract the new kernel. While still in <path>/usr/src</path>, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre:caption):336 +msgid "Extracting with gzip" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre):336 +#, no-wrap +msgid "\n# <i>tar -xzvf /path/to/my/kernel-x.y.z.tar.gz</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):340 +msgid "or" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre:caption):344 +msgid "Extracting with bzip2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre):344 +#, no-wrap +msgid "\n# <i>tar -xvjf /path/to/my/kernel-x.y.z.tar.bz2</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):348 +msgid "Depending on whether your sources are compressed with <c>gzip</c> or <c>bzip2</c>. After typing this, your new kernel sources will be extracted into a new <path>linux</path> directory. Beware: the full kernel sources typically occupy more than 50 megabytes on disk!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):360 +msgid "Configuring the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):362 +msgid "Let's talk configuration" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):365 +msgid "Before you compile your kernel, you need to configure it. Configuration is your opportunity to control exactly what kernel features are enabled (and disabled) in your new kernel. You'll also be in control of what parts get compiled into the kernel binary image (which gets loaded at boot-time), and what parts get compiled into load-on-demand kernel module files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):373 +msgid "The old-fashioned way of configuring a kernel was a tremendous pain, and involved entering <path>/usr/src/linux</path> and typing <c>make config</c>. While <c>make config</c> still works, please don't try to use this method to configure your kernel -- unless you like answering hundreds (yes, hundreds!) of yes/no questions on the command line." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):384 +msgid "The New Way to configure" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):387 +msgid "We more modern folks, instead of typing <c>make config</c>, type either <c>make menuconfig</c> or <c>make xconfig</c>. If you'd like to configure your kernel, type one of these options. If you type <c>make menuconfig</c>, you'll get a nice text-based color menu system that you can use to configure the kernel. If you type <c>make xconfig</c>, you'll get a very nice X-based GUI that can be used to configure various kernel options. Here's a screenshot of <c>make menuconfig</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(figure:link):397 +msgid "/images/docs/l-kernel.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(figure:caption):397 +msgid "menuconfig in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):399 +msgid "When using <c>make menuconfig</c>, options that have a <c>< ></c> to their left can be compiled as a module. When the option is highlighted, hit the space bar to toggle whether the option is deselected (<c>< ></c>), selected to be compiled into the kernel image (<c><*></c>) or selected to be compiled as a module (<c><M></c>)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):410 +msgid "Configuration tips" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):413 +msgid "There are tons of kernel options, and there's no room to explain them all here -- so please take advantage of the kernel's built-in help functionality. Almost every option is described in at least some detail, and each one normally contains the line \"If you don't know what this means, type Y (or N).\" These hints keep you out of trouble if you happen to have no clue what a particular option actually does. To access help, highlight the option you have a question about and press the \"?\" key." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):428 +msgid "Compiling and installing the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):430 +msgid "make dep; make clean" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):433 +msgid "Once your kernel is configured, it's time to get it compiled. Before we can compile it, we need to generate dependency information and also clean out any old \"compiled stuff.\" This can be accomplished by typing: <c>make dep; make clean</c> while in <path>/usr/src/linux</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):443 +msgid "Make bzImage" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):446 +msgid "Now, it's time to compile the actual binary kernel image. Type <c>make bzImage</c>. After several minutes, compilation will complete and you'll find the bzImage file in <path>/usr/src/linux/arch/i386/boot</path> (for an x86 PC kernel). We'll show you how to install the new kernel image in a bit, but now it's time for the modules." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):457 +msgid "Compiling modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):460 +msgid "Now that the bzImage is done, it's time to compile the modules. Even if you didn't enable any modules when you configured the kernel, don't skip this step -- it's good to get into the habit of compiling modules immediately after a bzImage. And, if you really have no modules enabled for compilation, this step will go really quickly. Type <c>make modules; make modules_install</c>. This will cause the modules to be compiled and then installed into <path>/usr/lib/<kernelversion></path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):470 +msgid "Congratulations! Your kernel is now fully compiled, and your modules are all compiled and installed. Now, it's time to reconfigure LILO so that you can boot the new kernel." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):481 +msgid "Boot configuration" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):483 +msgid "LILO introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):486 +msgid "It's finally time to reconfigure LILO so that it loads the new kernel. LILO is the most popular Linux boot loader, and is used by all popular Linux distributions. The first thing you'll want to do is take a look at your <path>/etc/lilo.conf</path> file. It will contain a line that says something like <c>image=/vmlinuz</c> This line tells LILO where it should look for the kernel." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):498 +msgid "Boot configuration, part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):501 +msgid "To configure LILO to boot the new kernel, you have two options. The first is to overwrite your existing kernel -- this is risky unless you have some kind of emergency boot method, such a boot disk with this particular kernel on it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):507 +msgid "The safer option is to configure LILO so that it can boot either the new or the old kernel. LILO can be configured to boot the new kernel by default, but still provide a way for you to select your older kernel if you happen to run into problems. This is the recommended option, and the one we'll show you how to perform." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):518 +msgid "Boot configuration, part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):521 +msgid "Your <path>lilo.conf</path> may look like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre:caption):525 +msgid "/etc/lilo.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre):525 +#, no-wrap +msgid "\nboot=/dev/hda\ndelay=20\nvga=normal\nroot=/dev/hda1\nread-only\n\nimage=/vmlinuz\nlabel=linux\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):536 +msgid "To add a new boot entry to your <path>lilo.conf</path>, do the following. First, copy <path>/usr/src/linux/arch/i386/boot/bzImage</path> to a file on your root partition, such as <path>/vmlinuz2</path>. Once it's there, duplicate the last three lines of your <path>lilo.conf</path> and add them again to the end of the file... we're almost there..." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):547 +msgid "Boot configuration, part 4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):550 +msgid "Now, your <path>lilo.conf</path> should look like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre:caption):554 +msgid "the new lilo.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre):554 +#, no-wrap +msgid "\nboot=/dev/hda\ndelay=20\nvga=normal\nroot=/dev/hda1\nread-only\n\nimage=/vmlinuz\nlabel=linux\n\nimage=/vmlinuz\nlabel=linux\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):568 +msgid "Now, change the first <c>image=</c> line to read <c>image=/vmlinuz2</c>. Next, change the <e>second</e><c>label=</c> line to read <c>label=oldlinux</c>. Also, make sure there is a <c>delay=20</c> line near the top of the file -- if not, add one. If there is, make sure the number is at least twenty." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):578 +msgid "Boot configuration, part 5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):581 +msgid "Your <e>final</e><path>lilo.conf</path> file will look something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre:caption):585 +msgid "The final lilo.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre):585 +#, no-wrap +msgid "\nboot=/dev/hda\ndelay=20\nvga=normal\nroot=/dev/hda1\nread-only\n\nimage=/vmlinuz2\nlabel=linux\n\nimage=/vmlinuz\nlabel=oldlinux\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):599 +msgid "After doing all this, you'll need to run <c>lilo</c> as root. This is very important! If you don't do this, the booting process won't work. Running <c>lilo</c> will give it an opportunity to update its boot map." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):608 +msgid "Boot configuration, an explanation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):611 +msgid "Now for an explanation of our changes. This <path>lilo.conf</path> file was set up to allow you to boot two different kernels. It'll allow you to boot your original kernel, located at <path>/vmlinuz</path>. It'll also allow you to boot your new kernel, located at <path>/vmlinuz2</path>. By default, it will try to boot your new kernel (because the image/label lines for the new kernel appear first in the configuration file)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):620 +msgid "If, for some reason, you need to boot the old kernel, simply reboot your computer and hold down the Shift key. LILO will detect this, and allow you to type in the label of the image you'd like to boot. To boot your old kernel, you'd type <c>oldlinux</c>, and hit enter. To see a list of possible labels, you'd hit TAB." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):633 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):637 +msgid "Congratulations on compiling your own kernel! I hope everything went well. Here are some related resources where you can learn more about kernel compilation:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(li):643 +msgid "<uri link=\"http://www.tldp.org/HOWTO/Kernel-HOWTO/\">The Linux Kernel HOWTO</uri>, another good resource for kernel compilation instructions." +msgstr "" + +#. not accessible <li> +#. <uri link="http://www.tldp.org/HOWTO/LILO-crash-rescue-HOWTO/">The LILO, +#. Linux Crash Rescue HOW-TO</uri>, which shows you how to create an emergency +#. Linux boot disk. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(li):652 +msgid "<uri link=\"http://www.kernel.org\">www.kernel.org</uri>, the site that hosts the Linux Kernel archives." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/lpi-101-administration-p2.xml.pot b/article/gettext/lpi-101-administration-p2.xml.pot new file mode 100644 index 0000000..53da471 --- /dev/null +++ b/article/gettext/lpi-101-administration-p2.xml.pot @@ -0,0 +1,1788 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(guide:link):5 +msgid "/doc/en/articles/lpi-101-administration-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):6 +msgid "LPI certification 101 (release 2) exam prep, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(author:title):8 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(author:title):11 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(author:title):14 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(mail:link):12 +msgid "chouser@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(mail):12 +msgid "Chris Houser" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(author):14 +msgid "Aron Griffis" +msgstr "" + +#. <author title="Editor"> +#. <mail link="smithj@gentoo.org">Jonathan Smith</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(abstract):21 +msgid "In this tutorial, you will learn how to use regular expressions to search files for text patterns, how to locate files on your system, and how to take full control of Linux processes. You'll even get a whirlwind introduction to shell pipelines, redirection, and text processing commands. By the end of this tutorial, you'll have a solid grounding in basic Linux administration and will be ready to begin learning more advanced Linux system administration skills in the follow-on tutorial." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(version):36 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(date):37 +msgid "2007-06-20" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):40 +msgid "Before You Start" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):42 +msgid "About this tutorial" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):45 +msgid "Welcome to \"Basic administration,\" the second of four tutorials designed to prepare you for the Linux Professional Institute's 101 exam. In this tutorial, we'll show you how to use regular expressions to search files for text patterns. Next, we'll introduce you to the Filesystem Hierarchy Standard (FSH), and then show you how to locate files on your system. Then, we'll show you how to take full control of Linux processes by running them in the background, listing processes, detaching processes from the terminal, and more. Next, we'll give you a whirlwind introduction to shell pipelines, redirection, and text processing commands. Finally, we'll introduce you to Linux kernel modules." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):57 +msgid "This particular tutorial (Part 2) is ideal for those who have a good basic knowledge of bash and want to receive a solid introduction to basic Linux administration tasks. If you are new to Linux, we recommend that you complete Part 1 of this tutorial series first before continuing. For some, much of this material will be new, but more experienced Linux users may find this tutorial to be a great way of \"rounding out\" their basic Linux administration skills." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):66 +msgid "For those who have taken the release 1 version of this tutorial for reasons other than LPI exam preparation, you probably don't need to take this one. However, if you do plan to take the exams, you should strongly consider reading this revised tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):76 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):79 +msgid "Residing in Albuquerque, New Mexico, Daniel Robbins is the Chief Architect of Gentoo Linux an advanced ports-based Linux meta distribution. He also writes articles, tutorials, and tips for the IBM developerWorks Linux zone and Intel Developer Services and has also served as a contributing author for several books, including Samba Unleashed and SuSE Linux Unleashed. Daniel enjoys spending time with his wife, Mary, and his daughter, Hadassah. You can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):89 +msgid "Chris Houser, known to his friends as \"Chouser,\" has been a UNIX proponent since 1994 when he joined the administration team for the computer science network at Taylor University in Indiana, where he earned his Bachelor's degree in Computer Science and Mathematics. Since then, he has gone on to work in Web application programming, user interface design, professional video software support, and now Tru64 UNIX device driver programming at Compaq. He has also contributed to various free software projects, most recently to Gentoo Linux). He lives with his wife and two cats in New Hampshire. You can contact Chris at chouser@gentoo.org." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):101 +msgid "Aron Griffis graduated from Taylor University with a degree in Computer Science and an award that proclaimed, \"Future Founder of a Utopian UNIX Commune.\" Working towards that goal, Aron is employed by Compaq writing network drivers for Tru64 UNIX, and spending his spare time plunking out tunes on the piano or developing Gentoo Linux. He lives with his wife Amy (also a UNIX engineer) in Nashua, New Hampshire." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):115 +msgid "Regular Expressions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):117 +msgid "What is a regular expression?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):120 +msgid "A regular expression (also called a \"regex\" or \"regexp\") is a special syntax used to describe text patterns. On Linux systems, regular expressions are commonly used to find patterns of text, as well as to perform search-and-replace operations on text streams." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):130 +msgid "Glob comparison" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):133 +msgid "As we take a look at regular expressions, you may find that regular expression syntax looks similar to the filename \"globbing\" syntax that we looked at in Part 1. However, don't let this fool you; their similarity is only skin deep. Both regular expressions and filename globbing patterns, while they may look similar, are fundamentally different beasts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):144 +msgid "The simple substring" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):147 +msgid "With that caution, let's take a look at the most basic of regular expressions, the simple substring. To do this, we're going to use <c>grep</c>, a command that scans the contents of a file for a particular regular expression. grep prints every line that matches the regular expression, and ignores every line that doesn't:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):155 +msgid "grep in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):155 +#, no-wrap +msgid "\n$ <i>grep bash /etc/passwd</i>\noperator:x:11:0:operator:/root:/bin/bash\nroot:x:0:0::/root:/bin/bash\nftp:x:40:1::/home/ftp:/bin/bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):162 +msgid "Above, the first parameter to <c>grep</c> is a regex; the second is a filename. <c>grep</c> read each line in /etc/passwd and applied the simple substring regex bash to it, looking for a match. If a match was found, <c>grep</c> printed out the entire line; otherwise, the line was ignored." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):172 +msgid "Understanding the simple substring" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):175 +msgid "In general, if you are searching for a substring, you can just specify the text verbatim without supplying any \"special\" characters. The only time you'd need to do anything special would be if your substring contained a +, ., *, [, ], or \\, in which case these characters would need to be enclosed in quotes and preceded by a backslash. Here are a few more examples of simple substring regular expressions:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):185 +msgid "/tmp (scans for the literal string /tmp)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):186 +msgid "\"\\[box\\]\" (scans for the literal string [box])" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):187 +msgid "\"\\*funny\\*\" (scans for the literal string *funny*)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):188 +msgid "\"ld\\.so\" (scans for the literal string ld.so)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):194 +msgid "Metacharacters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):197 +msgid "With regular expressions, you can perform much more complex searches than the examples we've looked at so far by taking advantage of metacharacters. One of these metacharacters is the . (a period), which matches any single character:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):203 +msgid "The period metacharacter" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):203 +#, no-wrap +msgid "\n$ <i>grep dev.hda /etc/fstab</i>\n/dev/hda3 / reiserfs noatime,ro 1 1\n/dev/hda1 /boot reiserfs noauto,noatime,notail 1 2\n/dev/hda2 swap swap sw 0 0\n#/dev/hda4 /mnt/extra reiserfs noatime,rw 1 1\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):211 +msgid "In this example, the literal text dev.hda didn't appear on any of the lines in /etc/fstab. However, grep wasn't scanning them for the literal dev.hda string, but for the dev.hda pattern. Remember that the . will match any single character. As you can see, the . metacharacter is functionally equivalent to how the ? metacharacter works in \"glob\" expansions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):222 +msgid "Using []" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):225 +msgid "If we wanted to match a character a bit more specifically than ., we could use [ and ] (square brackets) to specify a subset of characters that should be matched:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):231 +msgid "Brackets in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):231 +#, no-wrap +msgid "\n$ <i>grep dev.hda[12] /etc/fstab</i>\n/dev/hda1 /boot reiserfs noauto,noatime,notail 1 2\n/dev/hda2 swap swap sw 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):237 +msgid "As you can see, this particular syntactical feature works identically to the [] in \"glob\" filename expansions. Again, this is one of the tricky things about learning regular expressions -- the syntax is similar but not identical to \"glob\" filename expansion syntax, which often makes regexes a bit confusing to learn." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):248 +msgid "Using [^]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):251 +msgid "You can reverse the meaning of the square brackets by putting a ^ immediately after the [. In this case, the brackets will match any character that is <e>not</e> listed inside the brackets. Again, note that we use [^] with regular expressions, but [!] with globs:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):258 +msgid "Brackets with negation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):258 +#, no-wrap +msgid "\n$ <i>grep dev.hda[^12] /etc/fstab</i>\n/dev/hda3 / reiserfs noatime,ro 1 1\n#/dev/hda4 /mnt/extra reiserfs noatime,rw 1 1\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):267 +msgid "Differing syntax" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):270 +msgid "It's important to note that the syntax inside square brackets is fundamentally different from that in other parts of the regular expression. For example, if you put a . inside square brackets, it allows the square brackets to match a literal ., just like the 1 and 2 in the examples above. In comparison, a literal . outside the square brackets is interpreted as a metacharacter unless prefixed by a \\. We can take advantage of this fact to print a list of all lines in <path>/etc/fstab</path> that contain the literal string dev.hda by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):281 +msgid "Printing literals using brackets" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):281 +#, no-wrap +msgid "\n$ <i>grep dev[.]hda /etc/fstab</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):285 +msgid "Alternately, we could also type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):289 +msgid "Printing literals using escaping" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):289 +#, no-wrap +msgid "\n$ <i>grep \"dev\\.hda\" /etc/fstab</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):293 +msgid "Neither regular expression is likely to match any lines in your <path>/etc/fstab</path> file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):301 +msgid "The \"*\" metacharacter" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):304 +msgid "Some metacharacters don't match anything in themselves, but instead modify the meaning of a previous character. One such metacharacter is * (asterisk), which is used to match zero or more repeated occurrences of the previous character. Note that this means that the * has a different meaning in a regex than it does with globs. Here are some examples, and play close attention to instances where these regex matches differ from globs:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):314 +msgid "ab*c matches abbbbc but not abqc (if a glob, it would match both strings -- can you figure out why?)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):318 +msgid "ab*c matches abc but not abbqbbc (again, if a glob, it would match both strings)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):322 +msgid "ab*c matches ac but not cba (if a glob, ac would not be matched, nor would cba)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):326 +msgid "b[cq]*e matches bqe and be (if a glob, it would match bqe but not be)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):329 +msgid "b[cq]*e matches bccqqe but not bccc (if a glob, it would match the first but not the second as well)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):333 +msgid "b[cq]*e matches bqqcce but not cqe (if a glob, it would match the first but not the second as well)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):337 +msgid "b[cq]*e matches bbbeee (this would not be the case with a glob)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):340 +msgid ".* will match any string. (if a glob, it would match any string starting with .)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):344 +msgid "foo.* will match any string that begins with foo (if a glob, it would match any string starting with the four literal characters foo..)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):350 +msgid "Now, for a quick brain-twisting review: the line ac matches the regex ab*c because the asterisk also allows the preceding expression (b) to appear <e>zero</e> times. Again, it's critical to note that the * regex metacharacter is interpreted in a fundamentally different way than the * glob character." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):360 +msgid "Beginning and end of line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):363 +msgid "The last metacharacters we will cover in detail here are the ^ and $ metacharacters, used to match the beginning and end of line, respectively. By using a ^ at the beginning of your regex, you can cause your pattern to be \"anchored\" to the start of the line. In the following example, we use the ^# regex to match any line beginning with the # character:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):371 +msgid "Lines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):371 +#, no-wrap +msgid "\n$ <i>grep ^# /etc/fstab</i>\n# /etc/fstab: static file system information.\n#\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):380 +msgid "Full-line regexes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):383 +msgid "^ and $ can be combined to match an entire line. For example, the following regex will match a line that starts with the # character and ends with the . character, with any number of other characters in between:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):389 +msgid "Matching an entire line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):389 +#, no-wrap +msgid "\n$ <i>grep '^#.*\\.$' /etc/fstab</i>\n# /etc/fstab: static file system information.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):394 +msgid "In the above example, we surrounded our regular expression with single quotes to prevent $ from being interpreted by the shell. Without the single quotes, the $ will disappear from our regex before grep even has a chance to take a look at it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):406 +msgid "FHS and finding files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):408 +msgid "Filesystem Hierarchy Standard" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):411 +msgid "The Filesystem Hierarchy Standard is a document that specifies the layout of directories on a Linux system. The FHS was devised to provide a common layout to simplify distribution-independent software development -- so that stuff is in generally the same place across Linux distributions. The FHS specifies the following directory tree (taken directly from the FHS specification):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):420 +msgid "/ (the root directory)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):421 +msgid "/boot (static files of the boot loader)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):422 +msgid "/dev (device files)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):423 +msgid "/etc (host-specific system configuration)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):424 +msgid "/lib (essential shared libraries and kernel modules)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):425 +msgid "/mnt (mount point for mounting a filesystem temporarily)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):426 +msgid "/opt (add-on application software packages)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):427 +msgid "/sbin (essential system binaries)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):428 +msgid "/tmp (temporary files)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):429 +msgid "/usr (secondary hierarchy)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):430 +msgid "/var (variable data)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):436 +msgid "The two independent FHS categories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):439 +msgid "The FHS bases its layout specification on the idea that there are two independent categories of files: shareable vs. unshareable, and variable vs. static. Shareable data can be shared between hosts; unshareable data is specific to a given host (such as configuration files). Variable data can be modified; static data is not modified (except at system installation and maintenance)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):448 +msgid "The following grid summarizes the four possible combinations, with examples of directories that would fall into those categories. Again, this table is straight from the FHS specification:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):454 +msgid "FHS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):454 +#, no-wrap +msgid "\n+---------+-----------------+-------------+\n| | shareable | unshareable |\n+---------+-----------------+-------------+\n|static | /usr | /etc |\n| | /opt | /boot |\n+---------+-----------------+-------------+\n|variable | /var/mail | /var/run |\n| | /var/spool/news | /var/lock |\n+---------+-----------------+-------------+\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):469 +msgid "Secondary hierarchy at /usr" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):472 +msgid "Under <path>/usr</path> you'll find a secondary hierarchy that looks a lot like the root filesystem. It isn't critical for <path>/usr</path> to exist when the machine powers up, so it can be shared on a network (shareable), or mounted from a CD-ROM (static). Most Linux setups don't make use of sharing <path>/usr</path>, but it's valuable to understand the usefulness of distinguishing between the primary hierarchy at the root directory and the secondary hierarchy at <path>/usr</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):482 +msgid "This is all we'll say about the Filesystem Hierarchy Standard. The document itself is quite readable, so you should go take a look at it. You'll understand a lot more about the Linux filesystem if you read it. Find it at <uri>http://www.pathname.com/fhs/</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):492 +msgid "Finding files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):495 +msgid "Linux systems often contain hundreds of thousands of files. Perhaps you are savvy enough to never lose track of any of them, but it's more likely that you will occasionally need help finding one. There are a few different tools on Linux for finding files. This introduction will help you choose the right tool for the job." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):506 +msgid "The PATH" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):509 +msgid "When you run a program at the command line, bash actually searches through a list of directories to find the program you requested. For example, when you type <c>ls</c>, <c>bash</c> doesn't intrinsically know that the ls program lives in <path>/usr/bin</path>. Instead, bash refers to an environment variable called PATH, which is a colon-separated list of directories. We can examine the value of PATH:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):518 +msgid "Viewing your path" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):518 +#, no-wrap +msgid "\n$ <i>echo $PATH</i>\n/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):523 +msgid "Given this value of PATH (yours may differ,) bash would first check <path>/usr/local/bin</path>, then <path>/usr/bin</path> for the <c>ls</c> program. Most likely, <c>ls</c> is kept in <path>/usr/bin</path>, so bash would stop at that point." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):533 +msgid "Modifying PATH" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):536 +msgid "You can augment your PATH by assigning to it on the command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):540 +msgid "Editing PATH" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):540 +#, no-wrap +msgid "\n$ <i>PATH=$PATH:~/bin</i>\n$ <i>echo $PATH</i>\n/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/home/agriffis/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):546 +msgid "You can also remove elements from PATH, although it isn't as easy since you can't refer to the existing $PATH. Your best bet is to simply type out the new PATH you want:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):552 +msgid "Removing entries from PATH" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):552 +#, no-wrap +msgid "\n$ <i>PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:~/bin</i>\n$ <i>echo $PATH</i>\n/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/agriffis/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):558 +msgid "To make your PATH changes available to any future processes you start from this shell, export your changes using the export command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):563 +msgid "Exporting PATH (or any variable, for that matter)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):563 +#, no-wrap +msgid "\n$ <i>export PATH</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):570 +msgid "All about \"which\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):573 +msgid "You can check to see if there's a given program in your PATH by using <c>which</c>. For example, here we find out that our Linux system has no (common) sense:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):579 +msgid "Looking for sense" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):579 +#, no-wrap +msgid "\n$ which <i>sense</i>\nwhich: no sense in (/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):584 +msgid "In this example, we successfully locate <c>ls</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):588 +msgid "Looking for ls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):588 +#, no-wrap +msgid "\n$ <i>which ls</i>\n/usr/bin/ls\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):596 +msgid "\"which -a\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):599 +msgid "Finally, you should be aware of the <c>-a</c> flag, which causes <c>which</c> to show you all of the instances of a given program in your PATH:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):604 +msgid "Finding all instances of a program in your PATH" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):604 +#, no-wrap +msgid "\n$ <i>which -a ls</i>\n/usr/bin/ls\n/bin/ls\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):613 +msgid "whereis" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):616 +msgid "If you're interested in finding more information than purely the location of a program, you might try the <c>whereis</c> program:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):621 +msgid "Using whereis" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):621 +#, no-wrap +msgid "\n$ <i>whereis ls</i>\nls: /bin/ls /usr/bin/ls /usr/share/man/man1/ls.1.gz\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):626 +msgid "Here we see that <c>ls</c> occurs in two common binary locations, <path>/bin</path> and <path>/usr/bin</path>. Additionally, we are informed that there is a manual page located in <path>/usr/share/man</path>. This is the man-page you would see if you were to type <c>man ls</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):633 +msgid "The <c>whereis</c> program also has the ability to search for sources, to specify alternate search paths, and to search for unusual entries. Refer to the whereis man-page for further information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):642 +msgid "find" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):645 +msgid "The <c>find</c> command is another handy tool for your toolbox. With find you aren't restricted to programs; you can search for any file you want, using a variety of search criteria. For example, to search for a file by the name of README, starting in <path>/usr/share/doc</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):652 +msgid "Using find" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):652 +#, no-wrap +msgid "\n$ <i>find /usr/share/doc -name README</i>\n/usr/share/doc/ion-20010523/README\n/usr/share/doc/bind-9.1.3-r6/dhcp-dynamic-dns-examples/README\n/usr/share/doc/sane-1.0.5/README\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):662 +msgid "find and wildcards" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):665 +msgid "You can use \"glob\" wildcards in the argument to -name, provided that you quote them or backslash-escape them (so they get passed to find intact rather than being expanded by bash). For example, we might want to search for README files with extensions:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):672 +msgid "Using find with wildcards" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):672 +#, no-wrap +msgid "\n$ <i>find /usr/share/doc -name README\\*</i>\n/usr/share/doc/iproute2-2.4.7/README.gz\n/usr/share/doc/iproute2-2.4.7/README.iproute2+tc.gz\n/usr/share/doc/iproute2-2.4.7/README.decnet.gz\n/usr/share/doc/iproute2-2.4.7/examples/diffserv/README.gz\n/usr/share/doc/pilot-link-0.9.6-r2/README.gz\n/usr/share/doc/gnome-pilot-conduits-0.8/README.gz\n/usr/share/doc/gimp-1.2.2/README.i18n.gz\n/usr/share/doc/gimp-1.2.2/README.win32.gz\n/usr/share/doc/gimp-1.2.2/README.gz\n/usr/share/doc/gimp-1.2.2/README.perl.gz\n[578 additional lines snipped]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):690 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):697 +msgid "Ignoring case with find" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):693 +msgid "Of course, you might want to ignore case in your search:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):697 +#, no-wrap +msgid "\n$ <i>find /usr/share/doc -name '[Rr][Ee][Aa][Dd][Mm][Ee]*'</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):701 +msgid "Or, more simply:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):705 +msgid "Another method" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):705 +#, no-wrap +msgid "\n$ <i>find /usr/share/doc -iname readme\\*</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):709 +msgid "As you can see, you can use <c>-iname</c> to do case-insensitive searching." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):716 +msgid "find and regular expressions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):719 +msgid "If you're familiar with regular expressions, you can use the <c>-regex</c> option to limit the output to filenames that match a pattern. And similar to the <c>-iname</c> option, there is a corresponding <c>-iregex</c> option that ignores case in the pattern. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):726 +msgid "Regex and find" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):726 +#, no-wrap +msgid "\n$ <i>find /etc -iregex '.*xt.*'</i>\n/etc/X11/xkb/types/extra\n/etc/X11/xkb/semantics/xtest\n/etc/X11/xkb/compat/xtest\n/etc/X11/app-defaults/XTerm\n/etc/X11/app-defaults/XTerm-color\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):735 +msgid "Note that unlike many programs, <c>find</c> requires that the regex specified matches the entire path, not just a part of it. For that reason, specifying the leading and trailing .* is necessary; purely using xt as the regex would not be sufficient." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):745 +msgid "find and types" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):748 +msgid "The <c>-type</c> option allows you to find filesystem objects of a certain type. The possible arguments to -type are <c>b</c> (block device), <c>c</c> (character device), <c>d</c> (directory), <c>p</c> (named pipe), <c>f</c> (regular file), <c>l</c> (symbolic link), and <c>s</c> (socket). For example, to search for symbolic links in <path>/usr/bin</path> that contain the string vim:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):757 +msgid "Restricting find by type" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):757 +#, no-wrap +msgid "\n$ <i>find /usr/bin -name '*vim*' -type l</i>\n/usr/bin/rvim\n/usr/bin/vimdiff\n/usr/bin/gvimdiff\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):767 +msgid "find and mtimes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):770 +msgid "The <c>-mtime</c> option allows you to select files based on their last modification time. The argument to mtime is in terms of 24-hour periods, and is most useful when entered with either a plus sign (meaning \"after\") or a minus sign (meaning \"before\"). For example, consider the following scenario:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):777 +msgid "Scenario" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):777 +#, no-wrap +msgid "\n$ <i>ls -l ?</i>\n-rw------- 1 root root 0 Jan 7 18:00 a\n-rw------- 1 root root 0 Jan 6 18:00 b\n-rw------- 1 root root 0 Jan 5 18:00 c\n-rw------- 1 root root 0 Jan 4 18:00 d\n$ <i>date</i>\nMon May 7 18:14:52 EST 2003\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):787 +msgid "You could search for files that were created in the past 24 hours:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):791 +msgid "Files created in the last 24 hours" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):791 +#, no-wrap +msgid "\n$ <i>find . -name \\? -mtime -1</i>\n./a\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):796 +msgid "Or you could search for files that were created prior to the current 24-hour period:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):801 +msgid "Files created before the last 24 hours" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):801 +#, no-wrap +msgid "\n$ <i>find . -name \\? -mtime +0</i>\n./b\n./c\n./d\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):811 +msgid "The -daystart option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):814 +msgid "If you additionally specify the <c>-daystart</c> option, then the periods of time start at the beginning of today rather than 24 hours ago. For example, here is a set of files created yesterday and the day before:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):820 +msgid "Using -daystart" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):820 +#, no-wrap +msgid "\n$ <i>find . -name \\? -daystart -mtime +0 -mtime -3</i>\n./b\n./c\n$ ls -l b c\n-rw------- 1 root root 0 May 6 18:00 b\n-rw------- 1 root root 0 May 5 18:00 c\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):832 +msgid "The -size option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):835 +msgid "The <c>-size</c> option allows you to find files based on their size. By default, the argument to <c>-size</c> is 512-byte blocks, but adding a suffix can make things easier. The available suffixes are <c>b</c> (512-byte blocks), <c>c</c> (bytes), <c>k</c> (kilobytes), and <c>w</c> (2-byte words). Additionally, you can prepend a plus sign (\"larger than\") or minus sign (\"smaller than\")." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):844 +msgid "For example, to find regular files in <path>/usr/bin</path> that are smaller than 50 bytes:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):849 +msgid "-size in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):849 +#, no-wrap +msgid "\n$ <i>find /usr/bin -type f -size -50c</i>\n/usr/bin/krdb\n/usr/bin/run-nautilus\n/usr/bin/sgmlwhich\n/usr/bin/muttbug\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):860 +msgid "Processing found files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):863 +msgid "You may be wondering what you can do with all these files that you find! Well, <c>find</c> has the ability to act on the files that it finds by using the <c>-exec</c> option. This option accepts a command line to execute as its argument, terminated with ;, and it replaces any occurrences of {} with the filename. This is best understood with an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):871 +msgid "Using -exec" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):871 +#, no-wrap +msgid "\n$ <i>find /usr/bin -type f -size -50c -exec ls -l '{}' ';'</i>\n-rwxr-xr-x 1 root root 27 Oct 28 07:13 /usr/bin/krdb\n-rwxr-xr-x 1 root root 35 Nov 28 18:26 /usr/bin/run-nautilus\n-rwxr-xr-x 1 root root 25 Oct 21 17:51 /usr/bin/sgmlwhich\n-rwxr-xr-x 1 root root 26 Sep 26 08:00 /usr/bin/muttbug\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):879 +msgid "As you can see, <c>find</c> is a very powerful command. It has grown through the years of UNIX and Linux development. There are many other useful options to find. You can learn about them in the find manual page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):888 +msgid "locate" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):891 +msgid "We have covered <c>which</c>, <c>whereis</c>, and <c>find</c>. You might have noticed that <c>find</c> can take a while to execute, since it needs to read each directory that it's searching. It turns out that the <c>locate</c> command can speed things up by relying on an external database generated by <c>updatedb</c> (which we'll cover in the next panel.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):899 +msgid "The <c>locate</c> command matches against any part of a pathname, not just the file itself. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):904 +msgid "locate in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):904 +#, no-wrap +msgid "\n$ <i>locate bin/ls</i>\n/var/ftp/bin/ls\n/bin/ls\n/sbin/lsmod\n/sbin/lspci\n/usr/bin/lsattr\n/usr/bin/lspgpot\n/usr/sbin/lsof\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):918 +msgid "Using updatedb" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):921 +msgid "Most Linux systems have a \"cron job\" to update the database periodically. If your <c>locate</c> returned an error such as the following, then you will need to run <c>updatedb</c> as root to generate the search database:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):927 +msgid "updating your locate database" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):927 +#, no-wrap +msgid "\n$ <i>locate bin/ls</i>\nlocate: /var/spool/locate/locatedb: No such file or directory\n$ <i>su -</i>\nPassword:\n# <i>updatedb</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):935 +msgid "The <c>updatedb</c> command may take a long time to run. If you have a noisy hard disk, you will hear a lot of racket as the entire filesystem is indexed. :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):945 +msgid "slocate" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):948 +msgid "On many Linux distributions, the <c>locate</c> command has been replaced by <c>slocate</c>. There is typically a symbolic link to <c>locate</c>, so that you don't need to remember which you have. <c>slocate</c> stands for \"secure locate.\" It stores permissions information in the database so that normal users can't pry into directories they would otherwise be unable to read. The usage information for <c>slocate</c> is essentially the same as for <c>locate</c>, although the output might be different depending on the user running the command." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):963 +msgid "Process Control" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):965 +msgid "Staring xeyes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):968 +msgid "To learn about process control, we first need to start a process. Make sure that you have X running and execute the following command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):973 +msgid "Starting a Process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):973 +#, no-wrap +msgid "\n$ <i>xeyes -center red</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):977 +msgid "You will notice that an xeyes window pops up, and the red eyeballs follow your mouse around the screen. You may also notice that you don't have a new prompt in your terminal." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):986 +msgid "Stopping a process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):989 +msgid "To get a prompt back, you could type Control-C (often written as Ctrl-C or ^C):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):993 +msgid "You get a new bash prompt, but the xeyes window disappeared. In fact, the entire process has been killed. Instead of killing it with Control-C, we could have just stopped it with Control-Z:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):999 +msgid "Stopping a Process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):999 +#, no-wrap +msgid "\n$ <i>xeyes -center red</i>\n<i>Control-Z</i>\n[1]+ Stopped xeyes -center red\n$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1006 +msgid "This time you get a new bash prompt, and the xeyes windows stays up. If you play with it a bit, however, you will notice that the eyeballs are frozen in place. If the xeyes window gets covered by another window and then uncovered again, you will see that it doesn't even redraw the eyes at all. The process isn't doing anything. It is, in fact, \"Stopped.\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1017 +msgid "fg and bg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1020 +msgid "To get the process \"un-stopped\" and running again, we can bring it to the foreground with the bash built-in <c>fg</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1025 +msgid "using fg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1025 +#, no-wrap +msgid "\n$ <i>fg</i>\n<comment>(test it out, then stop the process again)</comment>\n<i>Control-Z</i>\n[1]+ Stopped xeyes -center red\n$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1033 +msgid "Now continue it in the background with the bash built-in <c>bg</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1037 +msgid "using bg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1037 +#, no-wrap +msgid "\n$ <i>bg</i>\n[1]+ xeyes -center red &\n$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1043 +msgid "Great! The xeyes process is now running in the background, and we have a new, working bash prompt." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1051 +msgid "Using \"&\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1054 +msgid "If we wanted to start xeyes in the background from the beginning (instead of using Control-Z and bg), we could have just added an \"&\" (ampersand) to the end of xeyes command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1060 +msgid "Using ampersands to background processes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1060 +#, no-wrap +msgid "\n$ <i>xeyes -center blue &</i>\n[2] 16224\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1068 +msgid "Multiple background processes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1071 +msgid "Now we have both a red and a blue xeyes running in the background. We can list these jobs with the bash built-in <c>jobs</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1076 +msgid "Using jobs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1076 +#, no-wrap +msgid "\n$ <i>jobs -l</i>\n[1]- 16217 Running xeyes -center red &\n[2]+ 16224 Running xeyes -center blue &\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1082 +msgid "The numbers in the left column are the job numbers bash assigned when they were started. Job 2 has a + (plus) to indicate that it's the \"current job,\" which means that typing <c>fg</c> will bring it to the foreground. You could also foreground a specific job by specifying its number; for example, <c>fg 1</c> would make the red xeyes the foreground task. The next column is the process id or pid, included in the listing courtesy of the -l option to jobs. Finally, both jobs are currently \"Running,\" and their command lines are listed to the right." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1096 +msgid "Introducing signals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1099 +msgid "To kill, stop, or continue processes, Linux uses a special form of communication called \"signals.\" By sending a certain signal to a process, you can get it to terminate, stop, or do other things. This is what you're actually doing when you type Control-C, Control-Z, or use the <c>bg</c> or <c>fg</c> built-ins -- you're using bash to send a particular signal to the process. These signals can also be sent using the <c>kill</c> command and specifying the pid (process id) on the command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1109 +msgid "Using kill" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1109 +#, no-wrap +msgid "\n$ <i>kill -s SIGSTOP 16224</i>\n$ <i>jobs -l</i>\n[1]- 16217 Running xeyes -center red &\n[2]+ 16224 Stopped (signal) xeyes -center blue\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1116 +msgid "As you can see, kill doesn't necessarily \"kill\" a process, although it can. Using the \"-s\" option, <c>kill</c> can send any signal to a process. Linux kills, stops or continues processes when they are sent the SIGINT, SIGSTOP, or SIGCONT signals respectively. There are also other signals that you can send to a process; some of these signals may be interpreted in an application-dependent way. You can learn what signals a particular process recognizes by looking at its man-page and searching for a SIGNALS section." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1129 +msgid "SIGTERM and SIGINT" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1132 +msgid "If you want to kill a process, you have several options. By default, kill sends SIGTERM, which is not identical to SIGINT of Control-C fame, but usually has the same results:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1138 +msgid "Using kill to terminate a process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1138 +#, no-wrap +msgid "\n$ <i>kill 16217</i>\n$ <i>jobs -l</i>\n[1]- 16217 Terminated xeyes -center red\n[2]+ 16224 Stopped (signal) xeyes -center blue\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1148 +msgid "The big kill" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1151 +msgid "Processes can ignore both SIGTERM and SIGINT, either by choice or because they are stopped or somehow \"stuck.\" In these cases it may be necessary to use the big hammer, the SIGKILL signal. A process cannot ignore SIGKILL:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1157 +msgid "Using kill to obliterate a process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1157 +#, no-wrap +msgid "\n$ <i>kill 16224</i>\n$ <i>jobs -l</i>\n[2]+ 16224 Stopped (signal) xeyes -center blue\n$ <i>kill -s SIGKILL</i>\n$ <i>jobs -l</i>\n[2]+ 16224 Interrupt xeyes -center blue\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1169 +msgid "nohup" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1172 +msgid "The terminal where you start a job is called the job's controlling terminal. Some shells (not bash by default), will deliver a SIGHUP signal to backgrounded jobs when you logout, causing them to quit. To protect processes from this behavior, use the nohup when you start the process:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1179 +msgid "nohup in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1179 +#, no-wrap +msgid "\n$ <i>nohup make &</i>\n[1] 15632\n$ <i>exit</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1188 +msgid "Using ps to list processes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1191 +msgid "The <c>jobs</c> command we were using earlier only lists processes that were started from your bash session. To see all the processes on your system, use <c>ps</c> with the <c>a</c> and <c>x</c> options together:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1197 +msgid "ps with ax" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1197 +#, no-wrap +msgid "\n$ <i>ps ax</i>\n PID TTY STAT TIME COMMAND\n 1 ? S 0:04 init [3]\n 2 ? SW 0:11 [keventd]\n 3 ? SWN 0:13 [ksoftirqd_CPU0]\n 4 ? SW 2:33 [kswapd]\n 5 ? SW 0:00 [bdflush]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1207 +msgid "I've only listed the first few because it is usually a very long list. This gives you a snapshot of what the whole machine is doing, but is a lot of information to sift through. If you were to leave off the <c>ax</c>, you would see only processes that are owned by you, and that have a controlling terminal. The command <c>ps x</c> would show you all your processes, even those without a controlling terminal. If you were to use <c>ps a</c>, you would get the list of everybody's processes that are attached to a terminal." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1220 +msgid "Seeing the forest and the trees" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1223 +msgid "You can also list different information about each process. The <c>--forest</c> option makes it easy to see the process hierarchy, which will give you an indication of how the various processes on your system interrelate. When a process starts a new process, that new process is called a \"child\" process. In a <c>--forest</c> listing, parents appear on the left, and children appear as branches to the right:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1232 +msgid "Using forest" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1232 +#, no-wrap +msgid "\n$ <i>ps x --forest</i>\n PID TTY STAT TIME COMMAND\n 927 pts/1 S 0:00 bash\n 6690 pts/1 S 0:00 \\_ bash\n26909 pts/1 R 0:00 \\_ ps x --forest\n19930 pts/4 S 0:01 bash\n25740 pts/4 S 0:04 \\_ vi processes.txt\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1245 +msgid "The \"u\" and \"l\" ps options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1248 +msgid "The <c>u</c> or <c>l</c> options can also be added to any combination of <c>a</c> and <c>x</c> in order to include more information about each process:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1253 +msgid "Option au" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1253 +#, no-wrap +msgid "\n$ <i>ps au</i>\nUSER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND\nagriffis 403 0.0 0.0 2484 72 tty1 S 2001 0:00 -bash\nchouser 404 0.0 0.0 2508 92 tty2 S 2001 0:00 -bash\nroot 408 0.0 0.0 1308 248 tty6 S 2001 0:00 /sbin/agetty 3\nagriffis 434 0.0 0.0 1008 4 tty1 S 2001 0:00 /bin/sh /usr/X\nchouser 927 0.0 0.0 2540 96 pts/1 S 2001 0:00 bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1263 +msgid "Option al" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1263 +#, no-wrap +msgid "\n$ <i>ps al</i>\n F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND\n100 1001 403 1 9 0 2484 72 wait4 S tty1 0:00 -bash\n100 1000 404 1 9 0 2508 92 wait4 S tty2 0:00 -bash\n000 0 408 1 9 0 1308 248 read_c S tty6 0:00 /sbin/ag\n000 1001 434 403 9 0 1008 4 wait4 S tty1 0:00 /bin/sh\n000 1000 927 652 9 0 2540 96 wait4 S pts/1 0:00 bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1276 +msgid "Using top" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1279 +msgid "If you find yourself running ps several times in a row, trying to watch things change, what you probably want is <c>top</c>. <c>top</c> displays a continuously updated process listing, along with some useful summary information:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1286 +msgid "top" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1286 +#, no-wrap +msgid "\n$ <i>top</i>\n 10:02pm up 19 days, 6:24, 8 users, load average: 0.04, 0.05, 0.00\n75 processes: 74 sleeping, 1 running, 0 zombie, 0 stopped\nCPU states: 1.3% user, 2.5% system, 0.0% nice, 96.0% idle\nMem: 256020K av, 226580K used, 29440K free, 0K shrd, 3804K buff\nSwap: 136544K av, 80256K used, 56288K free 101760K cached\n\n PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND\n 628 root 16 0 213M 31M 2304 S 0 1.9 12.5 91:43 X\n26934 chouser 17 0 1272 1272 1076 R 0 1.1 0.4 0:00 top\n 652 chouser 11 0 12016 8840 1604 S 0 0.5 3.4 3:52 gnome-termin\n 641 chouser 9 0 2936 2808 1416 S 0 0.1 1.0 2:13 sawfish\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1304 +msgid "nice" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1307 +msgid "Each processes has a priority setting that Linux uses to determine how CPU timeslices are shared. You can set the priority of a process by starting it with the <c>nice</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1313 +msgid "nicing a process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1313 +#, no-wrap +msgid "\n$ <i>nice -n 10 oggenc /tmp/song.wav</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1317 +msgid "Since the priority setting is called <c>nice</c>, it should be easy to remember that a higher value will be nice to other processes, allowing them to get priority access to the CPU. By default, processes are started with a setting of 0, so the setting of 10 above means oggenc will readily give up the CPU to other processes. Generally, this means that oggenc will allow other processes to run at their normal speed, regardless of how CPU-hungry oggenc happens to be. You can see these niceness levels under the NI column in the ps and top listings above." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1331 +msgid "renice" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1334 +msgid "The <c>nice</c> command can only change the priority of a process when you start it. If you want to change the niceness setting of a running process, use <c>renice</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1340 +msgid "using renice" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1340 +#, no-wrap +msgid "\n$ <i>ps l 641</i>\n F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND\n000 1000 641 1 9 0 5876 2808 do_sel S ? 2:14 sawfish\n$ <i>renice 10 641</i>\n641: old priority 0, new priority 10\n$ <i>ps l 641</i>\n F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND\n000 1000 641 1 9 10 5876 2808 do_sel S ? 2:14 sawfish\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1356 +msgid "Text processing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1358 +msgid "Redirection revisited" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1361 +msgid "Earlier in this tutorial series, we saw an example of how to use the <c>></c> operator to redirect the output of a command to a file, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1366 +msgid "Use of the > operator" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1366 +#, no-wrap +msgid "\n$ <i>echo \"firstfile\" > copyme</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1370 +msgid "In addition to redirecting output to a file, we can also take advantage of a powerful shell feature called pipes. Using pipes, we can pass the output of one command to the input of another command. Consider the following example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1376 +msgid "Introducing pipes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1376 +#, no-wrap +msgid "\n$ <i>echo \"hi there\" | wc</i>\n 1 2 9\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1381 +msgid "The <c>|</c> character is used to connect the output of the command on the left to the input of the command on the right. In the example above, the <c>echo</c> command prints out the string \"hi there\" followed by a linefeed. That output would normally appear on the terminal, but the pipe redirects it into the <c>wc</c> command, which displays the number of lines, words, and characters in its input." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1393 +msgid "A pipe example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1396 +msgid "Here is another simple example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1400 +msgid "pipes in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1400 +#, no-wrap +msgid "\n$ <i>ls -s | sort -n</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1404 +msgid "In this case, <c>ls -s</c> would normally print a listing of the current directory on the terminal, preceding each file with its size. But instead we've piped the output into <c>sort -n</c>, which sorts the output numerically. This is a really useful way to find large files in your home directory!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1411 +msgid "The following examples are more complex, but they demonstrate the power that can be harnessed using pipes. We're going to throw out some commands we haven't covered yet, but don't let that slow you down. Concentrate instead on understanding how pipes work so you can employ them in your daily Linux tasks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1421 +msgid "The decompression pipeline" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1424 +msgid "Normally to decompress and untar a file, you might do the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1428 +msgid "Untarring a file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1428 +#, no-wrap +msgid "\n$ <i>bzip2 -d linux-2.4.16.tar.bz2</i>\n$ <i>tar xvf linux-2.4.16.tar</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1433 +msgid "The downside of this method is that it requires the creation of an intermediate, uncompressed file on your disk. Since <c>tar</c> has the ability to read directly from its input (instead of specifying a file), we could produce the same end-result using a pipeline:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1440 +msgid "untarring using a pipeline" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1440 +#, no-wrap +msgid "\n$ <i>bzip2 -dc linux-2.4.16.tar.bz2 | tar xvf -</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1444 +msgid "Woo hoo! Our compressed tarball has been extracted and we didn't need an intermediate file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1452 +msgid "A longer pipeline" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1455 +msgid "Here's another pipeline example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1459 +msgid "Longer pipelines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1459 +#, no-wrap +msgid "\n$ <i>cat myfile.txt | sort | uniq | wc -l</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1463 +msgid "We use <c>cat</c> to feed the contents of <path>myfile.txt</path> to the <c>sort</c> command. When the <c>sort</c> command receives the input, it sorts all input lines so that they are in alphabetical order, and then sends the output to <c>uniq</c>. <c>uniq</c> removes any duplicate lines (and requires its input to be sorted, by the way,) sending the scrubbed output to <c>wc -l</c>. We've seen the <c>wc</c> command earlier, but without command-line options. When given the <c>-l</c> option, it only prints the number of lines in its input, instead of also including words and characters. You'll see that this pipeline will print out the number of unique (non-identical) lines in a text file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1476 +msgid "Try creating a couple of test files with your favorite text editor and use this pipeline to see what results you get." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1484 +msgid "The text processing whirlwind begins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1487 +msgid "Now we embark on a whirlwind tour of the standard Linux text processing commands. Because we're covering a lot of material in this tutorial, we don't have the space to provide examples for every command. Instead, we encourage you to read each command's man page (by typing <c>man echo</c>, for example) and learn how each command and it's options work by spending some time playing with each one. As a rule, these commands print the results of any text processing to the terminal rather than modifying any specified files. After we take our whirlwind tour of the standard Linux text processing commands, we'll take a closer look at output and input redirection. So yes, there is light at the end of the tunnel :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1500 +msgid "<c>echo</c> prints its arguments to the terminal. Use the <c>-e</c> option if you want to embed backslash escape sequences; for example <c>echo -e \"foo\\nfoo\"</c> will print foo, then a newline, and then foo again. Use the <c>-n</c> option to tell echo to omit the trailing newline that is appended to the output by default." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1508 +msgid "<c>cat</c> will print the contents of the files specified as arguments to the terminal. Handy as the first command of a pipeline, for example, <c>cat foo.txt | blah</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1514 +msgid "<c>sort</c> will print the contents of the file specified on the command line in alphabetical order. Of course, <c>sort</c> also accepts piped input. Type <c>man sort</c> to familiarize yourself with its various options that control sorting behavior." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1521 +msgid "<c>uniq</c> takes an <e>already-sorted</e> file or stream of data (via a pipeline) and removes duplicate lines." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1526 +msgid "<c>wc</c> prints out the number of lines, words, and bytes in the specified file or in the input stream (from a pipeline). Type <c>man wc</c> to learn how to fine-tune what counts are displayed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1532 +msgid "<c>head</c> prints out the first ten lines of a file or stream. Use the <c>-n</c> option to specify how many lines should be displayed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1537 +msgid "<c>tail</c> prints out the last ten lines of a file or stream. Use the <c>-n</c> option to specify how many lines should be displayed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1542 +msgid "<c>tac</c> is like <c>cat</c>, but prints all lines in reverse order; in other words, the last line is printed first." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1547 +msgid "<c>expand</c> converts input tabs to spaces. Use the <c>-t</c> option to specify the tabstop." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1552 +msgid "<c>unexpand</c> converts input spaces to tabs. Use the <c>-t</c> option to specify the tabstop." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1557 +msgid "<c>cut</c> is used to extract character-delimited fields from each line of an input file or stream." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1562 +msgid "The <c>nl</c> command adds a line number to every line of input. Useful for printouts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1567 +msgid "<c>pr</c> is used to break files into multiple pages of output; typically used for printing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1572 +msgid "<c>tr</c> is a character translation tool; it's used to map certain characters in the input stream to certain other characters in the output stream." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1577 +msgid "<c>sed</c> is a powerful stream-oriented text editor. You can learn more about sed in the following IBM developerWorks articles:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):1583 +msgid "/doc/en/articles/l-sed1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):1583 +msgid "Sed by example, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):1584 +msgid "/doc/en/articles/l-sed2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):1584 +msgid "Sed by example, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):1585 +msgid "/doc/en/articles/l-sed3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):1585 +msgid "Sed by example, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1588 +msgid "If you're planning to take the LPI exam, be sure to read the first two articles of this series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1593 +msgid "<c>awk</c> is a handy line-oriented text-processing language. To learn more about awk, read the following IBM developerWorks articles:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):1599 +msgid "/doc/en/articles/l-awk1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):1599 +msgid "Awk by example, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):1600 +msgid "/doc/en/articles/l-awk2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):1600 +msgid "Awk by example, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):1601 +msgid "/doc/en/articles/l-awk3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):1601 +msgid "Awk by example, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1605 +msgid "<c>od</c> is designed to transform the input stream into a octal or hex \"dump\" format." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1610 +msgid "<c>split</c> is a command used to split a larger file into many smaller-sized, more manageable chunks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1615 +msgid "<c>fmt</c> will reformat paragraphs so that wrapping is done at the margin. These days it's less useful since this ability is built into most text editors, but it's still a good one to know." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1621 +msgid "<c>paste</c> takes two or more files as input, concatenates each sequential line from the input files, and outputs the resulting lines. It can be useful to create tables or columns of text." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1627 +msgid "<c>join</c> is similar to paste, but it uses a field (by default the first) in each input line to match up what should be combined on a single line." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1632 +msgid "<c>tee</c> prints its input both to a file and to the screen. This is useful when you want to create a log of something, but you also want to see it on the screen." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1641 +msgid "Whirlwind over! Redirection" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1644 +msgid "Similar to using <c>></c> on the bash command line, you can also use <c><</c> to redirect a file into a command. For many commands, you can simply specify the filename on the command line, however some commands only work from standard input." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1651 +msgid "Bash and other shells support the concept of a \"herefile.\" This allows you to specify the input to a command in the lines following the command invocation, terminating it with a sentinal value. This is easiest shown through an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1657 +msgid "Redirection in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1657 +#, no-wrap +msgid "\n$ <i>sort <<END</i>\napple\ncranberry\nbanana\nEND\napple\nbanana\ncranberry\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1668 +msgid "In the example above, we typed the words apple, cranberry and banana, followed by \"END\" to signify the end of the input. The <c>sort</c> program then returned our words in alphabetical order." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1677 +msgid "Using >>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1680 +msgid "You would expect <c>>></c> to be somehow analogous to <c><<</c>, but it isn't really. It simply means to append the output to a file, rather than overwrite as <c>></c> would. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1686 +msgid "Redirecting to a file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1686 +#, no-wrap +msgid "\n$ <i>echo Hi > myfile</i>\n$ <i>echo there. > myfile</i>\n$ <i>cat myfile</i>\nthere.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1693 +msgid "Oops! We lost the \"Hi\" portion! What we meant was this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1697 +msgid "Appending to a file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1697 +#, no-wrap +msgid "\n$ <i>echo Hi > myfile</i>\n$ <i>echo there. >> myfile</i>\n$ <i>cat myfile</i>\nHi\nthere.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1705 +msgid "Much better!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1714 +msgid "Kernel Modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1716 +msgid "Meet \"uname\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1719 +msgid "The <c>uname</c> command provides a variety of interesting information about your system. Here's what is displayed on my development workstation when I type <c>uname -a</c> which tells the <c>uname</c> command to print out all of its information in one swoop:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1726 +msgid "uname -a" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1726 +#, no-wrap +msgid "\n$ <i>uname -a</i>\nLinux inventor 2.4.20-gaming-r1 #1 Fri Apr 11 18:33:35 MDT 2003 i686 AMD Athlon(tm) XP 2100+ AuthenticAMD GNU/Linux\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1734 +msgid "More uname madness" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1737 +msgid "Now, let's look at the information that <c>uname</c> provides" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1741 +msgid "uname info" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1741 +#, no-wrap +msgid "\ninfo. option arg example\nkernel name -s \"Linux\"\nhostname -n \"inventor\"\nkernel release -r \"2.4.20-gaming-r1\"\nkernel version -v \"#1 Fri Apr 11 18:33:35 MDT 2003\"\nmachine -m \"i686\"\nprocessor -p \"AMD Athlon(tm) XP 2100+\"\nhardware platform -i \"AuthenticAMD\"\noperating system -o \"GNU/Linux\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1753 +msgid "Intriguing! What does your <c>uname -a</c> command print out?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1760 +msgid "The kernel release" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1763 +msgid "Here's a magic trick. First, type <c>uname -r</c> to have the uname command print out the release of the Linux kernel that's currently running." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1768 +msgid "Now, look in the <path>/lib/modules</path> directory and --presto!-- I bet you'll find a directory with that exact name! OK, not quite magic, but now may be a good time to talk about the significance of the directories in <path>/lib/modules</path> and explain what kernel modules are." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1778 +msgid "The kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1781 +msgid "The Linux kernel is the heart of what is commonly referred to as \"Linux\" -- it's the piece of code that accesses your hardware directly and provides abstractions so that regular old programs can run. Thanks to the kernel, your text editor doesn't need to worry about whether it is writing to a SCSI or IDE disk -- or even a RAM disk. It just writes to a filesystem, and the kernel takes care of the rest." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1793 +msgid "Introducing kernel modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1796 +msgid "So, what are kernel modules? Well, they're parts of the kernel that have been stored in a special format on disk. At your command, they can be loaded into the running kernel and provide additional functionality." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1802 +msgid "Because the kernel modules are loaded on demand, you can have your kernel support a lot of additional functionality that you may not ordinarily want to be enabled. But once in a blue moon, those kernel modules are likely to come in quite handy and can be loaded -- often automatically -- to support that odd filesystem or hardware device that you rarely use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1813 +msgid "Kernel modules in a nutshell" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1816 +msgid "In sum, kernel modules allow for the running kernel to enable capabilities on an on-demand basis. Without kernel modules, you'd have to compile a completely new kernel and reboot in order for it to support something new." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1825 +msgid "lsmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1828 +msgid "To see what modules are currently loaded on your system, use the <c>lsmod</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1833 +msgid "using lsmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1833 +#, no-wrap +msgid "\n# <i>lsmod</i>\nModule Size Used by Tainted: PF\nvmnet 20520 5\nvmmon 22484 11\nnvidia 1547648 10\nmousedev 3860 2\nhid 16772 0 (unused)\nusbmouse 1848 0 (unused)\ninput 3136 0 [mousedev hid usbmouse]\nusb-ohci 15976 0 (unused)\nehci-hcd 13288 0 (unused)\nemu10k1 64264 2\nac97_codec 9000 0 [emu10k1]\nsound 51508 0 [emu10k1]\nusbcore 55168 1 [hid usbmouse usb-ohci ehci-hcd]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1854 +msgid "Modules listing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1857 +msgid "As you can see, my system has quite a few modules loaded. the vmnet and vmmon modules provide necessary functionality for my <uri link=\"http://www.vmware.com/\">VMWare</uri> program, which allows me to run a virtual PC in a window on my desktop. The \"nvidia\" module comes from <uri link=\"http://www.nvidia.com/\">NVIDIA</uri> corporation and allows me to use my high-performance 3D-accelerated graphics card under Linux whilst taking advantage of its many neat features." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1867 +msgid "Then I have a bunch of modules that are used to provide support for my USB-based input devices -- namely \"mousedev,\" \"hid,\" \"usbmouse,\" \"input,\" \"usb-ohci,\" \"ehci-hcd\" and \"usbcore.\" It often makes sense to configure your kernel to provide USB support as modules. Why? Because USB devices are \"plug and play,\" and when you have your USB support in modules, then you can go out and buy a new USB device, plug it in to your system, and have the system automatically load the appropriate modules to enable that device. It's a handy way to do things." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1881 +msgid "Third-party modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1884 +msgid "Rounding out my list of modules are \"emu10k1,\" \"ac97_codec,\" and \"sound,\" which together provide support for my SoundBlaster Audigy sound card." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1889 +msgid "It should be noted that some of my kernel modules come from the kernel sources themselves. For example, all the USB-related modules are compiled from the standard Linux kernel sources. However, the nvidia, emu10k1 and VMWare-related modules come from other sources. This highlights another major benefit of kernel modules -- allowing third parties to provide much-needed kernel functionality and allowing this functionality to \"plug in\" to a running Linux kernel. No reboot necessary." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1902 +msgid "depmod and friends" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1905 +msgid "In my <path>/lib/modules/2.4.20-gaming-r1/</path> directory, I have a number of files that start with the string \"modules.\":" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1910 +msgid "other modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1910 +#, no-wrap +msgid "\n$ <i>ls /lib/modules/2.4.20-gaming-r1/modules.*</i>\n/lib/modules/2.4.20-gaming-r1/modules.dep\n/lib/modules/2.4.20-gaming-r1/modules.generic_string\n/lib/modules/2.4.20-gaming-r1/modules.ieee1394map\n/lib/modules/2.4.20-gaming-r1/modules.isapnpmap\n/lib/modules/2.4.20-gaming-r1/modules.parportmap\n/lib/modules/2.4.20-gaming-r1/modules.pcimap\n/lib/modules/2.4.20-gaming-r1/modules.pnpbiosmap\n/lib/modules/2.4.20-gaming-r1/modules.usbmap\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1922 +msgid "These files contain some lots of dependency information. For one, they record *dependency* information for modules -- some modules require other modules to be loaded first before they will run. This information is recorded in these files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1932 +msgid "How you get modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1935 +msgid "Some kernel modules are designed to work with specific hardware devices, like my \"emu10k1\" module which is for my SoundBlaster Audigy card. For these types of modules, these files also record the PCI IDs and similar identifying marks of the hardware devices that they support. This information can be used by things like the \"hotplug\" scripts (which we'll take a look at in later tutorials) to auto-detect hardware and load the appropriate module to support said hardware automatically." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1948 +msgid "Using depmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1951 +msgid "If you ever install a new module, this dependency information may become out of date. To make it fresh again, simply type <c>depmod -a</c>. The <c>depmod</c> program will then scan all the modules in your directories in <path>/lib/modules</path> and freshening the dependency information. It does this by scanning the module files in <path>/lib/modules</path> and looking at what are called \"symbols\" inside the modules." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1963 +msgid "Locating kernel modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1966 +msgid "So, what do kernel modules look like? For 2.4 kernels, they're typically any file in the <path>/lib/modules</path> tree that ends in \".o\". To see all the modules in <path>/lib/modules</path>, type the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1972 +msgid "kernel modules in /lib/modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1972 +#, no-wrap +msgid "\n# <i>find /lib/modules -name '*.o'</i>\n/lib/modules/2.4.20-gaming-r1/misc/vmmon.o\n/lib/modules/2.4.20-gaming-r1/misc/vmnet.o\n/lib/modules/2.4.20-gaming-r1/video/nvidia.o\n/lib/modules/2.4.20-gaming-r1/kernel/fs/fat/fat.o\n/lib/modules/2.4.20-gaming-r1/kernel/fs/vfat/vfat.o\n/lib/modules/2.4.20-gaming-r1/kernel/fs/minix/minix.o\n[listing \"snipped\" for brevity]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1986 +msgid "insmod vs. modprobe" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1989 +msgid "So, how does one load a module into a running kernel? One way is to use the <c>insmod</c> command and specifying the full path to the module that you wish to load:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1995 +msgid "using insmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1995 +#, no-wrap +msgid "\n# <i>insmod /lib/modules/2.4.20-gaming-r1/kernel/fs/fat/fat.o</i>\n# <i>lsmod | grep fat</i>\nfat 29272 0 (unused)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2001 +msgid "However, one normally loads modules by using the <c>modprobe</c> command. One of the nice things about the <c>modprobe</c> command is that it automatically takes care of loading any dependent modules. Also, one doesn't need to specify the path to the module you wish to load, nor does one specify the trailing \".o\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):2012 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):2019 +msgid "rmmod and modprobe in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2015 +msgid "Let's unload our \"fat.o\" module and load it using <c>modprobe</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):2019 +#, no-wrap +msgid "\n# <i>rmmod fat</i>\n# <i>lsmod | grep fat</i>\n# <i>modprobe fat</i>\n# <i>lsmod | grep fat</i>\nfat 29272 0 (unused)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2027 +msgid "As you can see, the <c>rmmod</c> command works similarly to modprobe, but has the opposite effect -- it unloads the module you specify." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):2035 +msgid "Your friend modinfo and modules.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2038 +msgid "You can use the <c>modinfo</c> command to learn interesting things about your favorite modules:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):2043 +msgid "Using modinfo" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):2043 +#, no-wrap +msgid "\n# <i>modinfo fat</i>\nfilename: /lib/modules/2.4.20-gaming-r1/kernel/fs/fat/fat.o\ndescription: <none>\nauthor: <none>\nlicense: \"GPL\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2051 +msgid "And make special note of the <path>/etc/modules.conf</path> file. This file contains configuration information for <c>modprobe</c>. It allows you to tweak the functionality of <c>modprobe</c> by telling it to load modules before/after loading others, run scripts before/after modules load, and more." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):2061 +msgid "modules.conf gotchas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2064 +msgid "The syntax and functionality of <path>modules.conf</path> is quite complicated, and we won't go into its syntax now (type <c>man modules.conf</c> for all the gory details), but here are some things that you *should* know about this file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2070 +msgid "For one, many distributions generate this file automatically from a bunch of files in another directory, like <path>/etc/modules.d/</path>. For example, Gentoo Linux has an <path>/etc/modules.d/</path> directory, and running the <c>update-modules</c> command will take every file in <path>/etc/modules.d/</path> and concatenate them to produce a new <path>/etc/modules.conf</path>. Therefore, make your changes to the files in <path>/etc/modules.d/</path> and run update-modules if you are using Gentoo. If you are using Debian, the procedure is similar except that the directory is called <path>/etc/modutils/</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):2087 +msgid "Summary and Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):2089 +msgid "Summary" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2092 +msgid "Congratulations; you've reached the end of this tutorial on basic Linux administration! We hope that it has helped you to firm up your foundational Linux knowledge. Please join us in our next tutorial covering intermediate administration, where we will build on the foundation laid here, covering topics like the Linux permissions and ownership model, user account management, filesystem creation and mounting, and more. And remember, by continuing in this tutorial series, you'll soon be ready to attain your LPIC Level 1 Certification from the Linux Professional Institute." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):2106 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2109 +msgid "Speaking of LPIC certification, if this is something you're interested in, then we recommend that you study the following resources, which have been carefully selected to augment the material covered in this tutorial:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2115 +msgid "There are a number of good regular expression resources on the 'net. Here are a couple that we've found:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):2122 +msgid "http://www.zvon.org/other/reReference/Output/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):2122 +msgid "Regular Expressions Reference" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):2125 +msgid "http://zez.org/article/articleview/11/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):2125 +msgid "Regular Expressions Explained" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2129 +msgid "Be sure to read up on the Filesystem Hierarchy Standard at <uri>http://www.pathname.com/fhs/</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2134 +msgid "In the <uri link=\"/doc/en/articles/bash-by-example-p1.xml\">Bash by example article series</uri>, I show you how to use bash programming constructs to write your own bash scripts. This series (particularly parts one and two) will be good preparation for the LPIC Level 1 exam:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2141 +msgid "You can learn more about <c>sed</c> in the <uri link=\"http://www-106.ibm.com/developerworks/linux/library/l-sed1.html?dwzone=linux\">relevent IBM developerWorks articles</uri>. If you're planning to take the LPI exam, be sure to read the first two articles of this series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2148 +msgid "To learn more about <c>awk</c>, read the <uri link=\"http://www-106.ibm.com/developerworks/linux/library/l-awk1.html?dwzone=linux\">relevent IBM developerWorks articles</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2154 +msgid "We highly recommend the <uri link=\"http://www-106.ibm.com/developerworks/linux/library/l-faq/index.html\">Technical FAQ for Linux users</uri>, a 50-page in-depth list of frequently-asked Linux questions, along with detailed answers. The FAQ itself is in PDF (Acrobat) format. If you're a beginning or intermediate Linux user, you really owe it to yourself to check this FAQ out." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2163 +msgid "If you're not too familiar with the <c>vi</c> editor, I strongly recommend that you check out my <uri link=\"http://www-106.ibm.com/developerworks/edu/l-dw-linuxvi-i.html\">Vi -- the cheat sheet method</uri> tutorial. This tutorial will give you a gentle yet fast-paced introduction to this powerful text editor. Consider this must-read material if you don't know how to use <c>vi</c>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/lpi-101-advanced-p4.xml.pot b/article/gettext/lpi-101-advanced-p4.xml.pot new file mode 100644 index 0000000..6e805a7 --- /dev/null +++ b/article/gettext/lpi-101-advanced-p4.xml.pot @@ -0,0 +1,2327 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(guide:link):5 +msgid "/doc/en/articles/lpi-101-advanced-p4.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):6 +msgid "LPI certification 101 (release 2) exam prep, Part 4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(author:title):8 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(author:title):11 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(author:title):14 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(mail:link):12 +msgid "chouser@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(mail):12 +msgid "Chris Houser" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(mail:link):15 +msgid "agriffis@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(mail):15 +msgid "Aron Griffis" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(abstract):18 +msgid "In this tutorial, we'll introduce all popular filesystem on Linux. We'll teach you how to mount and unmount devices. In next chapter you'll know how to boot the system and how to work with runlevels. In next section of this tutorial, we'll introduce filesystem quotas, we will teach you how to set them and how to configure them. By the end of this tutorial you'll know a system logs." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(version):31 +msgid "1.0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(date):32 +msgid "2005-12-17" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):35 +msgid "Before you start" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):37 +msgid "About this tutorial" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):40 +msgid "Welcome to \"Advanced administration,\" the last of four tutorials designed to prepare you for the Linux Professional Institute's 101 (release 2) exam. In this tutorial (Part 4), we'll bolster your knowledge of advanced Linux administration skills by covering a variety of topics including Linux filesystems, the Linux boot process, runlevels, filesystem quotas, and system logs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):49 +msgid "This tutorial is particularly appropriate for someone who may be serving as the primary sysadmin for the first time, since we cover a lot of low-level issues that all system administrators should know. If you are new to Linux, we recommend that you start with <uri link=\"/doc/en/articles/lpi-101-fundamentals-p1.xml\">Part 1</uri> and work through the series from there. For some, much of this material will be new, but more experienced Linux users may find this tutorial to be a great way of \"rounding out\" their foundational Linux system administration skills and preparing for the next LPI certification level." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):61 +msgid "By the end of this series of tutorials (eight in all covering the LPI 101 and 102 exams), you will have the knowledge you need to become a Linux Systems Administrator and will be ready to attain an LPIC Level 1 certification from the Linux Professional Institute if you so choose." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):68 +msgid "For those who have taken the <uri link=\"http://www-106.ibm.com/developerworks/edu/l-dw-linuxlpi4-i.html\">release 1 version</uri> of this tutorial for reasons other than LPI exam preparation, you probably don't need to take this one. However, if you do plan to take the exams, you should strongly consider reading this revised tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):76 +msgid "The LPI logo is a trademark of Linux Professional Institute." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):83 +msgid "About the authors" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):86 +msgid "For technical questions about the content of this tutorial, contact the authors:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):92 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2930 +msgid "Daniel Robbins, at <mail>drobbins@gentoo.org</mail>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):93 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2931 +msgid "Chris Houser, at <mail>chouser@gentoo.org</mail>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):94 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2932 +msgid "Aron Griffis, at <mail>agriffis@gentoo.org</mail>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):97 +msgid "Daniel Robbins lives in Albuquerque, New Mexico, and is the Chief Architect of <uri link=\"http://www.gentoo.org\">Gentoo Technologies, Inc.</uri>, the creator of Gentoo Linux, an advanced Linux for the PC, and the Portage system, a next-generation ports system for Linux. He has also served as a contributing author for the Macmillan books Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade, when he was first exposed to the Logo programming language as well as a potentially dangerous dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife, Mary, and their daughter, Hadassah." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):111 +msgid "Chris Houser, known to his friends as \"Chouser,\" has been a UNIX proponent since 1994 when joined the administration team for the computer science network at Taylor University in Indiana, where he earned his Bachelor's degree in Computer Science and Mathematics. Since then, he has gone on to work in Web application programming, user interface design, professional video software support, and now Tru64 UNIX device driver programming at <uri link=\"http://www.compaq.com/\">Compaq</uri>. He has also contributed to various free software projects, most recently to <uri link=\"http://www.gentoo.org\">Gentoo Linux</uri>. He lives with his wife and two cats in New Hampshire." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):124 +msgid "Aron Griffis graduated from Taylor University with a degree in Computer Science and an award that proclaimed him the \"Future Founder of a Utopian UNIX Commune\". Working towards that goal, Aron is employed by <uri link=\"http://www.compaq.com/\">Compaq</uri> writing network drivers for Tru64 UNIX, and spending his spare time plunking out tunes on the piano or developing <uri link=\"http://www.gentoo.org\">Gentoo Linux</uri>. He lives with his wife Amy (also a UNIX engineer) in Nashua, NH." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):139 +msgid "Filesystems, partitions, and block devices" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):141 +msgid "Introduction to block devices" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):144 +msgid "In this section, we'll take a good look at disk-oriented aspects of Linux, including Linux filesystems, partitions, and block devices. Once you're familar with the ins and outs of disks and filesystems, we'll guide you through the process of setting up partitions and filesystems on Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):151 +msgid "To begin, I'll introduce \"block devices\". The most famous block device is probably the one that represents the first IDE drive in a Linux system:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):156 +msgid "First IDE drive in Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):156 +#, no-wrap +msgid "\n/dev/hda\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):160 +msgid "If your system uses SCSI drives, then your first hard drive will be:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):164 +msgid "First SCSI drive in Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):164 +#, no-wrap +msgid "\n/dev/sda\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):171 +msgid "Layers of abstraction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):174 +msgid "The block devices above represent an abstract interface to the disk. User programs can use these block devices to interact with your disk without worrying about whether your drivers are IDE, SCSI, or something else. The program can simply address the storage on the disk as a bunch of contiguous, randomly-accessible 512-byte blocks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):185 +msgid "Partitions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):188 +msgid "Under Linux, we create filesystems by using a special command called <c>mkfs</c> (or <c>mke2fs</c>, <c>mkreiserfs</c>, etc.), specifying a particular block device as a command-line argument." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):194 +msgid "However, although it is theoretically possible to use a \"whole disk\" block device (one that represents the entire disk) like <path>/dev/hda</path> or <path>/dev/sda</path> to house a single filesystem, this is almost never done in practice. Instead, full disk block devices are split up into smaller, more manageable block devices called partititons. Partitions are created using a tool called <c>fdisk</c>, which is used to create and edit the partition table that's stored on each disk. The partition table defines exactly how to split up the full disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):208 +msgid "Introducing fdisk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):211 +msgid "We can take a look at a disk's partition table by running <c>fdisk</c>, specifying a block device that represents a full disk as an argument." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(note):216 +msgid "Alternate interfaces to the disk's partition table include <c>cfdisk</c>, <c>parted</c>, and <c>partimage</c>. I recommend that you avoid using <c>cfdisk</c> (despite what the fdisk manual page may say) because it sometimes calculates disk geometry incorrectly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):223 +msgid "Using fdisk on IDE drive" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):223 +#, no-wrap +msgid "\n# <i>fdisk /dev/hda</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):227 +msgid "Using fidks on SCSI drive" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):227 +#, no-wrap +msgid "\n# <i>fdisk /dev/sda</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(impo):231 +msgid "You should <e>not</e> save or make any changes to a disk's partition table if any of its partitions contain filesystems that are in use or contain important data. Doing so will generally cause data on the disk to be lost." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):240 +msgid "Inside fdisk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):243 +msgid "Once in <c>fdisk</c>, you'll be greeted with a prompt that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):247 +msgid "fidsk greeting prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):247 +#, no-wrap +msgid "\nCommand (m for help):\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):251 +msgid "Type <c>p</c> to display your disk's current partition configuration:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):255 +msgid "Displaying current parition configuration" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):255 +#, no-wrap +msgid "\nCommand (m for help): p\n\nDisk /dev/hda: 240 heads, 63 sectors, 2184 cylinders\nUnits = cylinders of 15120 * 512 bytes\n\n Device Boot Start End Blocks Id System\n/dev/hda1 1 14 105808+ 83 Linux\n/dev/hda2 15 49 264600 82 Linux swap\n/dev/hda3 50 70 158760 83 Linux\n/dev/hda4 71 2184 15981840 5 Extended\n/dev/hda5 71 209 1050808+ 83 Linux\n/dev/hda6 210 348 1050808+ 83 Linux\n/dev/hda7 349 626 2101648+ 83 Linux\n/dev/hda8 627 904 2101648+ 83 Linux\n/dev/hda9 905 2184 9676768+ 83 Linux\n\nCommand (m for help):\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):275 +msgid "This particular disk is configured to house seven Linux filesystems (each with a corresponding partition listed as \"Linux\") as well as a swap partition (listed as \"Linux swap\")." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):284 +msgid "Block device and partitioning overview" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):287 +msgid "Notice the name of the corresponding partition block devices on the left side, starting with <path>/dev/hda1</path> and going up to <path>/dev/hda9</path>. In the early days of the PC, partitioning software only allowed a maximum of four partitions (called primary partitions). This was too limiting, so a workaround called extended partitioning was created. An extended partition is very similar to a primary partition, and counts towards the primary partition limit of four. However, extended partitions can hold any number of so-called logical partitions inside them, providing an effective means of working around the four partition limit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):302 +msgid "Partitioning overview, continued" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):305 +msgid "All partitions hda5 and higher are logical partitions. The numbers 1 through 4 are reserved for primary or extended partitions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):310 +msgid "In our example, hda1 through hda3 are primary partitions. hda4 is an extended partition that contains logical partitions hda5 through hda9. You would never actually use <path>/dev/hda4</path> for storing any filesystems directly -- it simply acts as a container for partitions hda5 through hda9." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):320 +msgid "Partition types" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):323 +msgid "Also, notice that each partition has an \"Id,\" also called a partition type. Whenever you create a new partition, you should ensure that the partition type is set correctly. 83 is the correct partition type for partitions that will be housing Linux filesystems, and 82 is the correct partition type for Linux swap partitions. You set the partition type using the t option in <c>fdisk</c>. The Linux kernel uses the partition type setting to auto-detect fileystems and swap devices on the disk at boot-time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):336 +msgid "Using fdisk to set up partitions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):339 +msgid "Now that you've had your introduction to the way disk partitioning is done under Linux, it's time to walk through the process of setting up disk partitions and filesystems for a new Linux installation. In this process, we will configure a disk with new partitions and then create filesystems on them. These steps will provide us with a completely clean disk with no data on it that can then be used as a basis for a new Linux installation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(impo):348 +msgid "To follow these steps, you need to have a hard drive that does not contain any important data, since these steps will <e>erase</e> the data on your disk. If this is all new to you, you may want to consider just reading the steps, or using a Linux boot disk on a test system so that no data will be at risk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):358 +msgid "What the partitioned disk will look like" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):361 +msgid "After we walk through the process of creating partitions on your disk, your partition configuration will look like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):366 +msgid "Look of our disk after creating partitions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):366 +#, no-wrap +msgid "\nDisk /dev/hda: 30.0 GB, 30005821440 bytes\n240 heads, 63 sectors/track, 3876 cylinders\nUnits = cylinders of 15120 * 512 = 7741440 bytes\n\n Device Boot Start End Blocks Id System\n/dev/hda1 * 1 14 105808+ 83 Linux\n/dev/hda2 15 81 506520 82 Linux swap\n/dev/hda3 82 3876 28690200 83 Linux\n\nCommand (m for help):\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):382 +msgid "Sample partition commentary" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):385 +msgid "In our suggested \"newbie\" partition configuration, we have three partitions. The first one (<path>/dev/hda1</path>) at the beginning of the disk is a small partition called a boot partition. The boot partition's purpose is to hold all the critical data related to booting -- GRUB boot loader information (if you will be using GRUB) as well as your Linux kernel(s). The boot partition gives us a safe place to store everything related to booting Linux. During normal day-to-day Linux use, your boot partition should remain unmounted for safety. If you are setting up a SCSI system, your boot partition will likely end up being <path>/dev/sda1</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):397 +msgid "It's recommended to have boot partitions (containing everything necessary for the boot loader to work) at the beginning of the disk. While not necessarily required anymore, it is a useful tradition from the days when the LILO boot loader wasn't able to load kernels from filesystems that extended beyond disk cylinder 1024." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):405 +msgid "The second partition (<path>/dev/hda2</path>) s used for swap space. The kernel uses swap space as virtual memory when RAM becomes low. This partition, relatively speaking, isn't very big either, typically somewhere around 512 MB. If you're setting up a SCSI system, this partition will likely end up being called <path>/dev/hda2</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):413 +msgid "The third partition (<path>/dev/hda3</path>) is quite large and takes up the rest of the disk. This partition is called our root partition and will be used to store your main filesystem that houses the main Linux filesystem. On a SCSI system, this partition would likely end up being <path>/dev/hda3</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):423 +msgid "Getting started" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):426 +msgid "Okay, now to create the partitions as in the example and table above. First, enter fdisk by typing <c>fdisk /dev/hda</c> or <c>fdisk /dev/sda</c>, depending on whether you're using IDE or SCSI. Then, type <c>p</c> to view your current partition configuration. Is there anything on the disk that you need to keep? If so, stop now. If you continue with these directions, all existing data on your disk will be erased." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(impo):435 +msgid "Following the instructions below will cause all prior data on your disk to be erased! If there is anything on your drive, please be sure that it is non-critical information that you don't mind losing. Also make sure that you have selected the correct drive so that you don't mistakenly wipe data from the wrong drive." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):446 +msgid "Zapping existing partitions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):449 +msgid "Now, it's time to delete any existing partitions. To do this, type d and hit enter. You will then be prompted for the partition number you would like to delete. To delete a pre-existing <path>/dev/hda1</path>, you would type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):455 +msgid "Deleting pre-existing partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):455 +#, no-wrap +msgid "\nCommand (m for help): <i>d</i>\nPartition number (1-4): <i>1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):460 +msgid "The partition has been scheduled for deletion. It will no longer show up if you type <c>p</c>, but it will not be erased until your changes have been saved. If you made a mistake and want to abort without saving your changes, type <c>q</c> immediately and hit enter and your partition will not be deleted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):467 +msgid "Now, assuming that you do indeed want to wipe out all the partitions on your system, repeatedly type <c>p</c> to print out a partition listing and then type <c>d</c> and the number of the partition to delete it. Eventually, you'll end up with a partition table with nothing in it:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):474 +msgid "Drives look after cleaning it" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):474 +#, no-wrap +msgid "\n\nDisk /dev/hda: 30.0 GB, 30005821440 bytes\n240 heads, 63 sectors/track, 3876 cylinders\nUnits = cylinders of 15120 * 512 = 7741440 bytes\n\nDevice Boot Start End Blocks Id System\n\nCommand (m for help):\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):488 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):500 +msgid "Creating a boot partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):491 +msgid "Now that the in-memory partition table is empty, we're ready to create a boot partition. To do this, type <c>n</c> to create a new partition, then <c>p</c> to tell fdisk you want a primary partition. Then type <c>1</c> to create the first primary partition. When prompted for the first cylinder, hit enter. When prompted for the last cylinder, type <c>+100M</c> to create a partition 100MB in size. Here's the output from these steps:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):500 +#, no-wrap +msgid "\nCommand (m for help): <i>n</i>\nCommand action\ne extended\np primary partition (1-4)\n<i>p</i>\nPartition number (1-4): <i>1</i>\nFirst cylinder (1-3876, default 1):\nUsing default value 1\nLast cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): <i>+100M</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):512 +msgid "Now, when you type <c>p</c>, you should see the following partition printout:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):516 +msgid "Partition printout" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):516 +#, no-wrap +msgid "\nCommand (m for help): <i>p</i>\n\nDisk /dev/hda: 30.0 GB, 30005821440 bytes\n240 heads, 63 sectors/track, 3876 cylinders\nUnits = cylinders of 15120 * 512 = 7741440 bytes\n\n Device Boot Start End Blocks Id System\n/dev/hda1 1 14 105808+ 83 Linux\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):530 +msgid "Creating the swap partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):533 +msgid "Next, let's create the swap partition. To do this, type <c>n</c> to create a new partition, then <c>p</c> to tell fdisk that you want a primary partition. Then type <c>2</c> to create the second primary partition, <path>/dev/hda2</path> in our case. When prompted for the first cylinder, hit enter. When prompted for the last cylinder, type <c>+512M</c> to create a partition 512MB in size. After you've done this, type <c>t</c> to set the partition type, and then type <c>82</c> to set the partition type to \"Linux Swap.\" After completing these steps, typing <c>p</c> should display a partition table that looks similar to this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):545 +msgid "Partition table" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):545 +#, no-wrap +msgid "\nCommand (m for help): <i>p</i>\n\nDisk /dev/hda: 30.0 GB, 30005821440 bytes\n240 heads, 63 sectors/track, 3876 cylinders\nUnits = cylinders of 15120 * 512 = 7741440 bytes\n\n Device Boot Start End Blocks Id System\n/dev/hda1 1 14 105808+ 83 Linux\n/dev/hda2 15 81 506520 82 Linux swap\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):560 +msgid "Making it bootable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):563 +msgid "Finally, we need to set the \"bootable\" flag on our boot partition and then write our changes to disk. To tag <path>/dev/hda1</path> as a \"bootable\" partition, type <c>a</c> at the menu and then type 1 for the partition number. If you type <c>p</c> now, you'll now see that <path>/dev/hda1</path> has an \"*\" in the \"Boot\" column. Now, let's write our changes to disk. To do this, type <c>w</c> and hit enter. Your disk partitions are now properly configured for the installation of Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(note):573 +msgid "If fdisk instructs you to do so, please reboot to allow your system to detect the new partition configuration." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):581 +msgid "Extended and logical partitioning" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):584 +msgid "In the above example, we created a single primary partition that will contain a filesystem used to store all our data. This means that after installing Linux, this main filesystem will get mounted at \"<path>/</path>\" and will contain a tree of directories that contain all our files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):591 +msgid "While this is a common way to set up a Linux system, there is another approach that you should be familiar with. This approach uses multiple partitions that house multiple filesystems and are then \"linked\" together to form a cohesive filesystem tree. For example, it is common to put <path>/home</path> and <path>/var</path> on their own filesystems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):599 +msgid "We could have made hda2 into an extended rather than a primary partition. Then, we could have created the hda5, hda6, and hda7 logical partitions (which would technically be contained \"inside\" hda2), which would house the <path>/</path>, <path>/home</path>, and <path>/var</path> filesystems respectively." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):606 +msgid "You can learn more about these types of multi-filesystem configurations by studying the resources listed on the next page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):614 +msgid "Partitioning resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):617 +msgid "For more information on partitioning, take a look at the following partitioning tips:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):624 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2793 +msgid "/doc/en/articles/partition-planning-tips.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):624 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2793 +msgid "Partition planning tips" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):628 +msgid "/doc/en/articles/partitioning-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):628 +msgid "Partitioning in action: consolidating data" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):631 +msgid "<uri link=\"/doc/en/articles/partitioning-p1.xml\">Partitioning in action: moving /home</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):640 +msgid "Creating filesystems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):643 +msgid "Now that the partitions have been created, it's time to set up filesystems on the boot and root partitions so that they can be mounted and used to store data. We will also configure the swap partition to serve as swap storage." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):649 +msgid "Linux supports a variety of different types of filesystems; each type has its strengths and weaknesses and its own set of performance characteristics. We will cover the creation of ext2, ext3, XFS, JFS, and ReiserFS filesystems in this tutorial. Before we create filesystems on our example system, let's briefly review the various filesystems available under Linux. We'll go into more detail on the filesystems later in the tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):661 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1250 +msgid "The ext2 filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):664 +msgid "ext2 is the tried-and-true Linux filesystem, but it doesn't have metadata journaling, which means that routine ext2 filesystem checks at startup time can be quite time-consuming. There is now quite a selection of newer-generation journaled filesystems that can be checked for consistency very quickly and are thus generally preferred over their non-journaled counterparts. Journaled filesystems prevent long delays when you boot your system and your filesystem happens to be in an inconsistent state." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):677 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1275 +msgid "The ext3 filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):680 +msgid "ext3 is the journaled version of the ext2 filesystem, providing metadata journaling for fast recovery in addition to other enhanced journaling modes, such as full data and ordered data journaling. ext3 is a very good and reliable filesystem. It offers generally decent performance under most conditions. Because it does not extensively employ the use of \"trees\" in its internal design, it doesn't scale very well, meaning that it is not an ideal choice for very large filesystems or situations where you will be handling very large files or large quantities of files in a single directory. But when used within its design parameters, ext3 is an excellent filesystem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):692 +msgid "One of the nice things about ext3 is that an existing ext2 filesystem can be upgraded \"in-place\" to ext3 quite easily. This allows for a seamless upgrade path for existing Linux systems that are already using ext2." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):701 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1344 +msgid "The ReiserFS filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):704 +msgid "ReiserFS is a B-tree-based filesystem that has very good overall performance and greatly outperforms both ext2 and ext3 when dealing with small files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is now rock-solid and highly recommended for use both as a general-purpose filesystem and for extreme cases such as the creation of large filesystems, the use of many small files, very large files, and directories containing tens of thousands of files. ReiserFS is the filesystem we recommend by default for all non-boot partitions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):719 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1382 +msgid "The XFS filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):722 +msgid "XFS is a filesystem with metadata journaling. It comes with a robust feature-set and is optimized for scalability. We only recommend using this filesystem on Linux systems with high-end SCSI and/or fibre channel storage and a uninterruptible power supply. Because XFS aggressively caches in-transit data in RAM, improperly designed programs (those that don't take proper precautions when writing files to disk (and there are quite a few of them) can lose a good deal of data if the system goes down unexpectedly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):735 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1422 +msgid "The JFS filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):738 +msgid "JFS is IBM's own high performance journaling filesystem. It has recently become production-ready, and we would like to see a longer track record before commenting either positively nor negatively on its general stability at this point." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):748 +msgid "Filesystem recommendations" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):751 +msgid "If you're looking for the most rugged journaling filesystem, use ext3. If you're looking for a good general-purpose high-performance filesystem with journaling support, use ReiserFS; both ext3 and ReiserFS are mature, refined and recommended for general use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):758 +msgid "Based on our example above, we will use the following commands to initialize all our partitions for use:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):763 +msgid "Initlizing partitions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):763 +#, no-wrap +msgid "\n# <i>mke2fs -j /dev/hda1</i>\n# <i>mkswap /dev/hda2</i>\n# <i>mkreiserfs /dev/hda3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):769 +msgid "We choose ext3 for our <path>/dev/hda1</path> boot partition because it is a robust journaling filesystem supported by all major boot loaders. We used <c>mkswap</c> for our <path>/dev/hda2</path> swap partition -- the choice is obvious here. And for our main root filesystem on <path>/dev/hda3</path> we choose ReiserFS, since it is a solid journaling filesystem offering excellent performance. Now, go ahead and initialize your partitions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):781 +msgid "Making swap" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):784 +msgid "<c>mkswap</c> is the command that used to initialize swap partitions:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):788 +msgid "Initalizing swap partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):788 +#, no-wrap +msgid "\n# <i>mkswap /dev/hda2</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):792 +msgid "Unlike regular filesystems, swap partitions aren't mounted. Instead, they are enabled using the <c>swapon</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):797 +msgid "Enabling swap partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):797 +#, no-wrap +msgid "\n# <i>swapon /dev/hdc6</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):801 +msgid "Your Linux system's startup scripts will take care of automatically enabling your swap partitions. Therefore, the <c>swapon</c> command is generally only needed when you need to immediately add some swap that you just created. To view the swap devices currently enabled, type <c>cat /proc/swaps</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):811 +msgid "Creating ext2, ext3, and ReiserFS filesystems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):814 +msgid "You can use the <c>mke2fs</c> command to create ext2 filesystems:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):818 +msgid "Creating ext2 filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):818 +#, no-wrap +msgid "\n# <i>mke2fs /dev/hda1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):822 +msgid "If you would like to use ext3, you can create ext3 filesystems using <c>mke2fs -j</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):827 +msgid "Creating ext3 filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):827 +#, no-wrap +msgid "\n# <i>mke2fs /dev/hda3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(note):831 +msgid "You can find out more about using ext3 under Linux 2.4 on <uri link=\"http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html\">this site</uri> maintained by Andrew Morton." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):837 +msgid "To create ReiserFS filesystems, use the <c>mkreiserfs</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):841 +msgid "Creating ReiserFS filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):841 +#, no-wrap +msgid "\n# <i>mkreiserfs /dev/hda3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):848 +msgid "Creating XFS and JFS filesystems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):851 +msgid "To create an XFS filesystem, use the <c>mkfs.xfs</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):855 +msgid "Creating XFS filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):855 +#, no-wrap +msgid "\n# <i>mkfs.xfs /dev/hda3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(note):859 +msgid "You may want to add a couple of additional flags to the mkfs.xfs command: <c>-d agcount=3 -l size=32m</c>. The <c>-d agcount=3</c> command will lower the number of allocation groups. XFS will insist on using at least one allocation group per 4GB of your partition, so, for example, if you have a 20GB partition you will need a minimum agcount of 5. The <c>l size=32m</c> command increases the journal size to 32MB, increasing performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):868 +msgid "To create JFS filesystems, use the <c>mkfs.jfs</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):872 +msgid "Creating JFS filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):872 +#, no-wrap +msgid "\n# <i>mkfs.jfs /dev/hda3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):879 +msgid "Mounting filesystems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):882 +msgid "Once the filesystem is created, we can mount it using the <c>mount</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):886 +msgid "Mounting filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):886 +#, no-wrap +msgid "\n# <i>mount /dev/hda3 /mnt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):890 +msgid "To mount a filesystem, specify the partition block device as a first argument and a \"mountpoint\" as a second argument. The new filesystem will be \"grafted in\" at the mountpoint. This also has the effect of \"hiding\" any files that were in the <path>/mnt</path> directory on the parent filesystem. Later, when the filesystem is unmounted, these files will reappear. After executing the mount command, any files created or copied inside <path>/mnt</path> will be stored on the new ReiserFS filesystem you mounted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):900 +msgid "Let's say we wanted to mount our boot partition inside <path>/mnt</path>. We could do this by performing the following steps:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):905 +msgid "Mounting boot partition in /mnt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):905 +#, no-wrap +msgid "\n# <i>mkdir /mnt/boot</i>\n# <i>mount /dev/hda1 /mnt/boot</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):910 +msgid "Now, our boot filesystem is available inside /mnt/boot. If we create files inside <path>/mnt/boot</path>, they will be stored on our ext3 filesystem that physically resides on <path>/dev/hda1</path>. If we create file inside <path>/mnt</path> but not <path>/mnt/boot</path>, then they will be stored on our ReiserFS filesystem that resides on <path>/dev/hda3</path>. And if we create files outside of <path>/mnt</path>, they will not be stored on either filesystem but on the filesystem of our current Linux system or boot disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):920 +msgid "To see what filesystems are mounted, type <c>mount</c> by itself. Here is the output of <c>mount</c> on one of our currently-running Linux system, which has partitions configured identically to those in the example above:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):926 +msgid "Output of mount command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):926 +#, no-wrap +msgid "\n/dev/root on / type reiserfs (rw,noatime)\nnone on /dev type devfs (rw)\nproc on /proc type proc (rw)\ntmpfs on /dev/shm type tmpfs (rw)\nusbdevfs on /proc/bus/usb type usbdevfs (rw)\n/dev/hde1 on /boot type ext3 (rw,noatime)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):935 +msgid "You can also view similar information by typing cat <path>/proc/mounts</path>. The \"root\" filesystem, <path>/dev/hda3</path> gets mounted automatically by the kernel at boot-time, and gets the symbolic name <path>/dev/hda3</path>. On our system, both <path>/dev/hda3</path> and <path>/dev/root</path> point to the same underlying block device using a symbolic link:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):943 +msgid "Symbolic links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):943 +#, no-wrap +msgid "\n# <i>ls -l /dev/root</i>\nlr-xr-xr-x 1 root root 33 Mar 26 20:39 /dev/root -> ide/host0/bus0/target0/lun0/part3\n\n# <i>ls -l /dev/hda3</i>\nlr-xr-xr-x 1 root root 33 Mar 26 20:39 /dev/hde3 -> ide/host0/bus0/target0/lun0/part3\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):954 +msgid "Even more mounting stuff" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):957 +msgid "So, what is this \"<path>/dev/ide/host0</path>....\" file? Systems like mine that use the devfs device-management filesystem for <path>/dev</path> have longer official names for the partition and disk block devices than Linux used to have in the past. For example, <path>/dev/ide/host0/bus1/target0/lun0/part7</path> is the official name for <path>/dev/hdc7</path>, and <path>/dev/hdc7</path> itself is just a symlink pointing to the official block device. You can determine if your system is using devfs by checking to see if the <path>/dev/.devfsd</path> file exists; if so, then devfs is active." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):968 +msgid "When using the mount command to mount filesystems, it attempts to auto-detect the filesystem type. Sometimes, this may not work and you will need to specify the to-be-mounted filesystem type manually using the -t option, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):974 +msgid "Mounting ext3 filesystem manually with -t option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):974 +#, no-wrap +msgid "\n# <i>mount /dev/hda1 /mnt/boot -t ext3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):978 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1165 +msgid "or" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):980 +msgid "Mouting reiserfs filesystem manually with -t option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):980 +#, no-wrap +msgid "\n# <i>mount /dev/hda3 /mnt -t reiserfs</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):987 +msgid "Mount options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):990 +msgid "It's also possible to customize various attributes of the to-be-mounted filesystem by specifying mount options. For example, you can mount a filesystem as \"read-only\" by using the \"ro\" option:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):996 +msgid "Mouting filesystem as read-only" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):996 +#, no-wrap +msgid "\n# <i>mount /dev/hdc6 /mnt -o ro</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1000 +msgid "With <path>/dev/hdc6</path> mounted read-only, no files can be modified in <path>/mnt</path> -- only read. If your filesystem is already mounted \"read/write\" and you want to switch it to read-only mode, you can use the \"remount\" option to avoid having to unmount and remount the filesystem again:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1007 +msgid "Using remount option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1007 +#, no-wrap +msgid "\n# <i>mount /mnt -o remount,ro</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1011 +msgid "Notice that we didn't need to specify the partition block device because the filesystem is already mounted and <c>mount</c> knows that <path>/mnt</path> is associated with <path>/dev/hdc6</path>. To make the filesystem writeable again, we can remount it as read-write:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1018 +msgid "Remounting filesystem as read-write" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1018 +#, no-wrap +msgid "\n# <i>mount /mnt -o remount,rw</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1022 +msgid "Note that these remount commands will not complete successfully if any process has opened any files or directories in <path>/mnt</path>. To familiarize yourself with all the mount options available under Linux, type <c>man mount</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1032 +msgid "Introducing fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1035 +msgid "So far, we've seen how partition an example disk and mount filesystems manually from a boot disk. But once we get a Linux system installed, how do we configure that Linux system to mount the right filesystems at the right time? For example, Let's say that we installed Gentoo Linux on our current example filesystem configuration. How would our system know how to to find the root filesystem on <path>/dev/hda3</path>? And if any other filesystems -- like swap -- needed to be mounted at boot time, how would it know which ones?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1045 +msgid "Well, the Linux kernel is told what root filesystem to use by the boot loader, and we'll take a look at the linux boot loaders later in this tutorial. But for everything else, your Linux system has a file called <path>/etc/fstab</path> that tells it about what filesystems are available for mounting. Let's take a look at it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1056 +msgid "A sample fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1059 +msgid "Let's take a look at a sample <path>/etc/fstab</path> file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1063 +msgid "Sample /etc/fstab file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1063 +#, no-wrap +msgid "\n <fs> <mountpoint> <type> <opts> <dump/pass>\n\n/dev/hda1 /boot ext3 noauto,noatime 1 1\n/dev/hda3 / reiserfs noatime 0 0\n/dev/hda2 none swap sw 0 0\n/dev/cdrom /mnt/cdrom iso9660 noauto,ro,user 0 0\n# /proc should always be enabled\nproc /proc proc defaults 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1074 +msgid "Above, each non-commented line in <path>/etc/fstab</path> specifies a partition block device, a mountpoint, a filesystem type, the filesystem options to use when mounting the filesystem, and two numeric fields. The first numeric field is used to tell the <c>dump</c> backup command the filesystems that should be backed up. Of course, if you are not planning to use <c>dump</c> on your system, then you can safely ignore this field. The last field is used by the <c>fsck</c> filesystem integrity checking program, and tells it the order in which your filesystems should be checked at boot. We'll touch on <c>fsck</c> again in a few panels." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1086 +msgid "Look at the <path>/dev/hda1</path> line; you'll see that <path>/dev/hda1</path> is an ext3 filesystem that should be mounted at the <path>/boot</path> mountpoint. Now, look at <path>/dev/hda1</path>'s mount options in the opts column. The noauto option tells the system to not mount <path>/dev/hda1</path> automatically at boot time; without this option, <path>/dev/hda1</path> would be automatically mounted to <path>/boot</path> at system boot time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1095 +msgid "Also note the noatime option, which turns off the recording of atime (last access time) information on the disk. This information is generally not needed, and turning off atime updates has a positive effect on filesystem performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1101 +msgid "Now, take a look at the <path>/proc</path> line and notice the defaults option. Use defaults whenever you want a filesystem to be mounted with just the standard mount options. Since <path>/etc/fstab</path> has multiple fields, we can't simply leave the option field blank." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1108 +msgid "Also notice the <path>/etc/fstab</path> line for <path>/dev/hda2</path>. This line defines <path>/dev/hda2</path> as a swap device. Since swap devices aren't mounted like filesystems, none is specified in the mountpoint field. Thanks to this <path>/etc/fstab</path> entry, our <path>/dev/hda2</path> swap device will be enabled automatically when the system starts up." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1116 +msgid "With an <path>/etc/fstab</path> entry for <path>/dev/cdrom</path> like the one above, mounting the CD-ROM drive becomes easier. Instead of typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1121 +msgid "Mounting CD-ROM without entry in fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1121 +#, no-wrap +msgid "\n# <i>mount -t iso9660 /dev/cdrom /mnt/cdrom -o ro</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1125 +msgid "We can now type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1129 +msgid "Mounting CD-ROM with entry in fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1129 +#, no-wrap +msgid "\n# <i>mount /dev/cdrom</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1133 +msgid "In fact, using <path>/etc/fstab</path> allows us to take advantage of the user option. The user mount option tells the system to allow this particular filesystem to be mounted by any user. This comes in handy for removable media devices like CD-ROM drives. Without this fstab mount option, only the root user would be able to use the CD-ROM drive." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1144 +msgid "Unmounting filesystems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1147 +msgid "Generally, all mounted filesystems are unmounted automatically by the system when it is rebooted or shut down. When a filesystem is unmounted, any cached filesystem data in memory is flushed to the disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1153 +msgid "However, it's also possible to unmount filesystems manually. Before a filesystem can be unmounted, you first need to ensure that there are no processes running that have open files on the filesystem in question. Then, use the <c>umount</c> command, specifying either the device name or mount point as an argument:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1161 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1169 +msgid "Using umount command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1161 +#, no-wrap +msgid "\n# <i>umount /mnt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1169 +#, no-wrap +msgid "\n# <i>umount /dev/hda3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1173 +msgid "Once unmounted, any files in <path>/mnt</path> that were \"covered\" by the previously-mounted filesystem will now reappear." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1181 +msgid "Introducing fsck" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1184 +msgid "If your system crashes or locks up for some reason, the system won't have an opportunity to cleanly unmount your filesystems. When this happens, the filesystems are left in an inconsistent (unpredictable) state. When the system reboots, the <c>fsck</c> program will detect that the filesystems were not cleanly unmounted and will want to perform a consistency check of filesystems listed in <path>/etc/fstab</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(impo):1193 +msgid "For a filesystem to be checked by <c>fsck</c> it must have a non-zero number in the \"pass\" field (the last field) in <path>/etc/fstab</path>. Typically, the root filesystem is set to a passno of 1, specifying that it should be checked first. All other filesystems that should be checked at startup time should have a passno of 2 or higher. For some journaling filesystems like ReiserFS, it is safe to have a passno of 0 since the journaling code (and not an external <c>fsck</c>) takes care of making the filesystem consistent again." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1203 +msgid "Sometimes, you may find that after a reboot <c>fsck</c> is unable to fully repair a partially damaged filesystem. In these instances, all you need to do is to bring your system down to single-user mode and run <c>fsck</c> manually, supplying the partition block device as an argument. As <c>fsck</c> performs its filesystem repairs, it may ask you whether to fix particular filesystem defects. In general, you should say <c>y</c> (yes) to all these questions and allow <c>fsck</c> to do its thing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1216 +msgid "Problems with fsck" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1219 +msgid "One of the problems with <c>fsck</c> scans is that they can take quite a while to complete, since the entirety of a filesystem's metadata (internal data structure) needs to be scanned in order to ensure that it's consistent. With extremely large filesystems, it is not unusual for an exhaustive fsck to take more than an hour." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1227 +msgid "In order to solve this problem, a new type of filesystem was designed, called a journaling filesystem. Journaling filesystems record an on-disk log of recent changes to the filesystem metadata. In the event of a crash, the filesystem driver inspects the log. Because the log contains an accurate account of recent changes on disk, only these parts of the filesystem metadata need to be checked for errors. Thanks to this important design difference, checking a journalled filesystem for consistency typically takes just a matter of seconds, regardless of filesystem size. For this reason, journaling filesystems are gaining popularity in the Linux community. For more information on journaling filesystems, see the <uri link=\"http://www-106.ibm.com/developerworks/library/l-fs.html\">Advanced filesystem implementor's guide, part 1: Journaling and ReiserFS</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1242 +msgid "Let's cover the major filesystems available for Linux, along with their associated commands and options." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1253 +msgid "The ext2 filesystem has been the standard Linux filesystem for many years. It has generally good performance for most applications, but it does not offer any journaling capability. This makes it unsuitable for very large filesystems, since <c>fsck</c> can take an extremely long time. In addition, ext2 has some built-in limitations due to the fact that every ext2 filesystem has a fixed number of inodes that it can hold. That being said, ext2 is generally considered to be an extremely robust and efficient non-journalled filesystem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1264 +msgid "In kernels: 2.0+" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1265 +msgid "journaling: no" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1266 +msgid "mkfs command: mke2fs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1267 +msgid "mkfs example: mke2fs /dev/hdc7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1268 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1298 +msgid "related commands: debugfs, tune2fs, chattr" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1269 +msgid "performance-related mount options: noatime." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1278 +msgid "The ext3 filesystem uses the same on-disk format as ext2, but adds journaling capabilities. In fact, of all the Linux filesystems, ext3 has the most extensive journaling support, supporting not only metadata journaling but also ordered journaling (the default) and full metadata+data journaling. These \"special\" journaling modes help to ensure data integrity, not just short fscks like other journaling implementations. For this reason, ext3 is the best filesystem to use if data integrity is an absolute first priority. However, these data integrity features do impact performance somewhat. In addition, because ext3 uses the same on-disk format as ext2, it still suffers from the same scalability limitations as its non-journalled cousin. Ext3 is a good choice if you're looking for a good general-purpose journalled filesystem that is also very robust." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1294 +msgid "In kernels: 2.4.16+" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1295 +msgid "journaling: metadata, ordered data writes, full metadata+data" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1296 +msgid "mkfs command: mke2fs -j" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1297 +msgid "mkfs example: mke2fs -j /dev/hdc7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1299 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1397 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1438 +msgid "performance-related mount options: noatime" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1303 +msgid "data=writeback (disable journaling)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1304 +msgid "data=ordered (the default, metadata journaling and data is written out to disk with metadata)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1308 +msgid "data=journal (full data journaling for data and metadata integrity. Halves write performance.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1300 +msgid "other mount options: <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1319 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2832 +msgid "http://www.zip.com.au/~akpm/linux/ext3/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1319 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2832 +msgid "Andrew Morton's ext3 page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1324 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2836 +msgid "http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1324 +msgid "Andrew Morton's excellent ext3 usage documentation (recommended)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1329 +msgid "http://www-106.ibm.com/developerworks/linux/library/l-fs7/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1329 +msgid "# Advanced filesystem implementor's guide, part 7: Introducing ext3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1334 +msgid "http://www.gentoo.org/doc/en/articles/l-afig-p8.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1334 +msgid "Advanced filesystem implementor's guide, part 8: Surprises in ext3." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1314 +msgid "ext3 resources: <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1347 +msgid "ReiserFS is a relatively new filesystem that has been designed with the goal of providing very good small file performance, very good general performance and being very scalable. In general, ReiserFS offers very good performance in most all situations. ReiserFS is preferred by many for its speed and scalability." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1355 +msgid "In kernels: 2.4.0+ (2.4.18+ strongly recommended)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1356 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1394 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1435 +msgid "journaling: metadata" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1357 +msgid "mkfs command: mkreiserfs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1358 +msgid "mkfs example: mkreiserfs /dev/hdc7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1359 +msgid "performance-related mount options: noatime, notail" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1363 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2811 +msgid "http://www.namesys.com/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1363 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2811 +msgid "The home of ReiserFS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1366 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2744 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2814 +msgid "http://www-106.ibm.com/developerworks/library/l-fs.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1366 +msgid "Advanced filesystem implementor's guide, part 1: Journaling and ReiserFS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1371 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2749 +msgid "http://www-106.ibm.com/developerworks/library/l-fs2.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1371 +msgid "Advanced filesystem implementor's guide, part 2: Using ReiserFS and Linux 2.4." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1360 +msgid "ReiserFS Resources: <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1385 +msgid "The XFS filesystem is an enterprise-class journaling filesystem being ported to Linux by SGI. XFS is a full-featured, scalable, journaled file-system that is a good match for high-end, reliable hardware (since it relies heavily on caching data in RAM.) but not a good match for low-end hardware." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1393 +msgid "In kernels: 2.5.34+ only, requires patch for 2.4 series" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1395 +msgid "mkfs command: mkfs.xfs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1396 +msgid "mkfs example: mkfs.xfs /dev/hdc7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1403 +msgid "http://oss.sgi.com/projects/xfs/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1403 +msgid "The home of XFS (sgi.com)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1407 +msgid "http://www-106.ibm.com/developerworks/library/l-fs9.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1407 +msgid "Advanced filesystem implementor's guide, part 9: Introducing XFS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1412 +msgid "http://www-106.ibm.com/developerworks/library/l-fs10.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1412 +msgid "Advanced filesystem implementor's guide, part 10: Deploying XFS." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1398 +msgid "XFS Resources: <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1425 +msgid "JFS is a high-performance journaling filesystem ported to Linux by IBM. JFS is used by IBM enterprise servers and is designed for high-performance applications. You can learn more about JFS at <uri link=\"http://www-124.ibm.com/developerworks/oss/jfs/index.html\">the JFS project Web site</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1434 +msgid "In kernels: 2.4.20+" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1436 +msgid "mkfs command: mkfs.jfs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1437 +msgid "mkfs example: mkfs.jfs /dev/hdc7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1439 +msgid "JFS Resources: <uri link=\"http://www-124.ibm.com/developerworks/oss/jfs/index.html\">the JFS project Web site (IBM).</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1449 +msgid "VFAT" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1452 +msgid "The VFAT filesystem isn't really a filesystem that you would choose for storing Linux files. Instead, it's a DOS-compatible filesystem driver that allows you to mount and exchange data with DOS and Windows FAT-based filesystems. The VFAT filesystem driver is present in the standard Linux kernel." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1464 +msgid "Booting the system" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1466 +msgid "About this section" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1469 +msgid "This section introduces the Linux boot procedure. We'll cover the concept of a boot loader, how to set kernel options at boot, and how to examine the boot log for errors." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1478 +msgid "The MBR" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1481 +msgid "The boot process is similar for all machines, regardless of which distribution is installed. Consider the following example hard disk:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1486 +msgid "Structure of a hard disk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1486 +#, no-wrap +msgid "\n+----------------+\n| MBR |\n+----------------+\n| Partition 1: |\n| Linux root (/) |\n| containing |\n| kernel and |\n| system. |\n+----------------+\n| Partition 2: |\n| Linux swap |\n+----------------+\n| Partition 3: |\n| Windows 3.0 |\n| (last booted |\n| in 1992) |\n+----------------+\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1506 +msgid "First, the computer's BIOS reads the first few sectors of your hard disk. These sectors contain a very small program, called the \"Master Boot Record,\" or \"MBR.\" The MBR has stored the location of the Linux kernel on the hard disk (partition 1 in the example above), so it loads the kernel into memory and starts it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1517 +msgid "The kernel boot process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1520 +msgid "The next thing you see (although it probably flashes by quickly) is a line similar to the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1525 +msgid "Boot process line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1525 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1707 +#, no-wrap +msgid "\nLinux version 2.4.16 (root@time.flatmonk.org) (gcc version 2.95.3 20010315 (release)) #1 Sat Jan 12 19:23:04 EST 2002\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1529 +msgid "This is the first line printed by the kernel when it starts running. The first part is the kernel version, followed by the identification of the user that built the kernel (usually root), the compiler that built it, and the timestamp when it was built." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1536 +msgid "Following that line is a whole slew of output from the kernel regarding the hardware in your system: the processor, PCI bus, disk controller, disks, serial ports, floppy drive, USB devices, network adapters, sound cards, and possibly others will each in turn report their status." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1546 +msgid "/sbin/init" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1549 +msgid "When the kernel finishes loading, it starts a program called <c>init</c>. This program remains running until the system is shut down. It is always assigned process ID 1, as you can see:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1555 +msgid "init process ID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1555 +#, no-wrap +msgid "\n$ <i>ps --pid 1</i>\nPID TTY TIME CMD\n 1 ? 00:00:04 init.system\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1561 +msgid "The <c>init</c> program boots the rest of your distribution by running a series of scripts. These scripts typically live in <path>/etc/rc.d/init.d</path> or <path>/etc/init.d</path>, and they perform services such as setting the system's hostname, checking the filesystem for errors, mounting additional filesystems, enabling networking, starting print services, etc. When the scripts complete, <c>init</c> starts a program called <c>getty</c> which displays the login prompt, and you're good to go!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1574 +msgid "Digging in: LILO" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1577 +msgid "Now that we've taken a quick tour through the booting process, let's look more closely at the first part: the MBR and loading the kernel. The maintenance of the MBR is the responsibility of the \"boot loader.\" The two most popular boot loaders for x86-based Linux are \"LILO\" (LInux LOader) and \"GRUB\" (GRand Unified Bootloader)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1585 +msgid "Of the two, LILO is the older and more common boot loader. LILO's presence on your system is reported at boot, with the short \"LILO boot:\" prompt. Note that you may need to hold down the shift key during boot to get the prompt, since often a system is configured to whiz straight through without stopping." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1592 +msgid "There's not much fanfare at the LILO prompt, but if you press the <tab> key, you'll be presented with a list of potential kernels (or other operating systems) to boot. Often there's only one in the list. You can boot one of them by typing it and pressing <enter>. Alternatively you can simply press <enter> and the first item on the list will boot by default." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1603 +msgid "Using LILO" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1606 +msgid "Occasionally you may want to pass an option to the kernel at boot time. Some of the more common options are <c>root=</c> to specify an alternative root filesystem, <c>init=</c> to specify an alternative init program (such as <c>init=/bin/sh</c> to rescue a misconfigured system), and <c>mem=</c> to specify the amount of memory in the system (for example <c>mem=512M</c> in the case that Linux only autodetects 128M). You could pass these to the kernel at the LILO boot prompt:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1616 +msgid "LILO boot prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1616 +#, no-wrap +msgid "\nLILO boot: linux root=/dev/hdb2 init=/bin/sh mem=512M\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1620 +msgid "If you need to regularly specify command-line options, you might consider adding them to <path>/etc/lilo.conf</path>. The format of that file is described in the <path>lilo.conf</path>(5) man-page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1629 +msgid "An important LILO gotcha" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1632 +msgid "Before moving on to GRUB, there is an important gotcha to LILO. Whenever you make changes to <path>/etc/lilo.conf</path>, or whenever you install a new kernel, you must run <c>lilo</c>. The <c>lilo</c> program rewrites the MBR to reflect the changes you made, including recording the absolute disk location of the kernel. The example here makes use of the -v flag for verboseness:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1640 +msgid "Using lilo command with -v flag" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1640 +#, no-wrap +msgid "\n# <i>lilo -v</i>\nLILO version 21.4-4, Copyright (C) 1992-1998 Werner Almesberger\n'lba32' extensions Copyright (C) 1999,2000 John Coffman\n\nReading boot sector from /dev/hda\nMerging with /boot/boot.b\nMapping message file /boot/message\nBoot image: /boot/vmlinuz-2.2.16-22\nAdded linux *\n/boot/boot.0300 exists - no backup copy made.\nWriting boot sector.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1657 +msgid "Digging in: GRUB" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1660 +msgid "The GRUB boot loader could be considered the next generation of boot loader, following LILO. Most visibly to users, it provides a menu interface instead of LILO's primitive prompt. For system administrators, the changes are more significant. GRUB supports more operating systems than LILO, provides some password-based security in the boot menu, and is easier to administer." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1668 +msgid "GRUB is usually installed with the <c>grub-install</c> command. Once installed, GRUB's menu is administrated by editing the file <path>/boot/grub/grub.conf</path>. Both of these tasks are beyond the scope of this document; you should read the GRUB info pages before attempting to install or administrate GRUB." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1679 +msgid "Using GRUB" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1682 +msgid "To give parameters to the kernel, you can press <c>e</c> at the boot menu. This provides you with the opportunity to edit (by again pressing <c>e</c>) either the name of the kernel to load or the parameters passed to it. When you're finished editing, press <enter> then <c>b</c> to boot with your changes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1692 +msgid "dmesg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1695 +msgid "The boot messages from the kernel and init scripts typically scroll by quickly. You might notice an error, but it's gone before you can properly read it. In that case, there are two places you can look after the system boots to see what went wrong (and hopefully get an idea how to fix it)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1702 +msgid "If the error occurred while the kernel was loading or probing hardware devices, you can retrieve a copy of the kernel's log using the <c>dmesg</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1707 +msgid "Retrieving kernel's log using dmesg command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1711 +msgid "Hey, we recognize that line! It's the first line the kernel prints when it loads. Indeed, if you pipe the output of <c>dmesg</c> into a pager, you can view all of the messages the kernel printed on boot, plus any messages the kernel has printed to the console in the meantime." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1721 +msgid "/var/log/messages" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1724 +msgid "The second place to look for information is in the <path>/var/log/messages</path> file. This file is recorded by the syslog daemon, which accepts input from libraries, daemons, and the kernel. Each line in the messages file is timestamped. This file is a good place to look for errors that occurred during the init scripts stage of booting. For example, to see the last few messages from the nameserver:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1733 +msgid "greping /var/log/messages file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1733 +#, no-wrap +msgid "\n# <i>grep named /var/log/messages | tail -3</i>\nJan 12 20:17:41 time /usr/sbin/named[350]: listening on IPv4 interface lo, 127.0.0.1#53\nJan 12 20:17:41 time /usr/sbin/named[350]: listening on IPv4 interface eth0, 10.0.0.1#53\nJan 12 20:17:41 time /usr/sbin/named[350]: running\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1743 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1935 +msgid "Additional information" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1746 +msgid "Additional information related to this section can be found here:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1751 +msgid "Tutorial: <uri link=\"http://www-106.ibm.com/developerworks/edu/l-dw-linuxgrub-i.html\">Getting to know GRUB</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1756 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2724 +msgid "http://en.tldp.org/HOWTO/LILO.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1756 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2724 +msgid "LILO Mini-HOWTO" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1757 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2725 +msgid "http://www.gnu.org/software/grub/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1757 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2725 +msgid "GRUB home" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1758 +msgid "Kernel command-line options in <path>/usr/src/linux/Documentation/kernel-parameters.txt</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1769 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1805 +msgid "Runlevels" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1771 +msgid "Single-user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1774 +msgid "Recall from the section regarding boot loaders that it's possible to pass parameters to the kernel when it boots. One of the most often used parameters is <c>s</c>, which causes the system to start in \"single-user\" mode. This mode usually mounts only the root filesystem, starts a minimal subset of the init scripts, and starts a shell rather than providing a login prompt. Additionally, networking is not configured, so there is no chance of external factors affecting your work." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1787 +msgid "Understanding single-user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1790 +msgid "So what \"work\" can be done with the system in such a state? To answer this question, we have to realize a vast difference between Linux and Windows. Windows is designed to normally be used by one person at a time, sitting at the console. It is effectively always in \"single-user\" mode. Linux, on the other hand, is used more often to serve network applications, or provide shell or X sessions to remote users on the network. These additional variables are not desirable when you want to perform maintenance operations such as restoring from backup, creating or modifying filesystems, upgrading the system from CD, etc. In these cases you should use single-user mode." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1808 +msgid "In fact, it's not actually necessary to reboot in order to reach single-user mode. The <c>init</c> program manages the current mode, or \"runlevel,\" for the system. The standard runlevels for a Linux system are defined as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1815 +msgid "0: Halt the computer" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1816 +msgid "1 or s: Single-user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1817 +msgid "2: Multi-user, no network" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1818 +msgid "3: Multi-user, text console" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1819 +msgid "4: Multi-user, graphical console" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1820 +msgid "5: same as 4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1821 +msgid "6: Reboot the computer." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1824 +msgid "These runlevels vary between distributions, so be sure to consult your distro's documentation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1832 +msgid "telinit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1835 +msgid "To change to single-user mode, use the <c>telinit</c> command, which instructs <c>init</c> to change runlevels:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1840 +msgid "Using telinit command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1840 +#, no-wrap +msgid "\n# <i>telinit 1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1844 +msgid "You can see from the table above that you can also shutdown or reboot the system in this manner. <c>telinit 0</c> will halt the computer; <c>telinit 6</c> will reboot the computer. When you issue the <c>telinit</c> command to change runlevels, a subset of the <c>init</c> scripts will run to either shut down or start up system services." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1855 +msgid "Runlevel etiquette" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1858 +msgid "However, note that this is rather rude if there are users on the system at the time (who may be quite angry with you). The <c>shutdown</c> command provides a method for changing runlevels in a way that treats users reasonably. Similarly to the <c>kill</c> command's ability to send a variety of signals to a process, <c>shutdown</c> can be used to halt, reboot, or change to single-user mode. For example, to change to single-user mode in 5 minutes:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1867 +msgid "Changing to single-user mode with 5 minutes delay" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1867 +#, no-wrap +msgid "\n# <i>shutdown 5</i>\nBroadcast message from root (pts/2) (Tue Jan 15 19:40:02 2002):\nThe system is going DOWN to maintenance mode in 5 minutes!\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1873 +msgid "If you press <control-c> at this point, you can cancel the pending switch to single-user mode. The message above would appear on all terminals on the system, so users have a reasonable amount of time to save their work and log off. (Some might argue whether or not 5 minutes is \"reasonable\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1883 +msgid "\"Now\" and halt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1886 +msgid "If you're the only person on the system, you can use \"now\" instead of an argument in minutes. For example, to reboot the system right now:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1891 +msgid "Using shutdown command with now option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1891 +#, no-wrap +msgid "\n# <i>shutdown -r now</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1895 +msgid "No chance to hit <control-c> in this case; the system is already on its way down. Finally, the -h option halts the system:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1900 +msgid "Halting the system" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1900 +#, no-wrap +msgid "\n# <i>shutdown -h 1</i>\nBroadcast message from root (pts/2) (Tue Jan 15 19:50:58 2002):\nThe system is going DOWN for system halt in 1 minute!\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1909 +msgid "The default runlevel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1912 +msgid "You've probably gathered at this point that the <c>init</c> program is quite important on a Linux system. You can configure <c>init</c> by editing the file <path>/etc/initttab</path>, which is described in the inittab(5) man-page. We'll just touch on one key line in this file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1919 +msgid "Editing init configuration file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1919 +#, no-wrap +msgid "\n# <i>grep ^id: /etc/inittab</i>\nid:3:initdefault:\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1924 +msgid "On my system, runlevel 3 is the default runlevel. It can be useful to change this value if you prefer your system to boot immediately into a graphical login (usually runlevel 4 or 5). To do so, simply edit the file and change the value on that line. But be careful! If you change it to something invalid, you'll probably have to employ the <c>init=/bin/sh</c> trick we mentioned earlier." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1938 +msgid "Additional information related to this section can be found at:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1945 +msgid "http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/ref-guide/s1-init-boot-shutdown-init.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1945 +msgid "Sysvinit docs at Red Hat" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1948 +msgid "<uri link=\"http://www.linuxdoc.org/LDP/sag/init.html\">Linux System Administrator's Guide section on init</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1959 +msgid "Filesystem quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1961 +msgid "Introducing quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1964 +msgid "Quotas are a feature of Linux that let you track disk usage by user or by group. They're useful for preventing any single user or group from using an unfair portion of a filesystem, or from filling it up altogether. Quotas can only be enabled and managed by the root user. In this section, I'll describe how to set up quotas on your Linux system and manage them effectively." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1975 +msgid "Kernel support" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1978 +msgid "Quotas are a feature of the filesystem; therefore, they require kernel support. The first thing you'll need to do is verify that you have quota support in your kernel. You can do this using grep:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1984 +msgid "Checking kernel configuration for quota support" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1984 +#, no-wrap +msgid "\n# <i>cd /usr/src/linux</i>\n# <i>grep -i quota .config</i>\nCONFIG_QUOTA=y\nCONFIG_XFS_QUOTA=y\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1991 +msgid "If this command returns something less conclusive (such as CONFIG_QUOTA is not set) then you should rebuild your kernel to include quota support. This is not a difficult process, but is outside of the scope of this section of the tutorial. If you're unfamiliar with the steps to build and install a new kernel, you might consider referencing this <uri link=\"/doc/en/articles/linux-kernel-compiling.xml\">tutorial</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2003 +msgid "Filesystem support" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2006 +msgid "Before diving into the administration of quotas, please note that quota support on Linux as of the 2.4.x kernel series is not complete. There are currently problems with quotas in the ext2 and ext3 filesystems, and ReiserFS does not appear to support quotas at all. This tutorial bases its examples on XFS, which seems to properly <uri link=\"http://oss.sgi.com/projects/xfs/faq.html#quotaswork\">support quotas</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2019 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2029 +msgid "Configuring quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2022 +msgid "To begin configuring quotas on your system, you should edit <path>/etc/fstab</path> to mount the affected filesystems with quotas enabled. For our example, we use an XFS filesystem mounted with user and group quotas enabled:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2029 +#, no-wrap +msgid "\n# <i>grep quota /etc/fstab</i>\n/usr/users /mnt/hdc1 xfs usrquota,grpquota,noauto 0 0\n# <i>mount /usr/users</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2035 +msgid "Note that the usrquota and grpquota options don't necessarily enable quotas on a filesystem. You can make sure quotas are enabled using the <c>quotaon</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2041 +msgid "Enabling quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2041 +#, no-wrap +msgid "\n# <i>quotaon /usr/users</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2045 +msgid "There is a corresponding <c>quotaoff</c> command should you desire to disable quotas in the future:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2050 +msgid "Disabling quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2050 +#, no-wrap +msgid "\n# <i>quotaoff /usr/users</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2054 +msgid "But for the moment, if you're trying some of the examples in this tutorial, be sure to have quotas enabled." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2062 +msgid "The quota command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2065 +msgid "The <c>quota</c> command displays a user's disk usage and limits for all of the filesystems currently mounted. The -v option includes in the list filesystems where quotas are enabled, but no storage is currently allocated to the user." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2071 +msgid "Using quota command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2071 +#, no-wrap +msgid "\n# <i>quota -v</i>\n\nDisk quotas for user root (uid 0): \nFilesystem blocks quota limit grace files quota limit grace\n /dev/hdc1 0 0 0 3 0 0 \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2079 +msgid "The first column, blocks, shows how much disk space the root user is currently using on each filesystem listed. The following columns, quota and limit, refer to the limits currently in place for disk space. We will explain the difference between quota and limit, and the meaning of the grace column later on. The files column shows how many files the root user owns on the particular filesystem. The following quota and limit columns refer to the limits for files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2092 +msgid "Viewing quota" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2095 +msgid "Any user can use the <c>quota</c> command to view their own quota report as shown in the previous example. However only the root user can look at the quotas for other users and groups. For example, say we have a filesystem, <path>/dev/hdc1</path> mounted on <path>/usr/users</path>, with two users: jane and john. First, let's look at jane's disk usage and limits." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2103 +msgid "Viewing quota for user" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2103 +#, no-wrap +msgid "\n# <i>quota -v jane</i>\n\nDisk quotas for user jane (uid 1003): \nFilesystem blocks quota limit grace files quota limit grace\n /dev/hdc1 4100 0 0 6 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2111 +msgid "In this example, we see that jane's quotas are set to zero, which indicates no limit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2119 +msgid "edquota" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2122 +msgid "Now let's say we want to give the user jane a quota. We do this with the <c>edquota</c> command. Before we start editing quotas, let's see how much space we have available on <path>/usr/users</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2128 +msgid "Checking available space on /usr/users" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2128 +#, no-wrap +msgid "\n# <i>df /usr/users</i>\n\nFilesystem 1k-blocks Used Available Use% Mounted on\n/dev/hdc1 610048 4276 605772 1% /usr/users\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2135 +msgid "This isn't a particularly large filesystem, only 600MB or so. It seems prudent to give jane a quota so that she can't use more than her fair share. When you run <c>edquota</c>, a temporary file is created for each user or group you specify on the command line." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2142 +msgid "The <c>edquota</c> command puts you in an editor, which enables you to add and/or modify quotas via this temporary file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2147 +msgid "Modifying quota" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2147 +#, no-wrap +msgid "\n# <i>edquota jane</i>\n\nDisk quotas for user jane (uid 1003):\nFilesystem blocks soft hard inodes soft hard\n /dev/hdc1 4100 0 0 6 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2155 +msgid "Similar to the output from the <c>quota</c> command above, the blocks and inodes columns in this temporary file refer to the disk space and number of files jane is currently using. You cannot modify the number of blocks or inodes; any attempt to do so will be summarily discarded by the system. The soft and hard columns show jane's quota, which we can see is currently unlimited (again, zero indicates no quota)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2167 +msgid "Understanding edquota" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2170 +msgid "The soft limit is the maximum amount of disk usage that jane has allocated to her on the filesystem (in other words, her quota). If jane uses more disk space than is allocated in her soft limit, she will be issued warnings about her quota violation via e-mail. The hard limit indicates the absolute limit on disk usage, which a user can't exceed. If jane tries to use more disk space than is specified in the hard limit, she will get a \"Disk quota exceeded\" error and will not be able to complete the operation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2183 +msgid "Making changes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2186 +msgid "So here we change jane's soft and hard limits and save the file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2190 +msgid "Changed soft and hard limits" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2190 +#, no-wrap +msgid "\n\nDisk quotas for user jane (uid 1003):\nFilesystem blocks soft hard inodes soft hard\n /dev/hdc1 4100 10000 11500 6 2000 2500\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2197 +msgid "Running the <c>quota</c> command, we can inspect our modifications:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2201 +msgid "Checking quota for user jane" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2201 +#, no-wrap +msgid "\n# <i>quota jane</i>\n\nDisk quotas for user jane (uid 1003): \nFilesystem blocks quota limit grace files quota limit grace\n /dev/hdc1 4100 10000 11500 6 2000 2500\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2212 +msgid "Copying quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2215 +msgid "You'll remember that we also have another user, john, on this filesystem. If we want to give john the same quota as jane, we can use the -p option to <c>edquota</c>, which uses jane's quotas as a prototype for all following users on the command line. This is an easy way to set up quotas for groups of users." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2222 +msgid "Coping quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2222 +#, no-wrap +msgid "\n# <i>edquota -p jane john</i>\n# <i>quota john</i>\n\nDisk quotas for user john (uid 1003): \nFilesystem blocks quota limit grace files quota limit grace\n /dev/hdc1 0 10000 11500 1 2000 2500 \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2234 +msgid "Group restrictions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2237 +msgid "We can also use <c>edquota</c> to restrict the allocation of disk space based on the group ownership of files. For example, to edit the quotas for the users group:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2243 +msgid "Editing quotas for the users group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2243 +#, no-wrap +msgid "\n# <i>edquota -g users</i>\nDisk quotas for group users (gid 100): Filesystem blocks soft hard inodes soft hard /dev/hdc1 4100 500000 510000 7 100000 125000\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2248 +msgid "Then to view the modified quotas for the users group:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2252 +msgid "Viewing modified quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2252 +#, no-wrap +msgid "\n# <i>quota -g users</i>\nDisk quotas for group users (gid 100): Filesystem blocks quota limit grace files quota limit grace /dev/hdc1 4100 500000 510000 7 100000 125000\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2260 +msgid "The repquota command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2263 +msgid "Looking at each users' quotas using the <c>quota</c> command can be tedious if you have many users on a filesytem. The <c>repquota</c> command summarizes the quotas for a filesystem into a nice report. For example, to see the quotas for all users and groups on <path>/usr/users</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2270 +msgid "Summarizing quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2270 +#, no-wrap +msgid "\n# <i>repquota -ug /usr/users</i>\n*** Report for user quotas on device /dev/hdc1\nBlock grace time: 7days; Inode grace time: 7days\n Block limits File limits\nUser used soft hard grace used soft hard grace\n----------------------------------------------------------------------\nroot -- 0 0 0 3 0 0 \njohn -- 0 10000 11500 1 2000 2500 \njane -- 4100 10000 11500 6 2000 2500 \n\n*** Report for group quotas on device /dev/hdc1\nBlock grace time: 7days; Inode grace time: 7days\n Block limits File limits\nGroup used soft hard grace used soft hard grace\n----------------------------------------------------------------------\nroot -- 0 0 0 3 0 0 \nusers -- 4100 500000 510000 7 100000 125000 \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2293 +msgid "Repquota options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2296 +msgid "There are a couple of other options to repquota that are worth mentioning. <c>repquota -a</c> will report on all currently mounted read-write filesystems that have quotas enabled. <c>repquota -n</c> will not resolve uids and gids to names. This can speed up the output for large lists." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2306 +msgid "Monitoring quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2309 +msgid "If you are a system administrator, you will want to have a way to monitor quotas to ensure that they are not being exceeded. An easy way to do this is to use <c>warnquota</c>. The <c>warnquota</c> command sends e-mail to users who have exceeded their soft limit. Typically <c>warnquota</c> is run as a cron-job." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2317 +msgid "When a user exceeds his or her soft limit, the grace column in the output from the <c>quota</c> command will indicate the grace period -- how long before the soft limit is enforced for that filesystem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2323 +msgid "Checking grace period" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2323 +#, no-wrap +msgid "\nDisk quotas for user jane (uid 1003): \n Filesystem blocks quota limit grace files quota limit grace\n /dev/hdc1 10800* 10000 11500 7days 7 2000 2500\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2329 +msgid "By default, the grace period for blocks and inodes is seven days." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2336 +msgid "Modifying the grace period" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2339 +msgid "You can modify the grace period for filesystems using <c>equota</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2343 +msgid "Modyfing grace period" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2343 +#, no-wrap +msgid "\n# <i>edquota -t</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2347 +msgid "This puts you in an editor of a temporary file that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2351 +msgid "Looks of a grace editor" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2351 +#, no-wrap +msgid "\nGrace period before enforcing soft limits for users:\nTime units may be: days, hours, minutes, or seconds\nFilesystem Block grace period Inode grace period\n/dev/hdc1 7days 7days\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2358 +msgid "The text in the file is nicely explanatory. Be sure to leave your users enough time to receive their warning e-mail and find some files to delete!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2366 +msgid "Checking quotas on boot" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2369 +msgid "You may also want to check quotas on boot. You can do this using a script to run the <c>quotacheck</c> command; there is an example script in the <uri link=\"http://en.tldp.org/HOWTO/Quota.html\">Quota Mini HOWTO</uri>. The <c>quotacheck</c> command also has the ability to repair damaged quota files; familiarize yourself with it by reading the quotacheck(8) man-page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2377 +msgid "Also remember what we mentioned previously regarding <c>quotaon</c> and <c>quotaoff</c>. You should incorporate <c>quotaon</c> into your boot script so that quotas are enabled. To enable quotas on all filesystems where quotas are supported, use the -a option:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2384 +msgid "Using -a option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2384 +#, no-wrap +msgid "\n# <i>quotaon -a</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2393 +msgid "System logs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2395 +msgid "Introducing syslogd" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2398 +msgid "The syslog daemon provides a mature client-server mechanism for logging messages from programs running on the system. Syslog receives a message from a daemon or program, categorizes the message by priority and type, then logs it according to administrator-configurable rules. The result is a robust and unified approach to managing logs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2409 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2421 +msgid "Reading logs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2412 +msgid "Let's jump right in and look at the contents of a syslog-recorded log file. Afterward, we can come back to syslog configuration. The FHS (see <uri link=\"/doc/en/articles/lpi-101-administration-p2.xml\">Part 2</uri> of this tutorial series) mandates that log files be placed in <path>/var/log</path>. Here we use the <c>tail</c> command to display the last 10 lines in the \"messages\" file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2421 +#, no-wrap +msgid "\n# <i>cd /var/log</i>\n# <i>tail messages</i>\nJan 12 20:17:39 bilbo init: Entering runlevel: 3\nJan 12 20:17:40 bilbo /usr/sbin/named[337]: starting BIND 9.1.3\nJan 12 20:17:40 bilbo /usr/sbin/named[337]: using 1 CPU\nJan 12 20:17:41 bilbo /usr/sbin/named[350]: loading configuration from '/etc/bind/named.conf'\nJan 12 20:17:41 bilbo /usr/sbin/named[350]: no IPv6 interfaces found\nJan 12 20:17:41 bilbo /usr/sbin/named[350]: listening on IPv4 interface lo, 127.0.0.1#53\nJan 12 20:17:41 bilbo /usr/sbin/named[350]: listening on IPv4 interface eth0, 10.0.0.1#53\nJan 12 20:17:41 bilbo /usr/sbin/named[350]: running\nJan 12 20:41:58 bilbo gnome-name-server[11288]: starting\nJan 12 20:41:58 bilbo gnome-name-server[11288]: name server starting\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2436 +msgid "You may remember from the text-processing whirlwind that the <c>tail</c> command displays the last lines in a file. In this case, we can see that the nameserver named was recently started on this system, which is named bilbo. If we were deploying IPv6, we might notice that named found no IPv6 interfaces, indicating a potential problem. Additionally, we can see that a user may have recently started GNOME, indicated by the presence of gnome-name-server." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2448 +msgid "Tailing log files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2451 +msgid "An experienced system administrator might use <c>tail -f</c> to follow the output to a log file as it occurs:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2456 +msgid "Using tail -f command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2456 +#, no-wrap +msgid "\n# <i>tail -f /var/log/messages</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2460 +msgid "For example, in the case of debugging our theoretical IPv6 problem, running the above command in one terminal while stopping and starting named would immediately display the messages from that daemon. This can be a useful technique when debugging. Some administrators even like to keep a constantly running <c>tail -f</c> messages in a terminal where they can keep an eye on system events." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2472 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2482 +msgid "Grepping logs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2475 +msgid "Another useful technique is to search a log file using the <c>grep</c> utility, described in <uri link=\"/doc/en/articles/lpi-101-administration-p2.xml\">Part 2</uri> of this tutorial series. In the above case, we might use grep to find where \"named\" behavior has changed:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2482 +#, no-wrap +msgid "\n# <i>grep named /var/log/messages</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2489 +msgid "Log overview" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2492 +msgid "The following summarizes the log files typically found in <path>/var/log</path> and maintained by syslog:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2498 +msgid "<path>messages</path>: Informational and error messages from general system programs and daemons" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2502 +msgid "<path>secure</path>: Authentication messages and errors, kept separate from <path>messages</path> for extra security" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2506 +msgid "<path>maillog</path>: Mail-related messages and errors" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2507 +msgid "<path>cron</path>: Cron-related messages and errors" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2508 +msgid "<path>spooler</path>: UUCP and news-related messages and errors." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2514 +msgid "syslog.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2517 +msgid "As a matter of fact, now would be a good time to investigate the syslog configuration file, <path>/etc/syslog.conf</path>. (Note: If you don't have <path>syslog.conf</path>, keep reading for the sake of information, but you may be using an alternative syslog daemon.) Browsing that file, we see there are entries for each of the common log files mentioned above, plus possibly some other entries. The file has the format facility.priority action, where those fields are defined as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2527 +msgid "facility: Specifies the subsystem that produced the message. The valid keywords for facility are auth, authpriv, cron, daemon, kern, lpr, mail, news, syslog, user, uucp and local0 through local7." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2533 +msgid "priority: Specifies the minimum severity of the message, meaning that messages of this priority and higher will be matched by this rule. The valid keywords for priority are debug, info, notice, warning, err, crit, alert, and emerg." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2539 +msgid "action: The action field should be either a filename, tty (such as <path>/dev/console</path>), remote machine prefixed by @ , comma-separated list of users, or to send the message to everybody logged on. The most common action is a simple filename." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2549 +msgid "Reloading and additional information" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2552 +msgid "Hopefully this overview of the configuration file helps you to get a feel for the strength of the syslog system. You should read the syslog.conf(5) man-page for more information prior to making changes. Additionally the syslogd(8) man-page supplies lots more detailed information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2559 +msgid "Note that you need to inform the syslog daemon of changes to the configuration file before they are put into effect. Sending it a SIGHUP is the right method, and you can use the <c>killall</c> command to do this easily:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2565 +msgid "Using killall command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2565 +#, no-wrap +msgid "\n# <i>killall -HUP syslogd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2572 +msgid "A security note" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2575 +msgid "You should beware that the log files written to by syslogd will be created by the program if they don't exist. Regardless of your current umask setting, the files will be created world-readable. If you're concerned about the security, you should chmod the files to be read-write by root only. Additionally, the <c>logrotate</c> program (described below) can be configured to create new log files with the appropriate permissions. The syslog daemon always preserves the current attributes of an existing log file, so you don't need to worry about it once the file is created." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2589 +msgid "logrotate" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2592 +msgid "The log files in <path>/var/log</path> will grow over time, and potentially could fill the filesystem. It is advisable to employ a program such as <c>logrotate</c> to manage the automatic archiving of the logs. The <c>logrotate</c> program usually runs as a daily cron job, and can be configured to rotate, compress, remove, or mail the log files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2600 +msgid "For example, a default configuration of logrotate might rotate the logs weekly, keeping 4 weeks worth of backlogs (by appending a sequence number to the filename), and compress the backlogs to save space. Additionally, the program can be configured to deliver a SIGHUP to syslogd so that the daemon will notice the now-empty log files and append to them appropriately." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2608 +msgid "For more information on <c>logrotate</c>, see the logrotate(8) man page, which contains a description of the program and the syntax of the configuration file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2616 +msgid "Advanced topic -- klogd" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2619 +msgid "Before moving away from syslog, I'd like to note a couple of advanced topics for ambitious readers. These tips may save you some grief when trying to understand syslog-related topics." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2625 +msgid "First, the syslog daemon is actually part of the sysklogd package, which contains a second daemon called klogd. It's klogd's job to receive information and error messages from the kernel, and pass them on to syslogd for categorization and logging. The messages received by klogd are exactly the same as those you can retrieve using the <c>dmesg</c> command. The difference is that <c>dmesg</c> prints the current contents of a ring buffer in the kernel, whereas klogd is passing the messages to syslogd so that they won't be lost when the ring wraps around." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2639 +msgid "Advanced topic -- alternate loggers" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2642 +msgid "Second, there are alternatives to the standard sysklogd package. The alternatives attempt to be more efficient, easier to configure, and possibly more featureful than sysklogd. <uri link=\"http://www.balabit.hu/en/downloads/syslog-ng/\">Syslog-ng</uri> and <uri link=\"http://metalog.sourceforge.net/\">Metalog</uri> seem to be some of the more popular alternatives; you might investigate them if you find sysklogd doesn't provide the level of power you need." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2652 +msgid "Third, you can log messages in your scripts using the logger command. See the logger(1) man page for more information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2662 +msgid "Summary and resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2664 +msgid "Summary" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2667 +msgid "Congratulations, you've reached the end of this tutorial! Well, almost. There were a couple of topics that we were unable to include in our first four tutorials due to space limitations. Fortunately, we have a couple of good resources that will help you get up to speed on these topics in no time. Be sure to cover these particular tutorials if you are planning to get your LPIC level 1 certification." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2676 +msgid "We didn't have quite enough room to cover the important topic of system backups in this tutorial. Fortunately, IBM developerWorks already has a tutorial on this subject, called <uri link=\"http://www-106.ibm.com/developerworks/edu/l-dw-linuxbu-i.html\">Backing up your Linux machines</uri>. In this tutorial, you'll learn how to back up Linux systems using a <c>tar</c> variant called star. You'll also learn how to use the <c>mt</c> command to control tape functions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2686 +msgid "The second topic that we weren't quite able to fit in was periodic scheduling. Fortunately, there's some good <uri link=\"http://www.ussg.iu.edu/usail/automation/cron.html\">cron documentation</uri> available at Indiana University. <c>cron</c> is used to schedule jobs to be executed at a specific time, and is an important tool for any system administrator." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2695 +msgid "On the next page, you'll find a number of resources that you will find helpful in learning more about the subjects presented in this tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2703 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2706 +msgid "To find out more about quota support under Linux, be sure to check out the <uri link=\"http://en.tldp.org/HOWTO/Quota.html\">Linux Quota mini-HOWTO</uri>. Also be sure to consult the quota(1), edquota(8), repquota(8), quotacheck(8), and quotaon(8) man pages on your system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2713 +msgid "Additional information to the system boot process and boot loaders can be found at:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2719 +msgid "IBM developerWorks' <uri link=\"http://www-106.ibm.com/developerworks/edu/l-dw-linuxgrub-i.html\">Getting to know GRUB</uri> tutorial" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2726 +msgid "Kernel command-line options in <path>/usr/src/linux/Documentation/kernel-parameters.txt</path>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2730 +msgid "<uri link=\"http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/ref-guide/s1-init-boot-shutdown-init.html\">Sysvinit docs at Redhat</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2737 +msgid "To learn more about Linux filesystems, read the multi-part advanced filesystem implementor's guide on the IBM developerWorks Linux zone, covering:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2744 +msgid "The benefits of journalling and ReiserFS (Part 1)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2749 +msgid "Setting up a ReiserFS system (Part 2)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2753 +msgid "http://www-106.ibm.com/developerworks/library/l-fs3.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2753 +msgid "Using the tmpfs virtual memory filesystem and bind mounts (Part 3)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2757 +msgid "http://www-106.ibm.com/developerworks/library/l-fs4.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2757 +msgid "The benefits of devfs, the device management filesystem (Part 4)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2762 +msgid "http://www-106.ibm.com/developerworks/library/l-fs5.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2762 +msgid "Beginning the conversion to devfs (Part 5)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2767 +msgid "http://www-106.ibm.com/developerworks/linux/library/l-fs6/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2767 +msgid "Completing the conversion to devfs using an init wrapper (Part 6)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2772 +msgid "/doc/en/articles/afig-ct-ext3-intro.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2772 +msgid "The benefits of the ext3 filesystem (Part 7)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2776 +msgid "/doc/en/articles/l-afig-p8.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2776 +msgid "An in-depth look at ext3 and the latest kernel updates (Part 8)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2779 +msgid "<uri link=\"http://www-106.ibm.com/developerworks/linux/library/l-fs9.html\">An introduction to XFS (Part 9)</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2786 +msgid "For more information on partitioning, take a look at the following partitioning tips on the IBM developerWorks Linux zone:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2797 +msgid "/doc/en/articles/partitioning-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2797 +msgid "Partitioning in action, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2800 +msgid "<uri link=\"/doc/en/articles/partitioning-p2.xml\">Partitioning in action, Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2806 +msgid "ReiserFS Resources:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2814 +msgid "Advanced filesystem implementor's guide, Part 1: Journalling and ReiserFS on developerWorks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2818 +msgid "<uri link=\"http://www-106.ibm.com/developerworks/library/l-fs2.html\">Advanced filesystem implementor's guide, Part 2: Using ReiserFS and Linux 2.4 on developerWorks</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2826 +msgid "ext3 resources:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2836 +msgid "Andrew Morton's excellent ext3 usage documentation (recommended)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2841 +msgid "XFS and JFS resources:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2847 +msgid "http://oss.sgi.com/projects/xfs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2847 +msgid "SGI XFS projects page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2849 +msgid "The IBM <uri link=\"http://www-124.ibm.com/developerworks/oss/jfs/index.html\">JFS project Web site</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2856 +msgid "Don't forget <uri link=\"http://en.tldp.org/\">linuxdoc.org</uri>. You'll find linuxdoc's collection of guides, HOWTOs, FAQs, and man pages to be invaluable. Be sure to check out <uri link=\"http://en.tldp.org/LDP/LG/current/\">Linux Gazette</uri> and <uri link=\"http://en.tldp.org/linuxfocus/index.html\">LinuxFocus</uri> as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2864 +msgid "The Linux System Administrators guide, available from <uri link=\"http://en.tldp.org/guides.html\">Linuxdoc.org's \"Guides\" section</uri>, is a good complement to this series of tutorials -- give it a read! You may also find Eric S. Raymond's <uri link=\"http://en.tldp.org/HOWTO/Unix-and-Internet-Fundamentals-HOWTO/\">Unix and Internet Fundamentals HOWTO</uri> to be helpful." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2873 +msgid "In the Bash by example article series on developerWorks, Daniel shows you how to use bash programming constructs to write your own bash scripts. This bash series (particularly Parts 1 and 2) will be excellent additional preparation for the LPIC Level 1 exam:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2883 +msgid "http://www.gentoo.org/doc/en/articles/bash-by-example-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2883 +msgid "Bash by example, part 1: Fundamental programming in the Bourne-again shell" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2888 +msgid "http://www.gentoo.org/doc/en/articles/bash-by-example-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2888 +msgid "Bash by example, part 2: More bash programming fundamentals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2893 +msgid "http://www.gentoo.org/doc/en/articles/bash-by-example-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2893 +msgid "Bash by example, part 3: Exploring the ebuild system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2898 +msgid "We highly recommend the <uri link=\"http://www-106.ibm.com/developerworks/linux/library/l-faq/\">Technical FAQ by Linux Users</uri> by Mark Chapman, a 50-page in-depth list of frequently-asked Linux questions, along with detailed answers. The FAQ itself is in PDF (Adobe Acrobat) format. If you're a beginning or intermediate Linux user, you really owe it to yourself to check this FAQ out. We also recommend the <uri link=\"http://www-106.ibm.com/developerworks/linux/library/l-gloss/index.html\">Linux glossary for Linux users</uri>, also from Mark." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2910 +msgid "If you're not familiar with the vi editor, we strongly recommend that you check out Daniel's <uri link=\"http://www-106.ibm.com/developerworks/edu/l-dw-linuxvi-i.html\">Vi intro -- the cheat sheet method tutorial</uri>. This tutorial will give you a gentle yet fast-paced introduction to this powerful text editor. Consider this must-read material if you don't know how to use vi." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2922 +msgid "Feedback" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2925 +msgid "Please send any tutorial feedback you may have to the authors:" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/lpi-101-fundamentals-p1.xml.pot b/article/gettext/lpi-101-fundamentals-p1.xml.pot new file mode 100644 index 0000000..66cd654 --- /dev/null +++ b/article/gettext/lpi-101-fundamentals-p1.xml.pot @@ -0,0 +1,1225 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(guide:link):5 +msgid "/doc/en/articles/lpi-101-fundamentals-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):6 +msgid "LPI certification 101 (release 2) exam prep, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="curtis119@gentoo.org">M Curtis Napier</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(abstract):15 +msgid "In this tutorial, we'll introduce you to bash (the standard Linux shell), show you how to take full advantage of standard Linux commands like ls, cp, and mv, explain inodes and hard and symbolic links, and much more. By the end of this tutorial, you'll have a solid grounding in Linux fundamentals and will even be ready to begin learning some basic Linux system administration tasks." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(version):28 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(date):29 +msgid "2005-10-12" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):32 +msgid "Before You Start" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):34 +msgid "About this tutorial" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):37 +msgid "Welcome to \"Linux fundamentals,\" the first of four tutorials designed to prepare you for the Linux Professional Institute's 101 exam. In this tutorial, we'll introduce you to bash (the standard Linux shell), show you how to take full advantage of standard Linux commands like ls, cp, and mv, explain inodes and hard and symbolic links, and much more. By the end of this tutorial, you'll have a solid grounding in Linux fundamentals and will even be ready to begin learning some basic Linux system administration tasks. By the end of this series of tutorials (eight in all), you'll have the knowledge you need to become a Linux Systems Administrator and will be ready to attain an LPIC Level 1 certification from the Linux Professional Institute if you so choose." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):50 +msgid "This particular tutorial (Part 1) is ideal for those who are new to Linux, or those who want to review or improve their understanding of fundamental Linux concepts like copying and moving files, creating symbolic and hard links, and using Linux' standard text-processing commands along with pipelines and redirection. Along the way, we'll share plenty of hints, tips, and tricks to keep the tutorial meaty and practical, even for those with a good amount of previous Linux experience. For beginners, much of this material will be new, but more experienced Linux users may find this tutorial to be a great way of rounding out their fundamental Linux skills." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):62 +msgid "For those who have taken the release 1 version of this tutorial for reasons other than LPI exam preparation, you probably don't need to take this one. However, if you do plan to take the exams, you should strongly consider reading this revised tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):72 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):75 +msgid "Residing in Albuquerque, New Mexico, Daniel Robbins is the Chief Architect of Gentoo Linux an advanced ports-based Linux meta distribution. He also writes articles, tutorials, and tips for the IBM developerWorks Linux zone and Intel Developer Services and has also served as a contributing author for several books, including Samba Unleashed and SuSE Linux Unleashed. Daniel enjoys spending time with his wife, Mary, and his daughter, Hadassah. You can contact Daniel at drobbins@gentoo.org." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):90 +msgid "Introducing bash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):92 +msgid "The shell" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):95 +msgid "If you've used a Linux system, you know that when you log in, you are greeted by a prompt that looks something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):100 +msgid "The prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):100 +#, no-wrap +msgid "\n$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):104 +msgid "The particular prompt that you see may look quite different. It may contain your systems host name, the name of the current working directory, or both. But regardless of what your prompt looks like, there's one thing that's certain. The program that printed that prompt is called a \"shell,\" and it's very likely that your particular shell is a program called <c>bash</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):115 +msgid "Are you running bash?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):118 +msgid "You can check to see if you're running <c>bash</c> by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):122 +msgid "The SHELL variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):122 +#, no-wrap +msgid "\n$ <i>echo $SHELL</i>\n/bin/bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):127 +msgid "If the above line gave you an error or didn't respond similarly to our example, then you may be running a shell other than bash. In that case, most of this tutorial should still apply, but it would be advantageous for you to switch to <c>bash</c> for the sake of preparing for the 101 exam." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):139 +msgid "About bash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):142 +msgid "Bash, an acronym for \"Bourne-again shell,\" is the default shell on most Linux systems. The shell's job is to obey your commands so that you can interact with your Linux system. When you're finished entering commands, you may instruct the shell to exit or logout, at which point you'll be returned to a login prompt." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):150 +msgid "By the way, you can also log out by pressing control-D at the bash prompt." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):157 +msgid "Using \"cd\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):160 +msgid "As you've probably found, staring at your bash prompt isn't the most exciting thing in the world. So, let's start using bash to navigate around our file system. At the prompt, type the following (without the <c>$</c>):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):166 +msgid "Changing directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):166 +#, no-wrap +msgid "\n$ <i>cd /</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):170 +msgid "We've just told bash that you want to work in /, also known as the root directory; all the directories on the system form a tree, and / is considered the top of this tree, or the root. cd sets the directory where you are currently working, also known as the \"current working directory.\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):180 +msgid "Paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):183 +msgid "To see bash's current working directory, you can type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):187 +msgid "Present Working Directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):187 +#, no-wrap +msgid "\n$ <i>pwd</i>\n/\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):192 +msgid "In the above example, the / argument to <c>cd</c> is called a <e>path</e>. It tells cd where we want to go. In particular, the / argument is an <e>absolute</e> path, meaning that it specifies a location relative to the root of the file system tree." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):202 +msgid "Absolute paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):205 +msgid "Here are some other absolute paths:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):209 +msgid "Example absolute paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):209 +#, no-wrap +msgid "\n/dev\n/usr\n/usr/bin\n/usr/local/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):216 +msgid "As you can see, the one thing that all absolute paths have in common is that they begin with /. With a path of /usr/local/bin, we're telling cd to enter the / directory, then the usr directory under that, and then local and bin. Absolute paths are always evaluated by starting at / first." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):226 +msgid "Relative paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):229 +msgid "The other kind of path is called a <e>relative path</e>. <c>Bash</c>, <c>cd</c>, and other commands always interpret these paths relative to the current directory. Relative paths never begin with a /. So, if we're in /usr:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):235 +msgid "Changing directories with absolute paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):235 +#, no-wrap +msgid "\n$ <i>cd /usr</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):239 +msgid "Then, we can use a relative path to change to the /usr/local/bin directory:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):243 +msgid "Changing directories with relative paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):243 +#, no-wrap +msgid "\n$ <i>cd local/bin</i>\n$ <i>pwd</i>\n/usr/local/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):252 +msgid "Using .." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):255 +msgid "Relative paths may also contain one or more .. directories. The .. directory is a special directory that points to the parent directory. So, continuing from the example above:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):261 +msgid "Using the 'parent directory' notation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):261 +#, no-wrap +msgid "\n$ <i>pwd</i>\n/usr/local/bin\n$ <i>cd ..</i>\n$ <i>pwd</i>\n/usr/local\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):269 +msgid "As you can see, our current directory is now /usr/local. We were able to go \"backwards\" one directory, relative to the current directory that we were in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):275 +msgid "In addition, we can also add .. to an existing relative path, allowing us to go into a directory that's alongside one we are already in, for example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):280 +msgid "Using the parent directory notation in relative paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):280 +#, no-wrap +msgid "\n$ <i>pwd</i>\n/usr/local\n$ <i>cd ../share</i>\n$ <i>pwd</i>\n/usr/share\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):291 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):300 +msgid "Relative path examples" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):294 +msgid "Relative paths can get quite complex. Here are a few examples, all without the resultant target directory displayed. Try to figure out where you'll end up after typing these commands:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):300 +#, no-wrap +msgid "\n$ <i>cd /bin</i>\n$ <i>cd ../usr/share/zoneinfo</i>\n\n\n$ <i>cd /usr/X11R6/bin</i>\n$ <i>cd ../lib/X11</i>\n\n\n$ <i>cd /usr/bin</i>\n$ <i>cd ../bin/../bin</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):313 +msgid "Now, try them out and see if you got them right :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):320 +msgid "Understanding ." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):323 +msgid "Before we finish our coverage of cd, there are a few more things I need to mention. First, there is another special directory called ., which means \"the current directory\". While this directory isn't used with the cd command, it's often used to execute some program in the current directory, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):331 +msgid "Running a program from the current location" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):331 +#, no-wrap +msgid "\n$ <i>./myprog</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):335 +msgid "In the above example, the myprog executable residing in the current working directory will be executed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):343 +msgid "cd and the home directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):346 +msgid "If we wanted to change to our home directory, we could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):350 +msgid "Go to the HOME directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):350 +#, no-wrap +msgid "\n$ <i>cd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):354 +msgid "With no arguments, cd will change to your home directory, which is /root for the superuser and typically /home/username for a regular user. But what if we want to specify a file in our home directory? Maybe we want to pass a file argument to the <c>myprog</c> command. If the file lives in our home directory, we can type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):362 +msgid "Execute a program in the current directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):362 +#, no-wrap +msgid "\n$ <i>./myprog /home/drobbins/myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):366 +msgid "However, using an absolute path like that isn't always convenient. Thankfully, we can use the ~ (tilde) character to do the same thing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):371 +msgid "Using the 'home directory' notation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):371 +#, no-wrap +msgid "\n$ <i>./myprog ~/myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):378 +msgid "Other users' home directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):381 +msgid "Bash will expand a lone ~ to point to your home directory, but you can also use it to point to other users' home directories. For example, if we wanted to refer to a file called fredsfile.txt in Fred's home directory, we could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):387 +msgid "Example use of the 'home directory' notation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):387 +#, no-wrap +msgid "\n$ <i>./myprog ~fred/fredsfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):395 +msgid "Using Linux Commands" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):397 +msgid "Introducing ls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):400 +msgid "Now, we'll take a quick look at the ls command. Very likely, you're already familiar with ls and know that typing it by itself will list the contents of the current working directory:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):406 +msgid "Listing files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):406 +#, no-wrap +msgid "\n$ <i>cd /usr</i>\n$ <i>ls</i>\nX11R6 doc i686-pc-linux-gnu lib man sbin ssl\nbin gentoo-x86 include libexec portage share tmp\ndistfiles i686-linux info local portage.old src\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):414 +msgid "By specifying the -a option, you can see all of the files in a directory, including hidden files: those that begin with .. As you can see in the following example, ls -a reveals the . and .. special directory links:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):420 +msgid "Listing files, including hidden ones" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):420 +#, no-wrap +msgid "\n$ <i>ls -a</i>\n. bin gentoo-x86 include libexec portage share tmp\n.. distfiles i686-linux info local portage.old src\nX11R6 doc i686-pc-linux-gnu lib man sbin ssl\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):430 +msgid "Long directory listings" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):433 +msgid "You can also specify one or more files or directories on the <c>ls</c> command line. If you specify a file, <c>ls</c> will show that file only. If you specify a directory, <c>ls</c> will show the <e>contents</e> of the directory. The <c>-l</c> option comes in very handy when you need to view permissions, ownership, modification time, and size information in your directory listing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):441 +msgid "In the following example, we use the <c>-l</c> option to display a full listing of my /usr directory." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):446 +msgid "Listing files with all information" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):446 +#, no-wrap +msgid "\n$ <i>ls -l /usr</i>\ndrwxr-xr-x 7 root root 168 Nov 24 14:02 X11R6\ndrwxr-xr-x 2 root root 14576 Dec 27 08:56 bin\ndrwxr-xr-x 2 root root 8856 Dec 26 12:47 distfiles\nlrwxrwxrwx 1 root root 9 Dec 22 20:57 doc -> share/doc\ndrwxr-xr-x 62 root root 1856 Dec 27 15:54 gentoo-x86\ndrwxr-xr-x 4 root root 152 Dec 12 23:10 i686-linux\ndrwxr-xr-x 4 root root 96 Nov 24 13:17 i686-pc-linux-gnu\ndrwxr-xr-x 54 root root 5992 Dec 24 22:30 include\nlrwxrwxrwx 1 root root 10 Dec 22 20:57 info -> share/info\ndrwxr-xr-x 28 root root 13552 Dec 26 00:31 lib\ndrwxr-xr-x 3 root root 72 Nov 25 00:34 libexec\ndrwxr-xr-x 8 root root 240 Dec 22 20:57 local\nlrwxrwxrwx 1 root root 9 Dec 22 20:57 man -> share/man\nlrwxrwxrwx 1 root root 11 Dec 8 07:59 portage -> gentoo-x86/\ndrwxr-xr-x 60 root root 1864 Dec 8 07:55 portage.old\ndrwxr-xr-x 3 root root 3096 Dec 22 20:57 sbin\ndrwxr-xr-x 46 root root 1144 Dec 24 15:32 share\ndrwxr-xr-x 8 root root 328 Dec 26 00:07 src\ndrwxr-xr-x 6 root root 176 Nov 24 14:25 ssl\nlrwxrwxrwx 1 root root 10 Dec 22 20:57 tmp -> ../var/tmp\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):470 +msgid "The first column displays permissions information for each item in the listing. I'll explain how to interpret this information in a bit. The next column lists the number of links to each file system object, which we'll gloss over now but return to later. The third and fourth columns list the owner and group, respectively. The fifth column lists the object size. The sixth column is the \"last modified\" time or \"mtime\" of the object. The last column is the object's name. If the file is a symbolic link, you'll see a trailing -> and the path to which the symbolic link points." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):484 +msgid "Looking at directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):487 +msgid "Sometimes, you'll want to look at a directory, rather than inside it. For these situations, you can specify the <c>-d</c> option, which will tell ls to look at any directories that it would normally look inside:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):493 +msgid "Listing directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):493 +#, no-wrap +msgid "\n$ <i>ls -dl /usr /usr/bin /usr/X11R6/bin ../share</i>\ndrwxr-xr-x 4 root root 96 Dec 18 18:17 ../share\ndrwxr-xr-x 17 root root 576 Dec 24 09:03 /usr\ndrwxr-xr-x 2 root root 3192 Dec 26 12:52 /usr/X11R6/bin\ndrwxr-xr-x 2 root root 14576 Dec 27 08:56 /usr/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):504 +msgid "Recursive and inode listings" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):507 +msgid "So you can use <c>-d</c> to look at a directory, but you can also use <c>-R</c> to do the opposite: not just look inside a directory, but recursively look inside all the files and directories inside that directory! We won't include any example output for this option (since it's generally voluminous), but you may want to try a few <c>ls -R</c> and <c>ls -Rl</c> commands to get a feel for how this works." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):516 +msgid "Finally, the <c>-i</c> ls option can be used to display the inode numbers of the file system objects in the listing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):521 +msgid "Listing inodes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):521 +#, no-wrap +msgid "\n$ <i>ls -i /usr</i>\n 1409 X11R6 314258 i686-linux 43090 libexec 13394 sbin\n 1417 bin 1513 i686-pc-linux-gnu 5120 local 13408 share\n 8316 distfiles 1517 include 776 man 23779 src\n 43 doc 1386 info 93892 portage 36737 ssl\n 70744 gentoo-x86 1585 lib 5132 portage.old 784 tmp\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):533 +msgid "Understanding inodes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):536 +msgid "Every object on a file system is assigned a unique index, called an <e>inode</e> number. This might seem trivial, but understanding inodes is essential to understanding many file system operations. For example, consider the . and .. links that appear in every directory. To fully understand what a .. directory actually is, we'll first take a look at /usr/local's inode number:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):544 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):554 +msgid "Listing inode for a directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):544 +#, no-wrap +msgid "\n$ <i>ls -id /usr/local</i>\n 5120 /usr/local\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):549 +msgid "The /usr/local directory has an inode number of 5120. Now, let's take a look at the inode number of /usr/local/bin/..:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):554 +#, no-wrap +msgid "\n$ <i>ls -id /usr/local/bin/..</i>\n 5120 /usr/local/bin/..\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):559 +msgid "As you can see, /usr/local/bin/.. has the same inode number as /usr/local! Here's how can we come to grips with this shocking revelation. In the past, we've considered /usr/local to be the directory itself. Now, we discover that inode 5120 is in fact the directory, and we have found two directory entries (called \"links\") that point to this inode. Both /usr/local and /usr/local/bin/.. are links to inode 5120. Although inode 5120 only exists in one place on disk, multiple things link to it. Inode 5120 is the actual entry on disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):569 +msgid "In fact, we can see the total number of times that inode 5120 is referenced by using the <c>ls -dl</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):574 +msgid "Listing inode reference" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):574 +#, no-wrap +msgid "\n$ <i>ls -dl /usr/local</i>\ndrwxr-xr-x 8 root root 240 Dec 22 20:57 /usr/local\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):579 +msgid "If we take a look at the second column from the left, we see that the directory /usr/local (inode 5120) is referenced eight times. On my system, here are the various paths that reference this inode:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):585 +msgid "Inode references" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):585 +#, no-wrap +msgid "\n/usr/local\n/usr/local/.\n/usr/local/bin/..\n/usr/local/games/..\n/usr/local/lib/..\n/usr/local/sbin/..\n/usr/local/share/..\n/usr/local/src/..\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):599 +msgid "mkdir" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):602 +msgid "Let's take a quick look at the mkdir command, which can be used to create new directories. The following example creates three new directories, tic, tac, and toe, all under /tmp:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):608 +msgid "Creating directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):608 +#, no-wrap +msgid "\n$ <i>cd /tmp</i>\n$ <i>mkdir tic tac toe</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):613 +msgid "By default, the mkdir command doesn't create parent directories for you; the entire path up to the next-to-last element needs to exist. So, if you want to create the directories <path>won/der/ful</path>, you'd need to issue three separate <c>mkdir</c> commands:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):620 +msgid "Creating parent directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):620 +#, no-wrap +msgid "\n$ <i>mkdir won/der/ful</i>\nmkdir: cannot create directory `won/der/ful': No such file or directory\n$ <i>mkdir won</i>\n$ <i>mkdir won/der</i>\n$ <i>mkdir won/der/ful</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):628 +msgid "However, mkdir has a handy -p option that tells mkdir to create any missing parent directories, as you can see here:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):633 +msgid "Creating parent directories in one go" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):633 +#, no-wrap +msgid "\n$ <i>mkdir -p easy/as/pie</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):637 +msgid "All in all, pretty straightforward. To learn more about the mkdir command, type <c>man mkdir</c> to read the manual page. This will work for nearly all commands covered here (for example, <c>man ls</c>), except for cd, which is built-in to bash." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):647 +msgid "touch" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):650 +msgid "Now, we're going to take a quick look at the <c>cp</c> and <c>mv</c> commands, used to copy, rename, and move files and directories. To begin this overview, we'll first use the <c>touch</c> command to create a file in /tmp:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):656 +msgid "Creating a file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):656 +#, no-wrap +msgid "\n$ <i>cd /tmp</i>\n$ <i>touch copyme</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):661 +msgid "The touch command updates the \"mtime\" of a file if it exists (recall the sixth column in <c>ls -l</c> output). If the file doesn't exist, then a new, empty file will be created. You should now have a <path>/tmp/copyme</path> file with a size of zero." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):671 +msgid "echo" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):674 +msgid "Now that the file exists, let's add some data to the file. We can do this using the echo command, which takes its arguments and prints them to standard output. First, the echo command by itself:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):680 +msgid "Creating a file using 'echo'" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):680 +#, no-wrap +msgid "\n$ <i>echo \"firstfile\"</i>\nfirstfile\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):685 +msgid "Now, the same echo command with output redirection:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):689 +msgid "Using output redirection" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):689 +#, no-wrap +msgid "\n$ <i>echo \"firstfile\" > copyme</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):693 +msgid "The greater-than sign tells the shell to write echo's output to a file called copyme. This file will be created if it doesn't exist, and will be overwritten if it does exist. By typing <c>ls -l</c>, we can see that the copyme file is 10 bytes long, since it contains the word firstfile and the newline character:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):700 +msgid "Viewing file information" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):700 +#, no-wrap +msgid "\n$ <i>ls -l copyme</i>\n-rw-r--r-- 1 root root 10 Dec 28 14:13 copyme\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):708 +msgid "cat and cp" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):711 +msgid "To display the contents of the file on the terminal, use the cat command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):715 +msgid "Viewing file contents" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):715 +#, no-wrap +msgid "\n$ <i>cat copyme</i>\nfirstfile\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):720 +msgid "Now, we can use a basic invocation of the <c>cp</c> command to create a copiedme file from the original copyme file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):725 +msgid "Copying files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):725 +#, no-wrap +msgid "\n$ <i>cp copyme copiedme</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):729 +msgid "Upon investigation, we find that they are truly separate files; their inode numbers are different:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):733 +msgid "Checking inode differences" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):733 +#, no-wrap +msgid "\n$ <i>ls -i copyme copiedme</i>\n 648284 copiedme 650704 copyme\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):741 +msgid "mv" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):744 +msgid "Now, let's use the mv command to rename \"copiedme\" to \"movedme\". The inode number will remain the same; however, the filename that points to the inode will change." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):750 +msgid "Renaming a file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):750 +#, no-wrap +msgid "\n$ <i>mv copiedme movedme</i>\n$ <i>ls -i movedme</i>\n 648284 movedme\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):756 +msgid "A moved file's inode number will remain the same as long as the destination file resides on the same file system as the source file. We'll take a closer look at file systems in Part 3 of this tutorial series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):762 +msgid "While we're talking about mv, let's look at another way to use this command. mv, in addition to allowing us to rename files, also allows us to move one or more files to another location in the directory hierarchy. For example, to move <path>/var/tmp/myfile.txt</path> to <path>/home/drobbins</path> (which happens to be my home directory,) I could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):770 +msgid "Moving a file to a different location" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):770 +#, no-wrap +msgid "\n$ <i>mv /var/tmp/myfile.txt /home/drobbins</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):774 +msgid "After typing this command, myfile.txt will be moved to <path>/home/drobbins/myfile.txt</path>. And if <path>/home/drobbins</path> is on a different file system than <path>/var/tmp</path>, the mv command will handle the copying of myfile.txt to the new file system and erasing it from the old file system. As you might guess, when myfile.txt is moved between file systems, the myfile.txt at the new location will have a new inode number. This is because every file system has its own independent set of inode numbers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):784 +msgid "We can also use the mv command to move multiple files to a single destination directory. For example, to move myfile1.txt and myarticle3.txt to /home/drobbins, I could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):790 +msgid "Moving multiple files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):790 +#, no-wrap +msgid "\n$ <i>mv /var/tmp/myfile1.txt /var/tmp/myarticle3.txt /home/drobbins</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):798 +msgid "Creating Links and Removing Files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):800 +msgid "Hard links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):803 +msgid "We've mentioned the term \"link\" when referring to the relationship between directory entries (the \"names\" we type) and inodes (the index numbers on the underlying file system that we can usually ignore.) There are actually two kinds of links available on Linux. The kind we've discussed so far are called <e>hard links</e>. A given inode can have any number of hard links, and the inode will persist on the file system until the all the hard links disappear. When the last hard link disappears and no program is holding the file open, Linux will delete the file automatically. New hard links can be created using the <c>ln</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):815 +msgid "Linking files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):815 +#, no-wrap +msgid "\n$ <i>cd /tmp</i>\n$ <i>touch firstlink</i>\n$ <i>ln firstlink secondlink</i>\n$ <i>ls -i firstlink secondlink</i>\n 15782 firstlink 15782 secondlink\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):823 +msgid "As you can see, hard links work on the inode level to point to a particular file. On Linux systems, hard links have several limitations. For one, you can only make hard links to files, not directories. That's right; even though . and .. are system-created hard links to directories, you (even as the \"root\" user) aren't allowed to create any of your own. The second limitation of hard links is that they can't span file systems. This means that you can't create a link from /usr/bin/bash to /bin/bash if your / and /usr directories exist on separate file systems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):837 +msgid "Symbolic links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):840 +msgid "In practice, symbolic links (or <e>symlinks</e>) are used more often than hard links. Symlinks are a special file type where the link refers to another file by name, rather than directly to the inode. Symlinks do not prevent a file from being deleted; if the target file disappears, then the symlink will just be unusable, or broken." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):848 +msgid "A symbolic link can be created by passing the -s option to ln." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):852 +msgid "Viewing symbolic links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):852 +#, no-wrap +msgid "\n$ ln -s secondlink thirdlink\n$ ls -l firstlink secondlink thirdlink\n-rw-rw-r-- 2 agriffis agriffis 0 Dec 31 19:08 firstlink\n-rw-rw-r-- 2 agriffis agriffis 0 Dec 31 19:08 secondlink\nlrwxrwxrwx 1 agriffis agriffis 10 Dec 31 19:39 thirdlink -> secondlink\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):860 +msgid "Symbolic links can be distinguished in <c>ls -l</c> output from normal files in three ways. First, notice that the first column contains an l character to signify the symbolic link. Second, the size of the symbolic link is the number of characters in the target (<c>secondlink</c>, in this case). Third, the last column of the output displays the target filename preceded by a cute little ->." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):871 +msgid "Symlinks in-depth" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):874 +msgid "Symbolic links are generally more flexible than hard links. You can create a symbolic link to any type of file system object, including directories. And because the implementation of symbolic links is based on paths (not inodes), it's perfectly fine to create a symbolic link that points to an object on another physical file system. However, this fact can also make symbolic links tricky to understand." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):883 +msgid "Consider a situation where we want to create a link in /tmp that points to /usr/local/bin. Should we type this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):888 +msgid "Linking directories, first attempt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):888 +#, no-wrap +msgid "\n$ <i>ln -s /usr/local/bin bin1</i>\n$ <i>ls -l bin1</i>\nlrwxrwxrwx 1 root root 14 Jan 1 15:42 bin1 -> /usr/local/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):894 +msgid "Or alternatively:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):898 +msgid "Linking directories, second attempt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):898 +#, no-wrap +msgid "\n$ <i>ln -s ../usr/local/bin bin2</i>\n$ <i>ls -l bin2</i>\nlrwxrwxrwx 1 root root 16 Jan 1 15:43 bin2 -> ../usr/local/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):904 +msgid "As you can see, both symbolic links point to the same directory. However, if our second symbolic link is ever moved to another directory, it will be \"broken\" because of the relative path:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):910 +msgid "Breaking a symbolic link" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):910 +#, no-wrap +msgid "\n$ <i>ls -l bin2</i>\nlrwxrwxrwx 1 root root 16 Jan 1 15:43 bin2 -> ../usr/local/bin\n$ <i>mkdir mynewdir</i>\n$ <i>mv bin2 mynewdir</i>\n$ <i>cd mynewdir</i>\n$ <i>cd bin2</i>\nbash: cd: bin2: No such file or directory\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):920 +msgid "Because the directory /tmp/usr/local/bin doesn't exist, we can no longer change directories into bin2; in other words, bin2 is now broken." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):925 +msgid "For this reason, it is sometimes a good idea to avoid creating symbolic links with relative path information. However, there are many cases where relative symbolic links come in handy. Consider an example where you want to create an alternate name for a program in /usr/bin:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):932 +msgid "Viewing file information for keychain" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):932 +#, no-wrap +msgid "\n# <i>ls -l /usr/bin/keychain</i> \n-rwxr-xr-x 1 root root 10150 Dec 12 20:09 /usr/bin/keychain\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):937 +msgid "As the root user, you may want to create an alternate name for \"keychain\", such as \"kc\". In this example, we have root access, as evidenced by our bash prompt changing to \"#\". We need root access because normal users aren't able to create files in /usr/bin. As root, we could create an alternate name for keychain as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):945 +msgid "Symlinking keychain" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):945 +#, no-wrap +msgid "\n# <i>cd /usr/bin</i>\n# <i>ln -s /usr/bin/keychain kc</i>\n# <i>ls -l keychain</i>\n-rwxr-xr-x 1 root root 10150 Dec 12 20:09 /usr/bin/keychain\n# <i>ls -l kc</i> \nlrwxrwxrwx 1 root root 17 Mar 27 17:44 kc -> /usr/bin/keychain\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):954 +msgid "In this example, we created a symbolic link called kc that points to the file /usr/bin/keychain." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):959 +msgid "While this solution will work, it will create problems if we decide that we want to move both files, /usr/bin/keychain and /usr/bin/kc to /usr/local/bin:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):964 +msgid "Moving the symbolic link" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):964 +#, no-wrap +msgid "\n# <i>mv /usr/bin/keychain /usr/bin/kc /usr/local/bin</i>\n# <i>ls -l /usr/local/bin/keychain</i>\n-rwxr-xr-x 1 root root 10150 Dec 12 20:09 /usr/local/bin/keychain\n# <i>ls -l /usr/local/bin/kc</i>\nlrwxrwxrwx 1 root root 17 Mar 27 17:44 kc -> /usr/bin/keychain\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):972 +msgid "Because we used an absolute path in our symbolic link, our kc symlink is still pointing to /usr/bin/keychain, which no longer exists since we moved /usr/bin/keychain to /usr/local/bin." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):978 +msgid "That means that kc is now a broken symlink. Both relative and absolute paths in symbolic links have their merits, and you should use a type of path that's appropriate for your particular application. Often, either a relative or absolute path will work just fine. The following example would have worked even after both files were moved:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):986 +msgid "Moving files around with symlinks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):986 +#, no-wrap +msgid "\n# <i>cd /usr/bin</i>\n# <i>ln -s keychain kc</i>\n# <i>ls -l kc</i>\nlrwxrwxrwx 1 root root 8 Jan 5 12:40 kc -> keychain\n# <i>mv keychain kc /usr/local/bin</i>\n# <i>ls -l /usr/local/bin/keychain</i>\n-rwxr-xr-x 1 root root 10150 Dec 12 20:09 /usr/local/bin/keychain\n# <i>ls -l /usr/local/bin/kc</i>\nlrwxrwxrwx 1 root root 17 Mar 27 17:44 kc -> keychain\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):998 +msgid "Now, we can run the keychain program by typing /usr/local/bin/kc. /usr/local/bin/kc points to the program keychain in the same directory as kc." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1006 +msgid "rm" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1009 +msgid "Now that we know how to use cp, mv, and ln, it's time to learn how to remove objects from the file system. Normally, this is done with the <c>rm</c> command. To remove files, simply specify them on the command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1015 +msgid "Removing files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1015 +#, no-wrap +msgid "\n$ <i>cd /tmp</i>\n$ <i>touch file1 file2</i>\n$ <i>ls -l file1 file2</i>\n-rw-r--r-- 1 root root 0 Jan 1 16:41 file1\n-rw-r--r-- 1 root root 0 Jan 1 16:41 file2\n$ <i>rm file1 file2</i>\n$ <i>ls -l file1 file2</i>\nls: file1: No such file or directory\nls: file2: No such file or directory\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1027 +msgid "Note that under Linux, once a file is rm'ed, it's typically gone forever. For this reason, many junior system administrators will use the -i option when removing files. The -i option tells rm to remove all files in interactive mode -- that is, prompt before removing any file. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1034 +msgid "Removing files and ask for confirmation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1034 +#, no-wrap +msgid "\n$ <i>rm -i file1 file2</i>\nrm: remove regular empty file `file1'? y\nrm: remove regular empty file `file2'? y\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1040 +msgid "In the above example, the rm command prompted whether or not the specified files should *really* be deleted. In order for them to be deleted, I had to type \"y\" and Enter twice. If I had typed \"n\", the file would not have been removed. Or, if I had done something really wrong, I could have typed Control-C to abort the rm -i command entirely -- all before it is able to do any potential damage to my system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1049 +msgid "If you are still getting used to the rm command, it can be useful to add the following line to your ~/.bashrc file using your favorite text editor, and then log out and log back in. Then, any time you type rm, the bash shell will convert it automatically to an rm -i command. That way, rm will always work in interactive mode:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1057 +msgid "Setting the 'rm -i' alias" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1064 +msgid "rmdir" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1067 +msgid "To remove directories, you have two options. You can remove all the objects inside the directory and then use <c>rmdir</c> to remove the directory itself:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1072 +msgid "Removing directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1072 +#, no-wrap +msgid "\n$ <i>mkdir mydir</i>\n$ <i>touch mydir/file1</i>\n$ <i>rm mydir/file1</i>\n$ <i>rmdir mydir</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1079 +msgid "This method is commonly referred to as \"directory removal for suckers.\" All real power users and administrators worth their salt use the much more convenient <c>rm -rf</c> command, covered next." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1085 +msgid "The best way to remove a directory is to use the <e>recursive force</e> options of the rm command to tell rm to remove the directory you specify, as well as all objects contained in the directory:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1091 +msgid "Removing a complete directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1091 +#, no-wrap +msgid "\n$ <i>rm -rf mydir</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1095 +msgid "Generally, rm -rf is the preferred method of removing a directory tree. Be very careful when using rm -rf, since its power can be used for both good and evil :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1104 +msgid "Using Wild cards" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1106 +msgid "Introducing Wild cards" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1109 +msgid "In your day-to-day Linux use, there are many times when you may need to perform a single operation (such as rm) on many file system objects at once. In these situations, it can often be cumbersome to type in many files on the command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1115 +msgid "Removing individual files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1115 +#, no-wrap +msgid "\n$ <i>rm file1 file2 file3 file4 file5 file6 file7 file8</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1119 +msgid "To solve this problem, you can take advantage of Linux' built-in wild card support. This support, also called \"globbing\" (for historical reasons), allows you to specify multiple files at once by using a <e>wildcat pattern</e>. Bash and other Linux commands will interpret this pattern by looking on disk and finding any files that match it. So, if you had files file1 through file8 in the current working directory, you could remove these files by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1129 +msgid "Removing files using shell completion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1129 +#, no-wrap +msgid "\n$ <i>rm file[1-8]</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1133 +msgid "Or if you simply wanted to remove all files whose names begin with file as well as any file named file, you could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1138 +msgid "Removing files using shell completion with the * glob" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1138 +#, no-wrap +msgid "\n$ <i>rm file*</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1142 +msgid "The * wildcat matches any character or sequence of characters, or even \"no character.\" Of course, glob wildcards can be used for more than simply removing files, as we'll see in the next panel." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1151 +msgid "Understanding non-matches" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1154 +msgid "If you wanted to list all the file system objects in /etc beginning with g as well as any file called g, you could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1159 +msgid "Example use of the * glob" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1159 +#, no-wrap +msgid "\n$ <i>ls -d /etc/g*</i>\n/etc/gconf /etc/ggi /etc/gimp /etc/gnome /etc/gnome-vfs-mime-magic /etc/gpm /etc/group /etc/group-\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1164 +msgid "Now, what happens if you specify a pattern that doesn't match any file system objects? In the following example, we try to list all the files in /usr/bin that begin with asdf and end with jkl, including potentially the file asdfjkl:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1170 +msgid "Another example of the * glob" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1170 +#, no-wrap +msgid "\n$ <i>ls -d /usr/bin/asdf*jkl</i>\nls: /usr/bin/asdf*jkl: No such file or directory\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1175 +msgid "Here's what happened. Normally, when we specify a pattern, that pattern matches one or more files on the underlying file system, and <e>bash replaces the pattern with a space-separated list of all matching objects</e>. However, when the pattern doesn't produce any matches, <e>bash leaves the argument, wild cards and all, as-is</e>. So, then ls can't find the file /usr/bin/asdf*jkl and it gives us an error. The operative rule here is that <e>glob patterns are expanded only if they match objects in the file system</e>. Otherwise they remain as is and are passed literally to the program you're calling." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1189 +msgid "Wild card syntax: * and ?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1192 +msgid "Now that we've seen how globbing works, we should look at wild card syntax. You can use special characters for wild card expansion:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1197 +msgid "* will match zero or more characters. It means \"anything can go here, including nothing\". Examples:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1203 +msgid "/etc/g* matches all files in /etc that begin with g, or a file called g." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1206 +msgid "/tmp/my*1 matches all files in /tmp that begin with my and end with 1, including the file my1." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1212 +msgid "? matches any single character. Examples:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1217 +msgid "myfile? matches any file whose name consists of myfile followed by a single character" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1221 +msgid "/tmp/notes?txt would match both /tmp/notes.txt and /tmp/notes_txt, if they exist" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1230 +msgid "Wild card syntax: []" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1233 +msgid "This wild card is like a ?, but it allows more specificity. To use this wild card, place any characters you'd like to match inside the []. The resultant expression will match a single occurrence of any of these characters. You can also use - to specify a range, and even combine ranges. Examples:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1241 +msgid "myfile[12] will match myfile1 and myfile2. The wild card will be expanded as long as at least one of these files exists in the current directory." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1245 +msgid "[Cc]hange[Ll]og will match Changelog, ChangeLog, changeLog, and changelog. As you can see, using bracket wild cards can be useful for matching variations in capitalization." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1250 +msgid "ls /etc/[0-9]* will list all files in /etc that begin with a number." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1253 +msgid "ls /tmp/[A-Za-z]* will list all files in /tmp that begin with an upper or lower-case letter." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1259 +msgid "The [!] construct is similar to the [] construct, except rather than matching any characters inside the brackets, it'll match any character, as long as it is not listed between the [! and ]. Example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1266 +msgid "rm myfile[!9] will remove all files named myfile plus a single character, except for myfile9" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1275 +msgid "Wild card caveats" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1278 +msgid "Here are some caveats to watch out for when using wild cards. Since bash treats wild card-related characters (?, [, ], and *) specially, you need to take special care when typing in an argument to a command that contains these characters. For example, if you want to create a file that contains the string [fo]*, the following command may not do what you want:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1286 +msgid "Wrong use of special characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1286 +#, no-wrap +msgid "\n$ <i>echo [fo]* > /tmp/mynewfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1290 +msgid "If the pattern [fo]* matches any files in the current working directory, then you'll find the names of those files inside /tmp/mynewfile.txt rather than a literal [fo]* like you were expecting. The solution? Well, one approach is to surround your characters with single quotes, which tell bash to perform absolutely no wild card expansion on them:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1298 +msgid "Escaping special characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1298 +#, no-wrap +msgid "\n$ <i>echo '[fo]*' > /tmp/mynewfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1302 +msgid "Using this approach, your new file will contain a literal [fo]* as expected. Alternatively, you could use backslash escaping to tell bash that [, ], and * should be treated literally rather than as wild cards:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1308 +msgid "Escapting special characters, second possibility" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1308 +#, no-wrap +msgid "\n$ <i>echo \\[fo\\]\\* > /tmp/mynewfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1312 +msgid "Both approaches (single quotes and backslash escaping) have the same effect. Since we're talking about backslash expansion, now would be a good time to mention that in order to specify a literal \\, you can either enclose it in single quotes as well, or type \\\\ instead (it will be expanded to \\)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(note):1319 +msgid "Double quotes will work similarly to single quotes, but will still allow bash to do some limited expansion. Therefore, single quotes are your best bet when you are truly interested in passing literal text to a command. For more information on wild card expansion, type <c>man 7 glob</c>. For more information on quoting in bash, type <c>man 8 glob</c> and read the section titled QUOTING. If you're planning to take the LPI exams, consider this a homework assignment :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1333 +msgid "Summary and Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1335 +msgid "Summary" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1338 +msgid "Congratulations; you've reached the end of our review of Linux fundamentals! I hope that it has helped you to firm up your foundational Linux knowledge. The topics you've learned here, including the basics of bash, basic Linux commands, links, and wild cards, have laid the groundwork for our next tutorial on basic administration, in which we'll cover topics like regular expressions, ownership and permissions, user account management, and more." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1347 +msgid "By continuing in this tutorial series, you'll soon be ready to attain your LPIC Level 1 Certification from the Linux Professional Institute. Speaking of LPIC certification, if this is something you're interested in, then we recommend that you study the Resources in the next panel, which have been carefully selected to augment the material covered in this tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1358 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1361 +msgid "In the \"Bash by example\" article series on developerWorks, Daniel shows you how to use bash programming constructs to write your own bash scripts. This series (particularly Parts 1 and 2) will be good preparation for the LPIC Level 1 exam:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(uri:link):1369 +msgid "/doc/en/articles/bash-by-example-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(uri):1369 +msgid "Bash by example, Part 1: Fundamental programming in the Bourne-again shell" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(uri:link):1373 +msgid "/doc/en/articles/bash-by-example-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(uri):1373 +msgid "Bash by example, Part 2: More bash programming fundamentals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(uri:link):1377 +msgid "/doc/en/articles/bash-by-example-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(uri):1377 +msgid "Bash by example, Part 3: Exploring the ebuild system" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1382 +msgid "If you're a beginning or intermediate Linux user, you really owe it to yourself to check out the Technical FAQ for Linux users, a 50-page in-depth list of frequently-asked Linux questions, along with detailed answers. The FAQ itself is in PDF (Acrobat) format." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1389 +msgid "If you're not too familiar with the vi editor, see the developerWorks tutorial Intro to vi. This tutorial gives you a gentle yet fast-paced introduction to this powerful text editor. Consider this must-read material if you don't know how to use vi." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/lpi-101-intermediate-p3.xml.pot b/article/gettext/lpi-101-intermediate-p3.xml.pot new file mode 100644 index 0000000..7f6f73c --- /dev/null +++ b/article/gettext/lpi-101-intermediate-p3.xml.pot @@ -0,0 +1,1976 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(guide:link):5 +msgid "/doc/en/articles/lpi-101-intermediate-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):6 +msgid "LPI certification 101 (release 2) exam prep, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(author:title):8 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(author:title):11 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(author:title):14 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(mail:link):12 +msgid "chouser@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(mail):12 +msgid "Chris Houser" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(mail:link):15 +msgid "agriffis@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(mail):15 +msgid "Aron Griffis" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(abstract):18 +msgid "In this tutorial we'll introduce you the Linux system documentation. We will teach you how to change permissions and how to manage with Linux accounts. At the end you'll learn how to tune your enviroment." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(version):29 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(date):30 +msgid "2007-06-20" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):33 +msgid "Before You Start" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):35 +msgid "About this tutorial" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):38 +msgid "Welcome to \"Intermediate administration,\" the third of four tutorials designed to prepare you for the Linux Professional Institute's 101 (release 2) exam. This tutorial (Part 3) is ideal for those who want to improve their knowledge of fundamental Linux administration skills. We'll cover a variety of topics, including system and Internet documentation, the Linux permissions model, user account management, and login environment tuning." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):47 +msgid "If you are new to Linux, we recommend that you start with <uri link=\"/doc/en/articles/lpi-101-fundamentals-p1.xml\">Part 1</uri> and <uri link=\"/doc/en/articles/lpi-101-administration-p2.xml\">Part 2</uri>. For some, much of this material will be new, but more experienced Linux users may find this tutorial to be a great way of \"rounding out\" their foundational Linux system administration skills." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):56 +msgid "By the end of this series of tutorials (eight in all covering the LPI 101 and 102 exams), you will have the knowledge you need to become a Linux Systems Administrator and will be ready to attain an LPIC Level 1 certification from the Linux Professional Institute if you so choose." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):63 +msgid "For those who have taken the <uri link=\"http://www-106.ibm.com/developerworks/edu/l-dw-linuxlpi3-i.html\">release 1 version</uri> of this tutorial for reasons other than LPI exam preparation, you probably don't need to take this one. However, if you do plan to take the exams, you should strongly consider reading this revised tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):74 +msgid "About the authors" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):77 +msgid "For technical questions about the content of this tutorial, contact the authors:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):83 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):2255 +msgid "Daniel Robbins, at <mail>drobbins@gentoo.org</mail>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):84 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):2256 +msgid "Chris Houser, at <mail>chouser@gentoo.org</mail>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):85 +msgid "Aron Griffis, at<mail>agriffis@gentoo.org</mail>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):88 +msgid "Residing in Albuquerque, New Mexico, Daniel Robbins is the Chief Architect of <uri link=\"http://www.gentoo.org/\">Gentoo Linux</uri> an advanced ports-based Linux metadistribution. Besides writing articles, tutorials, and tips for the developerWorks Linux zone and Intel Developer Services, he has also served as a contributing author for several books, including Samba Unleashed and SuSE Linux Unleashed. Daniel enjoys spending time with his wife, Mary, and his daughter, Hadassah. You can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):98 +msgid "Chris Houser, known to his friends as \"Chouser,\" has been a UNIX proponent since 1994 when he joined the administration team for the computer science network at Taylor University in Indiana, where he earned his Bachelor's degree in Computer Science and Mathematics. Since then, he has gone on to work in Web application programming, user interface design, professional video software support, and now Tru64 UNIX device driver programming at <uri link=\"http://www.compaq.com/\">Compaq</uri>. He has also contributed to various free software projects, most recently to <uri link=\"http://www.gentoo.org/\">Gentoo Linux</uri>). He lives with his wife and two cats in New Hampshire. You can contact Chris at <mail>chouser@gentoo.org</mail>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):112 +msgid "Aron Griffis graduated from Taylor University with a degree in Computer Science and an award that proclaimed, \"Future Founder of a Utopian UNIX Commune.\" Working towards that goal, Aron is employed by <uri link=\"http://www.compaq.com/\">Compaq</uri> writing network drivers for Tru64 UNIX, and spending his spare time plunking out tunes on the piano or developing <uri link=\"http://www.gentoo.org/\">Gentoo Linux</uri>. He lives with his wife Amy (also a UNIX engineer) in Nashua, New Hampshire." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):127 +msgid "System and network documentation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):129 +msgid "Types of Linux system documentation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):132 +msgid "There are essentially three sources of documentation on a Linux system: manual pages, info pages, and application-bundled documentation in <path>/usr/share/doc</path>. In this section, we'll explore each of these sources before looking \"outside the box\" for more information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):142 +msgid "Manual pages" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):145 +msgid "Manual pages, or \"man pages\", are the classic form of UNIX and Linux reference documentation. Ideally, you can look up the man page for any command, configuration file, or library routine. In practice, Linux is free software, and some pages haven't been written or are showing their age. Nonetheless, man pages are the first place to look when you need help." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):153 +msgid "To access a man page, simply type <c>man</c> followed by your topic of inquiry. A pager will be started, so you will need to press <c>q</c> when you're done reading. For example, to look up information about the <c>ls</c> command, you would type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):160 +msgid "Searching in man page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):160 +#, no-wrap +msgid "\n$ <i>man ls</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):164 +msgid "Knowing the layout of a man page can be helpful to jump quickly to the information you need. In general, you will find the following sections in a <c>man</c> page:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):172 +msgid "NAME" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):173 +msgid "Name and one-line description of the command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):176 +msgid "SYNOPSIS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):177 +msgid "How to use the command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):180 +msgid "DESCRIPTION" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):181 +msgid "In-depth discussion on the functionality of the command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):184 +msgid "EXAMPLES" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):185 +msgid "Suggestions for how to use the command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):188 +msgid "SEE ALSO" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):189 +msgid "Related topics (usually man pages)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):196 +msgid "man page sections" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):199 +msgid "The files that comprise manual pages are stored in <path>/usr/share/man</path> (or in <path>/usr/man</path> on some older systems). Inside that directory, you will find that the manual pages are organized into the following sections:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):207 +msgid "man1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):208 +msgid "User programs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):211 +msgid "man2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):212 +msgid "System calls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):215 +msgid "man3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):216 +msgid "Library functions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):219 +msgid "man4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):220 +msgid "Special files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):223 +msgid "man5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):224 +msgid "File formats" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):227 +msgid "man6" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):228 +msgid "Games" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):231 +msgid "man7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):232 +msgid "Miscellaneous" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):239 +msgid "Multiple man pages" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):242 +msgid "Some topics exist in more than one section. To demonstrate this, let's use the <c>whatis</c> command, which shows all the available man pages for a topic:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):247 +msgid "Using whatis command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):247 +#, no-wrap +msgid "\n$ <i>whatis printf</i>\nprintf (1) - format and print data\nprintf (3) - formatted output conversion\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):253 +msgid "In this case, <c>man printf</c> would default to the page in section 1 (\"User Programs\"). If we were writing a C program, we might be more interested in the page from section 3 (\"Library functions\"). You can call up a man page from a certain section by specifying it on the command line, so to ask for <e>printf(3)</e>, we would type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):261 +msgid "Specifying section in man command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):261 +#, no-wrap +msgid "\n$ <i>man 3 printf</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):268 +msgid "Finding the right man page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):271 +msgid "Sometimes it's hard to find the right man page for a given topic. In that case, you might try using <c>man -k</c> to search the NAME section of the man pages. Be warned that it's a substring search, so running something like <c>man -k ls</c> will give you a lot of output! Here's an example using a more specific query:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):279 +msgid "Searching man using man -k command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):279 +#, no-wrap +msgid "\n$ <i>man -k whatis</i>\napropos (1) - search the whatis database for strings\nmakewhatis (8) - Create the whatis database\nwhatis (1) - search the whatis database for complete words\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):289 +msgid "All about apropos" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):292 +msgid "The example on the previous panel brings up a few more points. First, the <c>apropos</c> command is exactly equivalent to <c>man -k</c>. (In fact, I'll let you in on a little secret. When you run <c>man -k</c>, it actually runs <c>apropos</c> behind the scenes.) The second point is the <c>makewhatis</c> command, which scans all the man pages on your Linux system and builds the database for <c>whatis</c> and <c>apropos</c>. Usually this is run periodically by root to keep the database updated:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):302 +msgid "Building whatis and apropos database" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):302 +#, no-wrap +msgid "\n# <i>makewhatis</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):306 +msgid "For more information on \"man\" and friends, you should start with its man page:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):310 +msgid "Starting man page for man" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):310 +#, no-wrap +msgid "\n$ <i>man man</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):317 +msgid "The MANPATH" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):320 +msgid "By default, the <c>man</c> program will look for man pages in <path>/usr/share/man</path>, <path>/usr/local/man</path>, <path>/usr/X11R6/man</path>, and possibly <path>/opt/man</path>. Sometimes, you may find that you need to add an additional item to this search path. If so, simply edit <path>/etc/man.conf</path> in a text editor and add a line that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):329 +msgid "/etc/man.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):329 +#, no-wrap +msgid "\nMANPATH /opt/man\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):333 +msgid "From that point forward, any man pages in the <path>/opt/man/man*</path> directories will be found. Remember that you'll need to rerun <c>makewhatis</c> to add these new man pages to the whatis database." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):342 +msgid "GNU info" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):345 +msgid "One shortcoming of man pages is that they don't support hypertext, so you can't jump easily from one to another. The GNU folks recognized this shortcoming, so they invented another documentation format: \"info\" pages. Many of the GNU programs come with extensive documentation in the form of info pages. You can start reading info pages with the <c>info</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):353 +msgid "Using info command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):353 +#, no-wrap +msgid "\n$ <i>info</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):357 +msgid "Calling <c>info</c> in this way will bring up an index of the available pages on the system. You can move around with the arrow keys, follow links (indicated with a star) using the Enter key, and quit by pressing <c>q</c>. The keys are based on Emacs, so you should be able to navigate easily if you're familiar with that editor. For an intro to the Emacs editor, see the developerWorks tutorial, <uri link=\"http://www-106.ibm.com/developerworks/edu/l-dw-linuxemacs-i.html\">Living in Emacs</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):368 +msgid "You can also specify an info page on the command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):372 +msgid "Specifying info command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):372 +#, no-wrap +msgid "\n$ <i>info diff</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):376 +msgid "For more information on using the <c>info</c> reader, try reading its info page. You should be able to navigate primitively using the few keys I've already mentioned:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):382 +msgid "Reading info info page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):382 +#, no-wrap +msgid "\n$ <i>info info</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):389 +msgid "/usr/share/doc" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):392 +msgid "There is a final source for help within your Linux system. Many programs are shipped with additional documentation in other formats: text, PDF, PostScript, HTML, to name a few. Take a look in <path>usr/share/doc</path> (or <path>/usr/doc</path> on older systems). You'll find a long list of directories, each of which came with a certain application on your system. Searching through this documentation can often reveal some gems that aren't available as man pages or info pages, such as tutorials or additional technical documentation. A quick check reveals there's a lot of reading material available:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):404 +msgid "/usr/share/doc/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):404 +#, no-wrap +msgid "\n$ <i>cd /usr/share/doc</i>\n$ <i>find . -type f | wc -l</i>\n7582\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):410 +msgid "Whew! Your homework this evening is to read just half (3791) of those documents. Expect a quiz tomorrow. ;-)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):418 +msgid "The Linux Documentation Project" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):421 +msgid "In addition to system documentation, there are a number of excellent Linux resources on the Internet. The <uri link=\"http://www.tldp.org/\">Linux Documentation Project</uri> is a group of volunteers who are working on putting together the complete set of free Linux documentation. This project exists to consolidate various pieces of Linux documentation into a location that is easy to search and use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):433 +msgid "An LDP overview" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):436 +msgid "The LDP is made up of the following areas:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):441 +msgid "Guides - longer, more in-depth books, such as <uri link=\"http://www.tldp.org/LDP/lpg/index.html\">The Linux Programmer's Guide</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):446 +msgid "HOWTOs - subject-specific help, such as the <uri link=\"http://www.tldp.org/HOWTO/DSL-HOWTO/index.html\">DSL HOWTO</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):450 +msgid "FAQs - Frequently Asked Questions with answers, such as the <uri link=\"http://www.tldp.org/FAQ/faqs/BLFAQ\">Brief Linux FAQ</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):454 +msgid "Man pages - help on individual commands (these are the same manual pages you get on your Linux system when you use the <c>man</c> command)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):460 +msgid "If you aren't sure which section to peruse, you can take advantage of the search box, which allows you to find things by topic." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):465 +msgid "The LDP additionally provides a list of Links and Resources such as <uri link=\"http://www.tldp.org/LDP/LG/current/\">Linux Gazette</uri> (see links in <uri link=\"#resources\">Resources</uri>) and <uri link=\"http://www.tldp.org/linuxfocus/index.html\">LinuxFocus</uri>, as well links to mailing lists and news archives." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):476 +msgid "Mailing lists" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):479 +msgid "Mailing lists provide probably the most important point of collaboration for Linux developers. Often projects are developed by contributors who live far apart, possibly even on opposite sides of the globe. Mailing lists provide a method for each developer on a project to contact all the others, and to hold group discussions via e-mail. One of the most famous development mailing lists is the <uri link=\"http://www.tux.org/lkml/\">Linux Kernel Mailing List</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):491 +msgid "More about mailing lists" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):494 +msgid "In addition to development, mailing lists can provide a method for asking questions and receiving answers from knowledgeable developers, or even other users. For example, individual distributions often provide mailing lists for newcomers. You can check your distribution's Web site for information on the mailing lists it provides." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):502 +msgid "If you took the time to read the LKML FAQ at the link on the previous panel, you might have noticed that mailing list subscribers often don't take kindly to questions being asked repeatedly. It's always wise to search the archives for a given mailing list before writing your question. Chances are, it will save you time, too!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):513 +msgid "Newsgroups" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):516 +msgid "Internet \"newsgroups\" are similar to mailing lists, but are based on a protocol called NNTP (\"Network News Transfer Protocol\") instead of e-mail. To participate, you need to use an NNTP client such as <c>slrn</c> or <c>pan</c>. The primary advantage is that you only take part in the discussion when you want, instead of having it continually arrive in your inbox. :-)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):524 +msgid "The newsgroups of primary interest start with comp.os.linux. You can browse the <uri link=\"http://www.tldp.org/links/#ng\">list on the LDP site</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):529 +msgid "As with mailing lists, newsgroup discussion is often archived. A popular newsgroup archiving site is <uri link=\"http://groups.google.com/googlegroups/deja_announcement.html\">Deja News</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):539 +msgid "Vendor and third-party Web sites" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):542 +msgid "Web sites for the various Linux distributions often provide updated documentation, installation instructions, hardware compatibility/incompatibility statements, and other support such as a knowledge base search tool. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):550 +msgid "http://www.redhat.com/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):550 +msgid "Redhat Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):551 +msgid "http://www.debian.org/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):551 +msgid "Debian Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):552 +msgid "http://www.gentoo.org/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):552 +msgid "Gentoo Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):553 +msgid "http://www.suse.com/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):553 +msgid "SuSE Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):554 +msgid "http://www.caldera.com/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):554 +msgid "Caldera" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):555 +msgid "http://www.turbolinux.com/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):555 +msgid "Turbolinux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):561 +msgid "Hardware and software vendors" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):564 +msgid "Many hardware and software vendors have added Linux support to their products in recent years. At their sites, you can find information about which hardware supports Linux, software development tools, released sources, downloads of Linux drivers for specific hardware, and other special Linux projects. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):573 +msgid "http://www.ibm.com/linux/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):573 +msgid "IBM and Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):575 +msgid "http://www.compaq.com/products/software/linux/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):575 +msgid "Compaq and Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):579 +msgid "http://www.sgi.com/developers/technology/linux/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):579 +msgid "SGI and Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):582 +msgid "http://www.hp.com/products1/linux/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):582 +msgid "HP and Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):583 +msgid "http://www.sun.com/linux/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):583 +msgid "Sun and Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):584 +msgid "<uri link=\"http://technet.oracle.com/tech/linux/content.html\">Oracle and Linux</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):593 +msgid "Developer resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):596 +msgid "In addition, many hardware and software vendors have developed wonderful resources for Linux developers and administrators. At the risk of sounding self-promoting, one of the most valuable Linux resources run by a hardware/software vendor is the <uri link=\"http://www.ibm.com/developerworks/linux/\">IBM developerWorks Linux zone</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):610 +msgid "The Linux permissions model" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):612 +msgid "One user, one group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):615 +msgid "In this section, we'll take a look at the Linux permissions and ownership model. We've already seen that every file is owned by one user and one group. This is the very core of the permissions model in Linux. You can view the user and group of a file in a <c>ls -l</c> listing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):622 +msgid "Listing files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):622 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):645 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):672 +#, no-wrap +msgid "\n$ <i>ls -l /bin/bash</i>\n-rwxr-xr-x 1 root wheel 430540 Dec 23 18:27 /bin/bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):627 +msgid "In this particular example, the <path>/bin/bash</path> executable is owned by root and is in the wheel group. The Linux permissions model works by allowing three independent levels of permission to be set for each filesystem object -- those for the file's owner, the file's group, and all other users." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):637 +msgid "Understanding \"ls -l\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):640 +msgid "Let's take a look at our <c>ls -l</c> output and inspect the first column of the listing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):645 +msgid "Inspecting ls -l command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):650 +msgid "This first field <e>-rwxr-xr-</e> contains a symbolic representation of this particular files' permissions. The first character (-) in this field specifies the type of this file, which in this case is a regular file. Other possible first characters:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):657 +msgid "First characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):657 +#, no-wrap +msgid "\n'd' directory\n'l' symbolic link\n'c' character special device \n'b' block special device\n'p' fifo\n's' socket\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):669 +msgid "Three triplets" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):672 +msgid "ls -l /bin/bash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):677 +msgid "The rest of the field consists of three character triplets. The first triplet represents permissions for the owner of the file, the second represents permissions for the file's group, and the third represents permissions for all other users:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):684 +msgid "Triplets in ls -l command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):684 +#, no-wrap +msgid "\n\"rwx\"\n\"r-x\"\n\"r-x\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):690 +msgid "Above, the r means that reading (looking at the data in the file) is allowed, the w means that writing (modifying the file, as well as deletion) is allowed, and the x means that \"execute\" (running the program) is allowed. Putting together all this information, we can see that everyone is able to read the contents of and execute this file, but only the owner (root) is allowed to modify this file in any way. So, while normal users can copy this file, only root is allowed to update it or delete it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):703 +msgid "Who am I?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):706 +msgid "Before we take a look at how to change the user and group ownership of a file, let's first take a look at how to learn your current user id and group membership. Unless you've used the <c>su</c> command recently, your current user id is the one you used to log in to the system. If you use <c>su</c> frequently, however, you may not remember your current effective user id. To view it, type <c>whoami</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):715 +msgid "Using whoami command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):715 +#, no-wrap +msgid "\n# <i>whoami</i>\nroot\n# <i>su drobbins</i>\n$ <i>whoami</i>\ndrobbins\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):726 +msgid "What groups am I in?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):729 +msgid "To see what groups you belong to, use the <c>groups</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):733 +msgid "Using groups command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):733 +#, no-wrap +msgid "\n$ <i>groups</i>\ndrobbins wheel audio\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):738 +msgid "In the above example, I'm a member of the drobbins, wheel, and audio groups. If you want to see what groups other user(s) are in, specify their usernames as arguments:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):744 +msgid "Specifying user argument" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):744 +#, no-wrap +msgid "\n$ <i>groups root daemon</i>\nroot : root bin daemon sys adm disk wheel floppy dialout tape video\ndaemon : daemon bin adm\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):753 +msgid "Changing user and group ownership" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):756 +msgid "To change the owner or group of a file or other filesystem object, use <c>chown</c> or <c>chgrp</c>, respectively. Each of these commands takes a name followed by one or more filenames." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):762 +msgid "Using chown and chgrp commands" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):762 +#, no-wrap +msgid "\n# <i>chown root /etc/passwd</i>\n# <i>chgrp wheel /etc/passwd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):767 +msgid "You can also set the owner and group simultaneously with an alternate form of the <c>chown</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):772 +msgid "Setting owner and group simultaneously" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):772 +#, no-wrap +msgid "\n# <i>chown root:wheel /etc/passwd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):776 +msgid "You may not use <c>chown</c> unless you are the superuser, but <c>chgrp</c> can be used by anyone to change the group ownership of a file to a group to which they belong." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):785 +msgid "Recursive ownership changes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):788 +msgid "Both <c>chown</c> and <c>chgrp</c> have a -R option that can be used to tell them to recursively apply ownership and group changes to an entire directory tree. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):794 +msgid "Using chown and chgrp with -R option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):794 +#, no-wrap +msgid "\n# <i>chown -R drobbins /home/drobbins</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):801 +msgid "Introducing chmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):804 +msgid "<c>chown</c> and <c>chgrp</c> can be used to change the owner and group of a filesystem object, but another program -- called <c>chmod</c> -- is used to change the rwx permissions that we can see in an <c>ls -l</c> listing. <c>chmod</c> takes two or more arguments: a \"mode\", describing how the permissions should be changed, followed by a file or list of files that should be affected:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):813 +msgid "Adding x permission with chmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):813 +#, no-wrap +msgid "\n$ <i>chmod +x scriptfile.sh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):817 +msgid "In the above example, our \"mode\" is +x. As you might guess, a +x mode tells <c>chmod</c> to make this particular file executable for both the user and group and for anyone else." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):823 +msgid "If we wanted to remove all execute permissions of a file, we'd do this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):827 +msgid "Removing x permission with chmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):827 +#, no-wrap +msgid "\n$ <i>chmod -x scriptfile.sh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):834 +msgid "User/group/other granularity" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):837 +msgid "So far, our <c>chmod</c> examples have affected permissions for all three triplets -- the user, the group, and all others. Often, it's handy to modify only one or two triplets at a time. To do this, simply specify the symbolic character for the particular triplets you'd like to modify before the + or - sign. Use u for the \"user\" triplet, g for the \"group\" triplet, and o for the \"other/everyone\" triplet:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):846 +msgid "Using triplets" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):846 +#, no-wrap +msgid "\n$ <i>chmod go-w scriptfile.sh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):850 +msgid "We just removed write permissions for the group and all other users, but left \"owner\" permissions untouched." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):858 +msgid "Resetting permissions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):861 +msgid "In addition to flipping permission bits on and off, we can also reset them altogether. By using the = operator, we can tell <c>chmod</c> that we want the specified permissions and no others:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):867 +msgid "Flipping permission bits" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):867 +#, no-wrap +msgid "\n$ <i>chmod =rx scriptfile.sh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):871 +msgid "Above, we just set all \"read\" and \"execute\" bits, and unset all \"write\" bits. If you just want to reset a particular triplet, you can specify the symbolic name for the triplet before the = as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):877 +msgid "Reseting triplet" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):877 +#, no-wrap +msgid "\n$ <i>chmod u=rx scriptfile.sh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):884 +msgid "Numeric modes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):887 +msgid "Up until now, we've used what are called symbolic modes to specify permission changes to <c>chmod</c>. However, there's another common way of specifying permissions: using a 4-digit octal number. Using this syntax, called numeric permissions syntax, each digit represents a permissions triplet. For example, in 1777, the 777 sets the \"owner\", \"group\", and \"other\" flags that we've been discussing in this section. The 1 is used to set the special permissions bits, which we'll cover later (see \"<uri link=\"https://www6.software.ibm.com/developerworks/education/l-lpir23/l-lpir23-3-23.html\">The elusive first digit</uri>\" at the end of this section). This chart shows how the second through fourth digits (777) are interpreted:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):902 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1005 +msgid "Mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):903 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1006 +msgid "Digit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):906 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1009 +msgid "rwx" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):907 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1010 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1268 +msgid "7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):910 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1013 +msgid "rw-" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):911 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1014 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1274 +msgid "6" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):914 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1017 +msgid "r-x" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):915 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1018 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1280 +msgid "5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):918 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1021 +msgid "r--" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):919 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1022 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1286 +msgid "4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):922 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1025 +msgid "-wx" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):923 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1026 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1292 +msgid "3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):926 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1029 +msgid "-w-" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):927 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1030 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1298 +msgid "2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):930 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1033 +msgid "--x" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):931 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1034 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1304 +msgid "1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):934 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1037 +msgid "---" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):935 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1038 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1310 +msgid "0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):942 +msgid "Numeric permission syntax" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):945 +msgid "Numeric permission syntax is especially useful when you need to specify all permissions for a file, such as in the following example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):950 +msgid "Adding numeric permission" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):950 +#, no-wrap +msgid "\n$ <i>chmod 0755 scriptfile.sh</i>\n$ <i>ls -l scriptfile.sh</i>\n-rwxr-xr-x 1 drobbins drobbins 0 Jan 9 17:44 scriptfile.sh\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):956 +msgid "In this example, we used a mode of 0755, which expands to a complete permissions setting of -rwxr-xr-x." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):964 +msgid "The umask" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):967 +msgid "When a process creates a new file, it specifies the permissions that it would like the new file to have. Often, the mode requested is 0666 (readable and writable by everyone), which is more permissive that we would like. Fortunately, Linux consults something called a \"umask\" whenever a new file is created. The system uses the umask value to reduce the originally specified permissions to something more reasonable and secure. You can view your current umask setting by typing umask at the command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):977 +msgid "Viewing current umask" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):977 +#, no-wrap +msgid "\n$ <i>umask</i>\n0022\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):982 +msgid "On Linux systems, the umask normally defaults to 0022, which allows others to read your new files (if they can get to them) but not modify them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):987 +msgid "To make new files more secure by default, you can change the umask setting:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):991 +msgid "Changing umask setting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):991 +#, no-wrap +msgid "\n$ <i>umask 0077</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):995 +msgid "This umask will make sure that the group and others will have absolutely no permissions for any newly created files. So, how does the umask work? Unlike \"regular\" permissions on files, the umask specifies which permissions should be turned off. Let's consult our mode-to-digit mapping table so that we can understand what a umask of 0077 means:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1042 +msgid "Using our table, the last three digits of 0077 expand to ---rwxrwx. Now, remember that the <c>umask</c> tells the system which permissions to disable. Putting two and two together, we can see that all \"group\" and \"other\" permissions will be turned off, while \"user\" permissions will remain untouched." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1052 +msgid "Introducing suid and sgid" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1055 +msgid "When you initially log in, a new shell process is started. You already know that, but you may not know that this new shell process (typically bash) runs using your user id. As such, the bash program can access all files and directories that you own. In fact, we as users are totally dependent on other programs to perform operations on our behalf. Because the programs you start inherit your user id, they cannot access any filesystem objects for which you haven't been granted access." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1065 +msgid "For example, the passwd file cannot be changed by normal users directly, because the \"write\" flag is off for every user except root:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1070 +msgid "ls -l /etc/passwd" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1070 +#, no-wrap +msgid "\n$ <i>ls -l /etc/passwd</i>\n-rw-r--r-- 1 root wheel 1355 Nov 1 21:16 /etc/passwd\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1075 +msgid "However, normal users do need to be able to modify /etc/passwd (at least indirectly) whenever they need to change their password. But, if the user is unable to modify this file, how exactly does this work?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1084 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1259 +msgid "suid" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1087 +msgid "Thankfully, the Linux permissions model has two special bits called <c>suid</c> and <c>sgid</c>. When an executable program has the <c>suid</c> bit set, it will run on behalf of the owner of the executable, rather than on behalf of the person who started the program." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1094 +msgid "Now, back to the <path>/etc/passwd</path> problem. If we take a look at the <c>passwd</c> executable, we can see that it's owned by root:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1099 +msgid "Checking owner of /usr/bin/passwd file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1099 +#, no-wrap +msgid "\n$ <i>ls -l /usr/bin/passwd</i>\n-rwsr-xr-x 1 root wheel 17588 Sep 24 00:53 /usr/bin/passwd\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1104 +msgid "You'll also note that in place of an x in the user's permission triplet, there's an s. This indicates that, for this particular program, the <c>suid</c> and executable bits are set. Because of this, when <c>passwd</c> runs, it will execute on behalf of the root user (with full superuser access) rather than that of the user who ran it. And because <c>passwd</c> runs with root access, it's able to modify the <path>/etc/passwd</path> file with no problem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1116 +msgid "suid/sgid caveats" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1119 +msgid "We've seen how <c>suid</c> works, and <c>sgid</c> works in a similar way. It allows programs to inherit the group ownership of the program rather than that of the current user." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(impo):1125 +msgid "Here's some miscellaneous yet important information about <c>suid</c> and <c>sgid</c>. First, <c>suid</c> and <c>sgid</c> bits occupy the same space as the x bits in a ls -l listing. If the x bit is also set, the respective bits will show up as s (lowercase). However, if the x bit is not set, it will show up as a S (uppercase)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(impo):1133 +msgid "Another important note: suid and sgid come in handy in many circumstances, but improper use of these bits can allow the security of a system to be breached. It's best to have as few suid programs as possible. The passwd command is one of the few that must be suid." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1143 +msgid "Changing suid and sgid" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1146 +msgid "Setting and removing the <c>suid</c> and <c>sgid</c> bits is fairly straightforward. Here, we set the suid bit:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1151 +msgid "Setting suid bit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1151 +#, no-wrap +msgid "\n# <i>chmod u+s /usr/bin/myapp</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1155 +msgid "And here, we remove the <c>sgid</c> bit from a directory. We'll see how the <c>sgid</c> bit affects directories in just a few panels:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1160 +msgid "Removing sgid bit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1160 +#, no-wrap +msgid "\n# <i>chmod g-s /home/drobbins</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1167 +msgid "Permissions and directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1170 +msgid "So far, we've been looking at permissions from the perspective of regular files. When it comes to directories, things are a bit different. Directories use the same permissions flags, but they are interpreted to mean slightly different things." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1177 +msgid "For a directory, if the \"read\" flag is set, you may list the contents of the directory; \"write\" means you may create files in the directory; and \"execute\" means you may enter the directory and access any sub-directories inside. Without the \"execute\" flag, the filesystem objects inside a directory aren't accessible. Without a \"read\" flag, the filesystem objects inside a directory aren't viewable, but objects inside the directory can still be accessed as long as someone knows the full path to the object on disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1190 +msgid "Directories and sgid" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1193 +msgid "And, if a directory has the \"sgid\" flag enabled, any filesystem objects created inside it will inherit the group of the directory. This particular feature comes in handy when you need to create a directory tree to be used by a group of people that all belong to the same group. Simply do this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1200 +msgid "Creating directory for a group of people" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1200 +#, no-wrap +msgid "\n# <i>mkdir /home/groupspace</i>\n# <i>chgrp mygroup /home/groupspace</i>\n# <i>chmod g+s /home/groupspace</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1206 +msgid "Now, any users in the group mygroup can create files or directories inside <path>/home/groupspace</path>, and they will be automatically assigned a group ownership of mygroup as well. Depending on the users' umask setting, new filesystem objects may or may not be readable, writable, or executable by other members of the mygroup group." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1217 +msgid "Directories and deletion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1220 +msgid "By default, Linux directories behave in a way that may not be ideal in all situations. Normally, anyone can rename or delete a file inside a directory, as long as they have write access to that directory. For directories used by individual users, this behavior is usually just fine." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1227 +msgid "However, for directories that are used by many users, especially <path>/tmp</path> and <path>/var/tmp</path>, this behavior can be bad news. Since anyone can write to these directories, anyone can delete or rename anyone else's files -- even if they don't own them! Obviously, it's hard to use <path>/tmp</path> for anything meaningful when any other user can type <c>rm -rf /tmp/*</c> at any time and destroy everyone's files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1236 +msgid "Thankfully, Linux has something called the sticky bit. When <path>/tmp</path> has the sticky bit set (with a <c>chmod +t</c>), the only people who are able to delete or rename files in <path>/tmp</path> are the directory's owner (typically root), the file's owner, or root. Virtually all Linux distributions enable <path>/tmp</path>'s sticky bit by default, but you may find that the sticky bit comes in handy in other situations." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1248 +msgid "The elusive first digit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1251 +msgid "And to conclude this section, we finally take a look at the elusive first digit of a numeric mode. As you can see, this first digit is used for setting the sticky, <c>suid</c>, and <c>sgid</c> bits:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1260 +msgid "sgid" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1261 +msgid "sticky" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1262 +msgid "mode digit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1265 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1266 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1267 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1271 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1272 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1277 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1279 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1283 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1290 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1291 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1296 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1303 +msgid "on" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1273 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1278 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1284 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1285 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1289 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1295 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1297 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1301 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1302 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1307 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1308 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1309 +msgid "off" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1314 +msgid "Here's an example of how to use a 4-digit numeric mode to set permissions for a directory that will be used by a workgroup:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1319 +msgid "Setting numeric permissions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1319 +#, no-wrap +msgid "\n# <i>chmod 1775 /home/groupfiles</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1323 +msgid "As homework, figure out the meaning of the 1755 numeric permissions setting. :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1332 +msgid "Linux account managment" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1334 +msgid "Introducing /etc/passwd" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1337 +msgid "In this section, we'll look at the Linux account management mechanism, starting with the <path>/etc/passwd</path> file, which defines all the users that exist on a Linux system. You can view your own <path>/etc/passwd</path> file by typing less <path>/etc/passwd</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1344 +msgid "Each line in <path>/etc/passwd</path> defines a user account. Here's an example line from my <path>/etc/passwd</path> file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1349 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1561 +msgid "/etc/passwd" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1349 +#, no-wrap +msgid "\ndrobbins:x:1000:1000:Daniel Robbins:/home/drobbins:/bin/bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1353 +msgid "As you can see, there is quite a bit of information on this line. In fact, each <path>/etc/passwd</path> line consists of multiple fields, each separated by a :." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1359 +msgid "The first field defines the username (drobbins)), and the second field contains an x. On ancient Linux systems, this field contained an encrypted password to be used for authentication, but virtually all Linux systems now store this password information in another file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1366 +msgid "The third field (1000) defines the numeric user id associated with this particular user, and the fourth field (1000) associates this user with a particular group; in a few panels, we'll see where group 1000 is defined." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1372 +msgid "The fifth field contains a textual description of this account -- in this case, the user's name. The sixth field defines this user's home directory, and the seventh field specifies the user's default shell -- the one that will be automatically started when this user logs in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1382 +msgid "/etc/passwd tips and tricks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1385 +msgid "You've probably noticed that there are many more user accounts defined in <path>/etc/passwd</path> than actually log in to your system. This is because various Linux components use user accounts to enhance security. Typically, these system accounts have a user id (\"uid\") of under 100, and many of them will have something like /bin/false listed as a default shell. Since the <path>/bin/false</path> program does nothing but exit with an error code, this effectively prevents these accounts from being used as login accounts -- they are for internal use only." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1399 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1410 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1590 +msgid "/etc/shadow" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1402 +msgid "So, user accounts themselves are defined in <path>/etc/passwd</path>. Linux systems contain a companion file to <path>/etc/passwd</path> that's called <path>/etc/shadow</path>. This file, unlike <path>/etc/passwd</path>, is readable only by root and contains encrypted password information. Let's look at a sample line from <path>/etc/shadow</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1410 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1590 +#, no-wrap +msgid "\ndrobbins:$1$1234567890123456789012345678901:11664:0:-1:-1:-1:-1:0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1414 +msgid "Each line defines password information for a particular account, and again, each field is separated by a :. The first field defines the particular user account with which this shadow entry is associated. The second field contains an encrypted password. The remaining fields are described in the following table:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1424 +msgid "field 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1425 +msgid "# of days since 1/1/1970 that the password was modified" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1428 +msgid "field 4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1429 +msgid "# of days before password will be allowed to be changed (0 for \"change anytime\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1435 +msgid "field 5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1436 +msgid "# of days before system will force user to change to a new password (-1 for \"never\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1442 +msgid "field 6" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1443 +msgid "# of days before password expires that user will be warned about expiration (-1 for \"no warning\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1449 +msgid "field 7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1450 +msgid "# of days after password expiration that this account is automatically # disabled by the system (-1 for \"never disable\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1456 +msgid "field 8" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1457 +msgid "# of days that this account has been disabled (-1 for \"this account is enabled\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1463 +msgid "field 9" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1464 +msgid "Reserved for future use" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1471 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1479 +msgid "/etc/group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1474 +msgid "Next, we take a look at the <path>/etc/group</path> file, which defines all the groups on a Linux system. Here's a sample line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1479 +#, no-wrap +msgid "\ndrobbins:x:1000:\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1483 +msgid "The <path>/etc/group</path> field format is as follows. The first field defines the name of the group; the second field is a vestigial password field that now simply holds an x, and the third field defines the numeric group id of this particular group. The fourth field (empty in the above example) defines any users that are members of this group." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1491 +msgid "You'll recall that our sample <path>/etc/passwd</path> line referenced a group id of 1000. This has the effect of placing the drobbins user in the drobbins group, even though the drobbins username isn't listed in the fourth field of <path>/etc/group</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1501 +msgid "Group notes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1504 +msgid "A note about associating users with groups: on some systems, you'll find that every new login account is associated with an identically named (and usually identically numbered) group. On other systems, all login accounts will belong to a single users group. The approach that you use on the system(s) you administrate is up to you. Creating matching groups for each user has the advantage of allowing users to more easily control access to their own files by placing trusted friends in their personal group." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1517 +msgid "Adding a user and group by hand" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1520 +msgid "Now, I'll show you how to create your own user and group account. The best way to learn how to do this is to add a new user to the system manually. To begin, first make sure that your EDITOR environment variable is set to your favorite text editor:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1527 +msgid "Checking favorite text editor variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1527 +#, no-wrap +msgid "\n# <i>echo $EDITOR</i>\nvim\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1532 +msgid "If it isn't, you can set EDITOR by typing something like:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1536 +msgid "Setting EDITOR variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1536 +#, no-wrap +msgid "\n# <i>export EDITOR=/usr/bin/emacs</i>\n# <i>vipw</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1541 +msgid "You should now find yourself in your favorite text editor with the <path>/etc/passwd</path> file loaded up on the screen. When modifying system <path>passwd</path> and <path>group</path> files, it's very important to use the <c>vipw</c> and <c>vigr</c> commands. They take extra precautions to ensure that your critical <path>passwd</path> and <path>group</path> files are locked properly so they don't become corrupted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1553 +msgid "Editing /etc/passwd" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1556 +msgid "Now that you have the <path>/etc/passwd</path> file up, go ahead and add the following line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1561 +#, no-wrap +msgid "\ntestuser:x:3000:3000:LPI tutorial test user:/home/testuser:/bin/false\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1565 +msgid "We've just added a \"testuser\" user with a UID of 3000. We've added him to a group with a GID of 3000, which we haven't created just yet. Alternatively, we could have assigned this user to the GID of the users group if we wanted. This new user has a comment that reads LPI tutorial test user; the user's home directory is set to <path>/home/testuser</path>, and the user's shell is set to <path>/bin/false</path> for security purposes. If we were creating an non-test account, we would set the shell to <path>/bin/bash</path>. OK, go ahead and save your changes and exit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1579 +msgid "Editing /etc/shadow" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1582 +msgid "Now, we need to add an entry in <path>/etc/shadow</path> for this particular user. To do this, type <c>vipw -s</c>. You'll be greeted with your favorite editor, which now contains the <path>/etc/shadow</path> file. Now, go ahead and copy the line of an existing user account (one that has a password and is longer than the standard system account entries):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1594 +msgid "Now, change the username on the copied line to the name of your new user, and ensure that all fields (particularly the password aging ones) are set to your liking:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1600 +msgid "Modifed /etc/shadow" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1600 +#, no-wrap +msgid "\ntestuser:$1$1234567890123456789012345678901:11664:0:-1:-1:-1:-1:0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1604 +msgid "Now, save and exit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1611 +msgid "Setting a password" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1614 +msgid "You'll be back at the prompt. Now, it's time to set a password for your new user:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1619 +msgid "Setting password for new user" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1619 +#, no-wrap +msgid "\n# <i>passwd testuser</i>\nEnter new UNIX password: <comment>(enter a password for testuser)</comment>\nRetype new UNIX password: <comment>(enter testuser's new password again)</comment>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1628 +msgid "Editing /etc/group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1631 +msgid "Now that <path>/etc/passwd</path> and <path>/etc/shadow</path> are set up, it's now time to get <path>/etc/group</path> configured properly. To do this, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1636 +msgid "Configuring /etc/group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1636 +#, no-wrap +msgid "\n# <i>vigr</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1640 +msgid "Your <path>/etc/group</path> file will appear in front of you, ready for editing. Now, if you chose to assign a default group of users for your particular test user, you do not need to add any groups to <path>/etc/groups</path>. However, if you chose to create a new group for this user, go ahead and add the following line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1648 +msgid "Adding new group manually" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1648 +#, no-wrap +msgid "\ntestuser:x:3000:\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1652 +msgid "Now save and exit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1659 +msgid "Creating a home directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1662 +msgid "We're nearly done. Type the following commands to create testuser's home directory:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1667 +msgid "Creating home directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1667 +#, no-wrap +msgid "\n# <i>cd /home</i>\n# <i>mkdir testuser</i>\n# <i>chown testuser.testuser testuser</i>\n# <i>chmod o-rwx testuser</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1674 +msgid "Our user's home directory is now in place and the account is ready for use. Well, almost ready. If you'd like to use this account, you'll need to use vipw to change testuser's default shell to <path>/bin/bash</path> so that the user can log in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1684 +msgid "Account admin utils" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1687 +msgid "Now that you know how to add a new account and group by hand, let's review the various time-saving account administration utilities available under Linux. Due to space constraints, we won't cover a lot of detail describing these commands. Remember that you can always get more information about a command by viewing the command's man page. If you are planning to take the LPIC 101 exam, you should spend some time getting familiar with each of these commands." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1696 +msgid "newgrp" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1700 +msgid "By default, any files that a user creates are assigned to the user's group specified in <path>/etc/passwd</path>. If the user belongs to other groups, he or she can type newgrp thisgroup to set current default group membership to the group thisgroup. Then, any new files created will inherit thisgroup membership." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1710 +msgid "The <c>chage</c> command is used to view and change the password aging setting stored in <path>/etc/shadow</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1717 +msgid "A general-purpose group administration tool." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1720 +msgid "<c>groupadd</c>/<c>groupdel</c>/<c>groupmod</c>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1721 +msgid "Used to add/delete/modify groups in <path>/etc/group</path>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1724 +msgid "<c>useradd</c>/<c>userdel</c>/<c>usermod</c>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1725 +msgid "Used to add/delete/modify users in <path>/etc/passwd</path>. These commands also perform various other convenience functions. See the man pages for more information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1732 +msgid "<c>pwconv</c>/<c>grpconv</c>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1733 +msgid "Used to convert <path>passwd</path> and <path>group</path> files to \"new-style\" shadow passwords. Virtually all Linux systems already use shadow passwords, so you should never need to use these commands." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1746 +msgid "Tuning the user environment" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1748 +msgid "Introducing \"fortune\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1751 +msgid "Your shell has many useful options that you can set to fit your personal preferences. So far, however, we haven't discussed any way to have these settings set up automatically every time you log in, except for re-typing them each time. In this section we will look at tuning your login environment by modifying startup files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1759 +msgid "First, let's add a friendly message for when you first log in. To see an example message, run <c>fortune</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1764 +msgid "Running fortune command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1764 +#, no-wrap +msgid "\n$ <i>fortune</i>\nNo amount of careful planning will ever replace dumb luck.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1772 +msgid ".bash_profile" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1775 +msgid "Now, let's set up <c>fortune</c> so that it gets run every time you log in. Use your favorite text editor to edit a file named <path>.bash_profile</path> in your home directory. If the file doesn't exist already, go ahead and create it. Insert a line at the top:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1782 +msgid "~/.bash_profile" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1782 +#, no-wrap +msgid "\nfortune\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1786 +msgid "Try logging out and back in. Unless you're running a display manager like xdm, gdm, or kdm, you should be greeted cheerfully when you log in:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1791 +msgid "Results of fortune command in .bash_profile file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1791 +#, no-wrap +msgid "\nmycroft.flatmonk.org login: chouser\nPassword:\nFreedom from incrustations of grime is contiguous to rectitude.\n$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1801 +msgid "The login shell" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1804 +msgid "When bash started, it walked through the <path>.bash_profile</path> file in your home directory, running each line as though it had been typed at a bash prompt. This is called sourcing the file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1810 +msgid "Bash acts somewhat differently depending on how it is started. If it is started as a login shell, it will act as it did above -- first sourcing the system-wide <path>/etc/profile</path>, and then your personal <path>~/.bash_profile</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1816 +msgid "There are two ways to tell bash to run as a login shell. One way is used when you first log in: bash is started with a process name of -bash. You can see this in your process listing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1822 +msgid "Process listing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1822 +#, no-wrap +msgid "\n$ <i>ps u</i>\nUSER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND\nchouser 404 0.0 0.0 2508 156 tty2 S 2001 0:00 -bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1828 +msgid "You will probably see a much longer listing, but you should have at least one COMMAND with a dash before the name of your shell, like -bash in the example above. This dash is used by the shell to determine if it's being run as a login shell." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1838 +msgid "Understanding --login" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1841 +msgid "The second way to tell bash to run as a login shell is with the <c>--login</c> command-line option. This is sometimes used by terminal emulators (like xterm) to make their bash sessions act like initial login sessions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1847 +msgid "After you have logged in, more copies of your shell will be run. Unless they are started with <c>--login</c> or have a dash in the process name, these sessions will not be login shells. If they give you a prompt, however, they are called interactive shells. If bash is started as interactive, but not login, it will ignore <path>/etc/profile</path> and <path>~/.bash_profile</path> and will instead source <path>~/.bashrc</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1858 +msgid "interactive" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1859 +msgid "login" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1860 +msgid "profile" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1861 +msgid "rc" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1864 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1865 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1870 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1877 +msgid "yes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1866 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1873 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1878 +msgid "source" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1867 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1872 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1879 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1884 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1885 +msgid "ignore" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1871 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1876 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1882 ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1883 +msgid "no" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1892 +msgid "Testing for interactivity" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1895 +msgid "Sometimes bash sources your <path>~/.bashrc</path>, even though it isn't really interactive, such as when using commands like rsh and scp. This is important to keep in mind because printing out text, like we did with the fortune command earlier, can really mess up these non-interactive bash sessions. It's a good idea to use the PS1 variable to detect whether the current shell is truly interactive before printing text from a startup file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1904 +msgid "Testing PS1 varibale" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1904 +#, no-wrap +msgid "\nif [ -n \"$PS1\" ]; then\nfortune\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1913 +msgid "/etc/profile and /etc/skel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1916 +msgid "As a system administrator, you are in charge of <path>/etc/profile</path>. Since it is sourced by everyone when they first log in, it is important to keep it in working order. It is also a powerful tool in making things work correctly for new users as soon as they log into their new account." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1923 +msgid "However, there are some settings that you may want new users to have as defaults, but also allow them to change easily. This is where the <path>/etc/skel</path> directory comes in. When you use the <c>useradd</c> command to create a new user account, it copies all the files from <path>/etc/skel</path> into the user's new home directory. That means you can put helpful <path>.bash_profile</path> and <path>.bashrc</path> files in <path>/etc/skel</path> to get new users off to a good start." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1936 +msgid "export" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1939 +msgid "Variables in bash can be marked so that they are set the same in any new shells that it starts; this is called being marked for export. You can have bash list all of the variables that are currently marked for export in your shell session:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1946 +msgid "results of export command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1946 +#, no-wrap +msgid "\n$ <i>export</i>\ndeclare -x EDITOR=\"vim\"\ndeclare -x HOME=\"/home/chouser\"\ndeclare -x MAIL=\"/var/spool/mail/chouser\"\ndeclare -x PAGER=\"/usr/bin/less\"\ndeclare -x PATH=\"/bin:/usr/bin:/usr/local/bin:/home/chouser/bin\"\ndeclare -x PWD=\"/home/chouser\"\ndeclare -x TERM=\"xterm\"\ndeclare -x USER=\"chouser\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1961 +msgid "Marking variables for export" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1964 +msgid "If a variable is not marked for export, any new shells that it starts will not have that variable set. However, you can mark a variable for export by passing it to the <c>export</c> built-in:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1970 +msgid "Marking variable for export" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1970 +#, no-wrap +msgid "\n$ <i>FOO=foo</i>\n$ <i>BAR=bar</i>\n$ <i>export BAR</i>\n$ <i>echo $FOO $BAR</i>\nfoo bar\n$ <i>bash</i>\n$ <i>echo $FOO $BAR</i>\nbar\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1981 +msgid "In this example, the variables FOO and BAR were both set, but only BAR was marked for export. When a new bash was started, it had lost the value for FOO. If you exit this new bash, you can see that the original one still has values for both FOO and BAR:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1988 +msgid "Checking settings in original bash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1988 +#, no-wrap +msgid "\n$ <i>exit</i>\n$ <i>echo $FOO $BAR</i>\nfoo bar\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1997 +msgid "Export and set -x" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2000 +msgid "Because of this behavior, variables can be set in <path>~/.bash_profile</path> or <path>/etc/profile</path> and marked for export, and then never need to be set again. There are some options that cannot be exported, however, and so they must be put in put in your <path>~/.bashrc</path> and your <e>profile</e> in order to be set consistently. These options are adjusted with the set built-in:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2008 +msgid "Using set command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2008 +#, no-wrap +msgid "\n$ <i>set -x</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2012 +msgid "The <c>-x</c> option causes bash to print out each command it is about to run:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2016 +msgid "Checking results of -x option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2016 +#, no-wrap +msgid "\n$ <i>echo $FOO</i>\n$ <i>echo foo</i>\nfoo\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2022 +msgid "This can be very useful for understanding unexpected quoting behavior or similar strangeness. To turn off the <c>-x</c> option, do <c>set +x</c>. See the bash man page for all of the options to the set built-in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2031 +msgid "Setting variables with \"set\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2034 +msgid "The <c>set</c> built-in can also be used for setting variables, but when used that way, it is optional. The bash command <c>set FOO=foo</c> means exactly the same as <c>FOO=foo</c>. Un-setting a variable is done with the <c>unset</c> built-in:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2041 +msgid "Un-setting variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2041 +#, no-wrap +msgid "\n$ <i>FOO=bar</i>\n$ <i>echo $FOO</i>\nbar\n$ <i>unset FOO</i>\n$ <i>echo $FOO</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2052 +msgid "Unset vs. FOO=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2055 +msgid "This is <e>not</e> the same as setting a variable to nothing, although it is sometimes hard to tell the difference. One way to tell is to use the <c>set</c> built-in with no parameters to list all current variables:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2061 +msgid "Comparison of unset and FOO=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2061 +#, no-wrap +msgid "\n$ <i>FOO=bar</i>\n$ <i>set | grep ^FOO</i>\nFOO=bar\n$ <i>FOO=</i>\n$ <i>set | grep ^FOO</i>\nFOO=\n$ <i>unset FOO</i>\n$ <i>set | grep ^FOO</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2072 +msgid "Using <c>set</c> with no parameters like this is similar to using the <c>export</c> built-in, except that <c>set</c> lists all variables instead of just those marked for export." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2081 +msgid "Exporting to change command behavior" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2084 +msgid "Often, the behavior of commands can be altered by setting environment variables. Just as with new bash sessions, other programs that are started from your bash prompt will only be able to see variables that are marked for export. For example, the command <c>man</c> checks the variable PAGER to see what program to use to step through the text one page at a time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2092 +msgid "Exporting PAGER variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2092 +#, no-wrap +msgid "\n$ <i>PAGER=less</i>\n$ <i>export PAGER</i>\n$ <i>man man</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2098 +msgid "With PAGER set to <c>less</c>, you will see one page at a time, and pressing the space bar moves on to the next page. If you change PAGER to <c>cat</c>, the text will be displayed all at once, without stopping." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2104 +msgid "Setting PAGER variable to cat" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2104 +#, no-wrap +msgid "\n$ <i>PAGER=cat</i>\n$ <i>man man</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2112 +msgid "Using \"env\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2115 +msgid "Unfortunately, if you forget to set PAGER back to <c>less</c>, <c>man</c> (as well as some other commands) will continue to display all their text without stopping. If you wanted to have PAGER set to <c>cat</c> just once, you could use the <c>env</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2122 +msgid "Using env command to set variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2122 +#, no-wrap +msgid "\n$ <i>PAGER=less</i>\n$ <i>env PAGER=cat man man</i>\n$ <i>echo $PAGER</i>\nless\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2129 +msgid "This time, PAGER was exported to <c>man</c> with a value of <c>cat</c>, but the PAGER variable itself remained unchanged in the bash session." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2139 +msgid "Summary and resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2141 +msgid "Summary" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2144 +msgid "Congratulations on finishing Part 3 of this tutorial series! At this point, you should know how to locate information in system and Internet documentation, and you should have a good grasp of the Linux permissions model, user account management, and login environment tuning." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2154 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2157 +msgid "Be sure to check out the various Linux documentation resources covered in this tutorial -- particularly the <uri link=\"http://www.tldp.org/\">Linux Documentation Project</uri>. You'll find its collection of guides, HOWTOs, FAQs, and man pages to be invaluable. Be sure to check out <uri link=\"http://www.tldp.org/LDP/LG/current/\">Linux Gazette</uri> and <uri link=\"http://www.tldp.org/linuxfocus/index.html\">LinuxFocus</uri> as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2166 +msgid "The <uri link=\"http://www.tldp.org/guides.html\">Linux System Administrators guide</uri> (available from the \"Guides\" section at www.tldp.org) is a good complement to this series of tutorials -- give it a read! You may also find Eric S. Raymond's <uri link=\"http://www.tldp.org/HOWTO/Unix-and-Internet-Fundamentals-HOWTO/\">Unix and Internet Fundamentals HOWTO</uri> to be helpful." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2175 +msgid "You can read the GNU Project's online documentation for the GNU info system (also called \"texinfo\") at <uri link=\"http://www.gnu.org/manual/texinfo/index.html\">GNU's texinfo documentation page</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2182 +msgid "Browse the <uri link=\"http://www.tldp.org/links/#ng\">Linux newsgroup list</uri> on the LDP site, and the newsgroup archives at <uri link=\"http://groups.google.com/googlegroups/deja_announcement.html\">Deja News</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2189 +msgid "In the Bash by example article series on developerWorks, Daniel shows you how to use bash programming constructs to write your own bash scripts. This bash series (particularly Parts 1 and 2) is good preparation for the LPIC Level 1 exam and reinforces the concepts covered in this tutorial's \"Tuning the user environment\" section:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):2199 +msgid "/doc/en/articles/bash-by-example-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):2199 +msgid "Bash by example, Part 1: Fundamental programming in the Bourne-again shell" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):2203 +msgid "/doc/en/articles/bash-by-example-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):2203 +msgid "Bash by example, Part 2: More bash programming fundamentals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):2207 +msgid "/doc/en/articles/bash-by-example-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):2207 +msgid "Bash by example, Part 3: Exploring the ebuild system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2212 +msgid "We highly recommend the <uri link=\"http://www-106.ibm.com/developerworks/linux/library/l-faq/\">Technical FAQ by Linux Users</uri> by Mark Chapman, a 50-page in-depth list of frequently-asked Linux questions, along with detailed answers. The FAQ itself is in PDF (Adobe Acrobat) format. If you're a beginning or intermediate Linux user, you really owe it to yourself to check this FAQ out. We also recommend the <uri link=\"http://www-106.ibm.com/developerworks/linux/library/l-gloss/index.html\">Linux glossary for Linux users</uri>, also from Mark." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2224 +msgid "If you're not familiar with the vi editor, check out Daniel's <uri link=\"http://www-106.ibm.com/developerworks/edu/l-dw-linuxvi-i.html\">Vi intro -- the cheat sheet method tutorial</uri>. This tutorial will give you a gentle yet fast-paced introduction to this powerful text editor. Consider this must-read material if you don't know how to use vi." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2232 +msgid "For an intro to the Emacs editor, see the developerWorks tutorial, <uri link=\"http://www-106.ibm.com/developerworks/edu/l-dw-linuxemacs-i.html\">Living in Emacs</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2241 +msgid "Feedback" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2244 +msgid "Please let us know whether this tutorial was helpful to you and how we could make it better. We'd also like to hear about other tutorial topics you'd like to see covered in developerWorks tutorials." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2250 +msgid "For questions about the content of this tutorial, contact the authors:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):2257 +msgid "Aron Griffis, at <mail>agriffis@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/lvm-p1.xml.pot b/article/gettext/lvm-p1.xml.pot new file mode 100644 index 0000000..53b1757 --- /dev/null +++ b/article/gettext/lvm-p1.xml.pot @@ -0,0 +1,361 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(guide:link):5 +msgid "/doc/en/articles/lvm-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):6 +msgid "Learning Linux LVM, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by: Joshua Saddler (nightmorph@gentoo.org) +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(abstract):13 +msgid "In this article, Daniel introduces you to the concepts behind Linux LVM (Logical Volume Management) and shows you how to get the latest kernel patches and tools installed on your system. LVM allows you to create logical volumes out of the physical storage resources on your machine. However, unlike physical volumes, the logical volumes can be expanded and shrunk while the system is still running, providing Linux system administrators with the storage flexibility that they've until now only dreamed of." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(version):28 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(date):29 +msgid "2006-01-22" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):32 +msgid "Storage management magic with Logical Volume Management" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):34 +msgid "LVM intro" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):37 +msgid "In this series, I'm going to show you how to install and use the new Logical Volume Management support built-in to the Linux 2.4 kernel. If you've never used a form of LVM before, you're in for a treat; it's a wonderful technology. Before we actually get LVM up and running, I'm going to explain exactly what it is and how it works. Then, we'll be ready to test out LVM and get the most out of it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):46 +msgid "If you're like me, then your experience with UNIX and Linux began on a PC platform, rather than on large, commercial UNIX servers and workstations. On the basic PC, we've always had to deal with partitioning our hard drives. PC people are generally well-acquainted with tools such as <c>fdisk</c>, which are used to create and delete primary and extended partitions on hard disks. Hard disk partitioning is an annoying but accepted part of the process of getting an operating system up and running." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):56 +msgid "Hard drive partitioning can be annoying because to do a good job you really need to accurately estimate how much space you'll need for each partition. If you make a poor estimation, your Linux system could possibly be crippled -- to fix the problem, it's possible that you might even need to perform a full system backup, wipe your hard drives clean, and then restore all your data to a new (and presumably better) partition layout. Ick! These are exactly the kinds of situations that sysadmins try their best to avoid in the first place." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):66 +msgid "While partitions were once static storage regions, thankfully, we now have a proliferation of PC repartitioning tools (PowerQuest's Partition Magic product is one of the most popular). These tools allow you to boot your system with a special disk and dynamically resize your partitions and filesystems. Once you reboot, you have newly resized partitions, hopefully getting you out of your storage crunch. These partition resizing tools are great and solve the problem storage management for some. But are they perfect? Not exactly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):76 +msgid "Tools like Partition Magic are great for workstations, but aren't really adequate for servers. First of all, they require you to reboot your system. This is something most sysadmins desperately try to avoid doing. What if you simply can't reboot your machine every time your storage needs change, such as if your storage needs change dramatically on a weekly basis? What happens if you need to expand a filesystem so that it spans more than one hard drive, or what do you do if you need to dynamically expand or shrink a volume's storage capacity while allowing Apache to continue to serve Web pages? In a highly available, dynamic environment, a basic partition resizer just won't work. For these and other situations, Logical Volume Management is an excellent (if not perfect) solution." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):93 +msgid "Enter LVM" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):96 +msgid "Now, let's take a look at how LVM solves these problems. To create an LVM logical volume, we follow a three-step process. First, we need to select the physical storage resources that are going to be used for LVM. Typically, these are standard partitions but can also be Linux software RAID volumes that we've created. In LVM terminology, these storage resources are called \"physical volumes\". Our first step in setting up LVM involves properly initializing these partitions so that they can be recognized by the LVM system. This involves setting the correct partition type if we're adding a physical partition, and running the pvcreate command." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):108 +msgid "Once we have one or more physical volumes initialized for use by LVM, we can move on to step two -- creating a volume group. You can think of a volume group as a pool of storage that consists of one or more physical volumes. While LVM is running, we can add physical volumes to the volume group or even remove them. However, we can't mount or create filesystems on a volume group directly. Instead, we can tell LVM to create one or more \"logical volumes\" using our volume group storage pool:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(figure:link):119 +msgid "/images/docs/l-lvm-1.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(figure:caption):119 +msgid "A volume group is created out of physical volumes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):121 +msgid "Creating an LVM logical volume is really easy, and once it's created we can go ahead and put a filesystem on it, mount it, and start using the volume to store our files. To create a logical volume, we use the <c>lvcreate</c> command, specifying the name of our new volume, the size we'd like the volume to be, and the volume group that we'd like this particluar logical volume to be part of. The LVM system will then allocate storage from the volume group we specify and create our new volume, which is now ready for use. Once created, we can put an ext2 or ReiserFS filesystem on it, mount it, and use it as we like." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(figure:link):133 +msgid "/images/docs/l-lvm-2.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(figure:caption):133 +msgid "Creating two logical volumes from our existing volume group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):138 +msgid "Extents" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):141 +msgid "Behind the scenes, the LVM system allocates storage in equal-sized \"chunks\", called extents. We can specify the particular extent size to use at volume group creation time. The size of an extent defaults to 4Mb, which is perfect for most uses. One of the beauties of LVM is that the physical storage locations of the extents used for one of our logical volumes (in other words, what disk they're stored on) can be dynamically changed while our logical volume is mounted and in use! The LVM system ensures that our logical volumes continue to operate perfectly while allowing the administrator to physically change where everything is stored." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):153 +msgid "Of course, since everything is created out of equally-sized extents, it's really easy to allocate some additional extents for an already-existing logical volume -- in other words, dynamically \"grow\" the volume:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(figure:link):161 +msgid "/images/docs/l-lvm-3.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(figure:caption):161 +msgid "Adding additional extents from our volume group, expanding the size of our logical volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):163 +msgid "Once the logical volume has been expanded, you can then expand your ext2 or ReiserFS filesystem to take advantage of this new space. If you use a program such as <c>resize_reiserfs</c>, this filesystem expansion can also happen while the volume is mounted and being used! Truly amazing -- with LVM and online filesystem expansion utilties, it's no longer necessary to reboot your system or even drop to runlevel 1 to change your storage configuration." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):172 +msgid "The only time you need to shut down your system is when you need to add new physical disks. Once new disks have been added, you then can add these new physical volumes to your volume group(s) to create a fresh supply of extents." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):181 +msgid "Setting up LVM" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):184 +msgid "OK, let's get LVM installed. LVM consists of two parts: a kernel part and a suite of user-space tools. To start, head over to the main LVM page (see <uri link=\"#resources\">Resources</uri> later in this article) and download the most recent version of the LVM tarball (currently lvm_0.9.1_beta3.tar.gz) you can find. The LVM tarball contains all the user-space tools, as well as a bunch of kernel patches. Here is where things get interesting." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):193 +msgid "If you already have a 2.4-series kernel installed, you may already have LVM support available on your system, and if not, it's a simple matter to recompile your kernel to enable LVM support. However, you may not want to use the LVM support included with your stock (or distribution-supplied) 2.4 kernel. If you want to use the latest LVM version, you'll want to apply patches from the LVM tarball to your current 2.4 kernel source tree. Here's how to do it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):202 +msgid "To start, enter your kernel source directory (<path>/usr/src/linux</path>) and create a directory called <path>extras</path>. Then, enter this directory and extract your LVM tarball:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):208 +msgid "Extracting the patches" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):208 +#, no-wrap +msgid "\n# <i>cd /usr/src/linux</i>\n# <i>mkdir extras</i>\n# <i>cd extras</i>\n# <i>tar xzvf /path/to/location/of/lvm_0.9.1_beta3.tar.gz</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):215 +msgid "Once you've done that, you'll notice a new directory in extras called <path>LVM</path> that contains another directory named after the version of LVM that you just unpacked. Enter these two directories to get to the LVM sources:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):221 +msgid "Getting to the LVM sources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):221 +#, no-wrap +msgid "\n# <i>cd LVM/0.9.1_beta3</i>\n# <i>ls</i>\nABSTRACT COPYING INSTALL Makefile README autoconf config.status kernel make.tmpl.in\nCHANGELOG COPYING.LIB KNOWN_BUGS Makefile.in TODO config.cache configure lvm_input_msg scripts\nCONTRIBUTORS FAQ LVM-HOWTO PATCHES WHATSNEW config.log configure.in make.tmpl tools\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):229 +msgid "You'll see several text files, scripts, and source directories. You'll find the installation instructions in the <path>INSTALL</path> file; I'll guide you through this process. First, we'll want to run the configure script, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):236 +msgid "Configuring the LVM sources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):236 +#, no-wrap +msgid "\n# <i>./configure --prefix=/ --mandir=/usr/man</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):243 +msgid "Patching" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):246 +msgid "After executing this command, the Makefiles will be created and configured to install all the LVM tools in <path>/sbin</path> and the man pages in <path>/usr/man</path>. If your man pages are in <path>/usr/share/man</path> (as per FHS 2.1), then adjust the above path accordingly. And, if your kernel sources aren't in <path>/usr/src/linux</path>, then add a <c>--with-kernel_dir=/path/to/usr/src/linux</c> option to the line as well. Once the configure script completes, we're ready to install the tools and generate a patch for your current kernel. Let's patch the kernel first. Enter the <path>PATCHES</path> directory:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):258 +msgid "Changing directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):258 +#, no-wrap +msgid "\n# <i>cd PATCHES</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):262 +msgid "Now, we're going to type <c>make</c>. The Makefile will generate a patch specifically for our particular 2.4-series kernel sources:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):267 +msgid "Creating the patch" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):267 +#, no-wrap +msgid "\n# <i>make</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):271 +msgid "The patch will be named <c>lvm-[lvmversion]-[kernelversion].patch</c>. For example, since I'm using version 0.9.1_beta3 of LVM and kernel 2.4.0-ac11, my patch is called <c>lvm-0.9.1_beta3-2.4.0-ac11.patch</c>. You'll find it in your current directory. Now, it's time to apply the patch. To do this, you'll want to change directories to the location of your kernel sources and use the patch command as shown:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):280 +msgid "The patch command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):280 +#, no-wrap +msgid "\n# <i>cd /usr/src/linux</i>\n# <i>patch -l -p1 < /usr/src/linux/extras/LVM/0.9.1_beta3/PATCHES/lvm-0.9.1_beta3-2.4.0-ac11.patch</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):285 +msgid "While the LVM INSTALL documentation doesn't mention it, I typically pass the <c>-l</c> option to patch. This option allows the patch program to compensate for any changes in whitespace (such as minor indentation changes) that would ordinarily cause some hunks of the patch to fail. If the above command completes without any \"FAILED\" lines, then you're ready to install the user-space tools. If not, you'll need to scan your <path>/usr/src/linux</path> directory for <c>.rej</c> files and insert the rejected hunks into the sources by hand using a text editor -- ick! However, in most all situations the patch will apply cleanly and you'll be ready to go." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):300 +msgid "Configuring, compiling, and installing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):303 +msgid "OK, you now have a kernel that's been patched so that it has the most current LVM code available. Now, you'll want to configure your kernel so that LVM support is enabled. I recommend that you compile LVM support directly into the kernel rather than configuring it to compile as a module. Fire up your favorite Linux kernel configuration method:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):311 +msgid "Configuring the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):311 +#, no-wrap +msgid "\n# <i>cd /usr/src/linux</i>\n# <i>make menuconfig</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):316 +msgid "You'll find the LVM options under the \"Multi-device support (RAID and LVM)\" section. Once you enable the first option:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):321 +msgid "RAID and LVM support" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):321 +#, no-wrap +msgid "\n[*] Multiple devices driver support (RAID and LVM)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):325 +msgid ". . . you'll see the following option, which you should also enable:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):329 +msgid "Enable LVM support" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):329 +#, no-wrap +msgid "\n<*> Logical volume manager (LVM) support\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):333 +msgid "Depending on your LVM version, there may be other LVM-related options that you'll want to enable as well. Once you're done, save your kernel configuration and perform your standard kernel compilation routine and reboot. Congratulations -- you now have kernel LVM support enabled. Now, we need to get the user-space tools compiled and installed. This step is easy:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):341 +msgid "Creating the user-space tools" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):341 +#, no-wrap +msgid "\n# <i>cd /usr/src/linux/extras/LVM/0.9.1_beta3</i>\n# <i>make</i>\n# <i>make install</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):347 +msgid "There's just one more step, and it's optional. If you're going to be doing more than just testing out LVM, you'll want to add the following lines to your startup rc scripts:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):353 +msgid "Editing the startup rc script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):353 +#, no-wrap +msgid "\n/sbin/vgscan\n/sbin/vgchange -a y\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):358 +msgid "These lines will scan for all available volume groups and activate them. Then, add the following line to your shutdown rc script, and make sure that it executes after all filesystems have been unmounted:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):364 +msgid "Editing the shutdown rc script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):364 +#, no-wrap +msgid "\n/sbin/vgchange -a n\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):368 +msgid "If you're just testing out LVM, then you can skip these steps. Just remember that after every reboot, you'll need to type <c>vgscan</c> and <c>vgchange -a y</c> as root before your logical volumes are available for use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):374 +msgid "That's it for this article. Next article, I'll show you how to create your own logical volumes and unleash the power of LVM. I'll see you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):382 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):386 +msgid "Download the <uri link=\"ftp://sources.redhat.com/pub/lvm2\">LVM tarball</uri> from RedHat." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):390 +msgid "The impatient will want to check out <uri link=\"http://www.linux.org/docs/ldp/howto/LVM-HOWTO.html\">Heinz Mauelshagen's LVM HOWTO</uri>, which shows you how to set up physical volumes, volume groups, and logical volumes. This is something we'll cover in my next article." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):397 +msgid "There's also an interesting HOWTO that shows you <uri link=\"http://www.the-infinite.org/archive/docs/lvm/howto-boot-off-root-lv.txt\"> how to set up your root filesystem on a logical volume</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):402 +msgid "Andreas Dilger is involved with the Linux LVM project and has a nice-looking <e>online</e><uri link=\"http://www-mddsp.enel.ucalgary.ca/People/adilger/online-ext2/\">ext2 filesystem resizer</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):408 +msgid "<uri link=\"http://www.namesys.com\">ReiserFS</uri> is an excellent filesystem (especially in combination with LVM). If you're using ReiserFS, you'll want to grab the reiserfs-utils tarball, which contains a program called <c>reiserfs_resize</c> -- allowing online resizing of ReiserFS filesystems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):415 +msgid "For more information on setting up Linux software RAID volumes, see <uri link=\"/doc/en/articles/software-raid-p1.xml\">Part 1</uri> and <uri link=\"/doc/en/articles/software-raid-p2.xml\">Part 2</uri> of Daniel's series on software RAID." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):421 +msgid "For a refresher, see Daniel's <uri link=\"/doc/en/articles/linux-kernel-compiling.xml\">tutorial on compiling the Linux kernel</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/lvm-p2.xml.pot b/article/gettext/lvm-p2.xml.pot new file mode 100644 index 0000000..b578f1f --- /dev/null +++ b/article/gettext/lvm-p2.xml.pot @@ -0,0 +1,401 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(guide:link):5 +msgid "/doc/en/articles/lvm-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):6 +msgid "Learning Linux LVM, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by: Joshua Saddler (nightmorph@gentoo.org) +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(abstract):13 +msgid "In this article, Daniel shares his experiences converting cvs.gentoo.org's /home filesystem to an LVM logical volume. After the transition, we get to see the benefits of LVM when cvs.gentoo.org's /home partition is dynamically resized in real-time, without rebooting, unmounting /home, or even dropping to runlevel 1. All processes continue to work without any interruption. Daniel's step-by-step details of the conversion will help anyone interested in peforming a similar transition on their own machine." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(version):28 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(date):29 +msgid "2006-01-22" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):32 +msgid "The cvs.gentoo.org upgrade" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):34 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):37 +msgid "In <uri link=\"/doc/en/articles/lvm-p1.xml\">my first LVM article</uri>, I explained the concepts behind LVM. Now it's time to put LVM into action. In this article, I'm going to set up LVM on the official Gentoo Linux cvs server, cvs.gentoo.org. Although cvs.gentoo.org has only one hard drive, LVM's flexibility still provides an incredible improvement over the standard static partitioning approach. I'll show you all the steps of the LVM conversion process, so that if you're interested you can perform a similar conversion on one of your machines." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(warn):48 +msgid "Because implementing LVM is a major change to the system (involving the creation of new partitions and other potentially hazardous actions) it's a really good idea to perform a full system backup before beginning this process. If you're not going to perform a backup, I hope you're using a test box with no important data on it. I should mention that I didn't experience any problems while converting to LVM, but it's best to be prepared in case something goes wrong." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):58 +msgid "That said, let's continue. Before starting the conversion process, I upgraded cvs.gentoo.org so that it was using the following packages. At the time I performed the LVM transition, these were the latest versions available (see <uri link=\"#resources\">Resources</uri> later in this article):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):66 +msgid "Linux kernel 2.4.1-ac19" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):67 +msgid "LVM 0.9.1_beta5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):68 +msgid "reiserfs-utils 3.6.25" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):71 +msgid "Now, for the hard drive. cvs.gentoo.org had a nice new IBM 45 GB hard drive sitting in it; however, when I installed Gentoo Linux on cvs, I only partitioned about 10 gigabytes of the drive, keeping the remaining 35 GB for future partitions. Such are the little tricks you need to employ when not using LVM -- leaving part of the drive unpartitioned is a primitive but effective way to allow for future expansion. However, with LVM there is a better approach." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):83 +msgid "The space problem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):86 +msgid "In the past few weeks, I had been noticing that my root ReiserFS partition had been slowly filling up, as you can see from this <c>df</c> output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):91 +msgid "Shrinking free space" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):91 +#, no-wrap +msgid "\nFilesystem 1k-blocks Used Available Use% Mounted on\n/dev/hda3 9765200 6989312 2775888 72% /\ntmpfs 269052 0 269052 0% /dev/shm\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):97 +msgid "Now, a 72% full root partition isn't exactly a crisis, but it isn't a wonderful situation either. ReiserFS, like many other filesystems, starts slowing down as it gets more and more full, and it was just a matter of time before my root filesystem would fill up completely and filesystem performance would take a hit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):105 +msgid "I decided to fix this problem by using LVM to create a new logical volume out of the 35 GB of currently unpartitioned space at the end of my hard drive. Then, I'd create a filesystem on this volume and move a good chunk of the contents of <path>/dev/hda3</path> to it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):112 +msgid "If you're thinking of making a similar transition on one of your machines, the first thing you need to do is find a suitable piece of your root filesystem to move to a logical volume. For me, the choice was easy -- my <path>/home</path> tree was taking up around 5.7 GB. By moving <path>/home</path> to its own LVM logical volume, my root filesystem would then be at about 20% capacity. Since most new data is being added to <path>/home</path>, my root filesystem would likely stay at around 20% capacity as well -- a very healthy situation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):125 +msgid "The beginnings of a solution" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):128 +msgid "To begin the conversion, I first had to partition the unused space at the end of my hard drive. Using <c>cfdisk</c>, I created a 35 GB partition (<path>/dev/hda5</path>) and set the partition type of the partition to <c>8E</c> (the official LVM partition type). After this change, I rebooted to force a reread of my partition table. After the reboot, my partition table looked like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):137 +msgid "The new partition table" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):137 +#, no-wrap +msgid "\n# <i>sfdisk -l</i>\nDisk /dev/hda: 89355 cylinders, 16 heads, 63 sectors/track\nUnits = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0\n Device Boot Start End #cyls #blocks Id System\n/dev/hda1 * 0+ 247 248- 124960+ 83 Linux\n/dev/hda2 248 743 496 249984 82 Linux swap\n/dev/hda3 744 20119 19376 9765504 83 Linux\n/dev/hda4 20120 89354 69235 34894440 5 Extended\n/dev/hda5 20120+ 89354 69235- 34894408+ 8e Linux LVM\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):149 +msgid "Now that I had an empty 35 GB partition, I was ready to initialize it for LVM. Here's the procedure -- first, I would initialize the 35 gigabytes as a <e>physical</e> volume; then, I would create a <e>volume</e> group using this physical volume, and finally, I would allocate some of the extents on the volume group, creating a <e>logical volume</e> that would contain my new filesystem and house all the files currently in <path>/home</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):158 +msgid "To begin the process, I used the <c>pvcreate</c> command to initialize <path>/dev/hda5</path> as a physical volume:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):163 +msgid "Creating the physical volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):163 +#, no-wrap +msgid "\n# <i>pvcreate /dev/hda5</i>\npvcreate -- physical volume \"/dev/hda5\" successfully created\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):168 +msgid "<c>pvcreate</c> set up a special \"accounting\" area on <path>/dev/hda5</path>, called the VGDA (volume group descriptor area). LVM uses this area to keep track of how the physical extents are allocated, among other things." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):174 +msgid "My next step was to create a volume group and add <path>/dev/hda5</path> to this group. The volume group would act as a pool of extents (chunks of storage blocks). Once the volume group was created, I could create as many logical volumes as I wanted. I decided that my volume group would be called \"main\":" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):181 +msgid "Creating the volume group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):181 +#, no-wrap +msgid "\n# <i>vgcreate main /dev/hda5</i>\nvgcreate -- INFO: using default physical extent size 4 MB\nvgcreate -- INFO: maximum logical volume size is 255.99 Gigabyte\nvgcreate -- doing automatic backup of volume group \"main\"\nvgcreate -- volume group \"main\" successfully created and activated\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):189 +msgid "The <c>vgcreate</c> command did a couple of things. In addition to creating the \"main\" volume group, it also set up <path>/dev/hda5</path> to use 4 MB extents, the default extent size. This means that any logical volumes I create from this volume group can be expanded and shrunk in 4 MB increments." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):196 +msgid "Due to kernel limitations, the extent size determines the maximum size that a logical volume can be. As you can see from the above output, a 4 MB extent size imposes a logical volume size limitation of 256 gigabytes, which is an easily attainable logical volume size if you're adding several high-capacity drives to your volume group. If your volumes could end up being greater than 256 GB apiece, I recommend specifying a larger extent size at <c>vgcreate</c> time. Extents can range anywhere from 8 KB to 512 MB, and must always be a multiple of two. By increasing the extent size above 4 MB, the maximum physical volume size will be scaled accordingly, up to a maximum of 1 petabyte (although the current real-world size limit is 2 terabytes on x86 systems). For example, if I wanted to create a volume group with 32 megabyte extents, I'd type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):210 +msgid "A larger extent size" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):210 +#, no-wrap +msgid "\n# <i>vgcreate -s 32M main /dev/hda5</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):214 +msgid "32 MB is a good extent size, since a 32 MB granularity is still manageable and pushes the maximum logical volume size to 2 terabytes to boot. Once your volume group is created, you can view its information by typing <c>vgdisplay</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):220 +msgid "Examining volume information" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):220 +#, no-wrap +msgid "\n# <i>vgdisplay</i>\n--- Volume group ---\nVG Name main\nVG Access read/write\nVG Status available/resizable\nVG # 0\nMAX LV 256\nCur LV 0\nOpen LV 0\nMAX LV Size 255.99 GB\nMax PV 256\nCur PV 1\nAct PV 1\nVG Size 33.28 GB\nPE Size 4 MB\nTotal PE 8519\nAlloc PE / Size 0 / 0\nFree PE / Size 8519 / 33.28 GB\nVG UUID 2qC2H2-iA8s-qW6F-cwXx-JVIh-I6VC-VVCGmn\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):242 +msgid "Now that I had my volume group, I was ready to create a logical volume. I decided to initially make it 8 gigabytes in size and call it \"lv_home\":" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):247 +msgid "Creating the logical volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):247 +#, no-wrap +msgid "\n# <i>lvcreate -L8G -nlv_home main</i>\nlvcreate -- doing automatic backup of \"main\"\nlvcreate -- logical volume \"/dev/main/lv_home\" successfully created\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):253 +msgid "Then, I created a filesystem on the volume:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):257 +msgid "Filesystem creation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):257 +#, no-wrap +msgid "\n# <i>mkreiserfs /dev/main/lv_home</i>\n\n\n <----------- MKREISERFSv2 ----------->\n\n Block size 4096 bytes\n Block count 2097152\n Used blocks 8275\n Journal - 8192 blocks (18-8209), journal header is in block 8210\n Bitmaps: 17, 32768, 65536, 98304, 131072, 163840,\n 196608, 229376, 262144, 294912, 327680, 360448,\n 393216, 425984, 458752, 491520, 524288, 557056,\n 589824, 622592, 655360, 688128, 720896, 753664,\n 786432, 819200, 851968, 884736, 917504, 950272,\n 983040, 1015808, 1048576, 1081344, 1114112,\n 1146880, 1179648, 1212416, 1245184, 1277952,\n 1310720, 1343488, 1376256, 1409024, 1441792,\n 1474560, 1507328, 1540096, 1572864, 1605632,\n 1638400, 1671168, 1703936, 1736704, 1769472,\n 1802240, 1835008, 1867776, 1900544, 1933312,\n 1966080, 1998848, 2031616, 2064384\n Root block 8211\nHash function \"r5\"\nATTENTION: ALL DATA WILL BE LOST ON '/dev/main/lv_home'! (y/n)y\njournal size 8192 (from 18)\nInitializing journal - 0%....20%....40%....60%....80%....100%\nSyncing..done.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):287 +msgid "Now that the filesystem was created, I could mount it at <path>/mnt/newhome</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):292 +msgid "Mounting the new volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):292 +#, no-wrap +msgid "\n# <i>mkdir /mnt/newhome</i>\n# <i>mount /dev/main/lv_home /mnt/newhome</i>\n# <i>df</i>\nFilesystem 1k-blocks Used Available Use% Mounted on\n/dev/hda3 9765200 6989840 2775360 72% /\ntmpfs 291388 0 291388 0% /dev/shm\n/dev/main/lv_home 8388348 32840 8355508 1% /mnt/newhome\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):302 +msgid "As you can see above, I was almost ready to copy over all my data in <path>/home</path>. Before I began, I dropped to runlevel 1 to ensure that no users or processes would be accessing or modifying files in <path>/home</path> as they were being copied over:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):309 +msgid "Runlevel 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):309 +#, no-wrap +msgid "\n# <i>init 1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):313 +msgid "Then, I began copying the files:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):317 +msgid "Copying files to the new directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):317 +#, no-wrap +msgid "\n# <i>cp -avx /home/* /mnt/newhome</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):321 +msgid "The copy completed in about ten minutes. Then, I backed up my original <path>/home</path> to <path>/home.old</path>, just in case something was wrong with my copy. I created a new mount point, and remounted the new home at <path>/home</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):328 +msgid "The new mount point" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):328 +#, no-wrap +msgid "\n# <i>cd /</i>\n# <i>mv home home.old</i>\n# <i>mkdir home</i>\n# <i>umount /mnt/newhome</i>\n# <i>mount /dev/main/lv_home /home</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):336 +msgid "Then, it was time to set up the server so that my new <path>/home</path> partition would be available every time the machine started up. First, I modified my <path>/etc/fstab</path> so that it included a new <path>/home</path> entry:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):343 +msgid "Editing fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):343 +#, no-wrap +msgid "\n<comment>\n#fs mountpoint type opts dump/pass</comment>\n/dev/hda3 / reiserfs defaults 1 1\n/dev/main/lv_home /home reiserfs defaults 2 2\n/dev/hda2 none swap sw 0 0\n/dev/hda1 /boot reiserfs noauto 0 0\n/dev/cdrom /mnt/cdrom iso9660 noauto,ro 0 0\nproc /proc proc defaults 0 0\nnone /dev/pts devpts mode=620 0 0\ntmpfs /dev/shm tmpfs defaults 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):356 +msgid "Then, I made minor modifications to my initialization scripts. I modified my \"checkroot\" startup script so that the following commands would run immediately after my root partition was remounted read/write:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):362 +msgid "Modifying the startup script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):362 +#, no-wrap +msgid "\n/sbin/vgscan\n/sbin/vgchange -a y\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):367 +msgid "Then, I modified my filesystem unmounting script that gets run on shutdown, so that the following command would run immediately after all filesystems were unmounted:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):373 +msgid "Modifying the shutdown script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):373 +#, no-wrap +msgid "\n/sbin/vgchange -a n\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):377 +msgid "Once I had completed these steps, I rebooted the machine, and to my delight everything worked perfectly. After a day or so of absolutely no problems, I deleted <path>/home.old</path> to free up some space on my root filesystem. Yay! The transition to LVM was a success." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):387 +msgid "The beauty of LVM" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):390 +msgid "While the transition to LVM is a bit of an ordeal, once the transition is complete, managing filesystems becomes tremendously easier. As an example, I decided to resize my new <path>/home</path> logical volume, adding about 2 gigabytes worth of space to the end of the filesystem. First, I added additional capacity to my \"lv_home\" logical volume, and then I used the <c>resize_reiserfs</c> utility to expand the filesystem so that it would use this additional capacity. Here are the two commands that did all this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):400 +msgid "Using additional space" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):400 +#, no-wrap +msgid "\n# <i>lvextend -L+2G /dev/main/lv_home</i>\n# <i>resize_reiserfs -f /dev/main/lv_home</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):405 +msgid "In about a second, I had enlarged my <path>/home</path> filesystem by 2 GB; amazingly, I didn't need to reboot, drop to runlevel 1, or even unmount <path>/home</path> to perform the resize. Everything continued to work as it had before. Isn't that great? Here's the current state of my filesystems:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):412 +msgid "Filesystem space" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):412 +#, no-wrap +msgid "\n# <i>df</i>\nFilesystem 1k-blocks Used Available Use% Mounted on\n/dev/hda3 9765200 1413340 8351860 15% /\n/dev/main/lv_home 10485436 5609836 4875600 54% /home\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):419 +msgid "You can see how LVM really can make an administrator's work a whole lot easier. In the future, I hope to move additional parts of my root filesystem over to LVM, and eventually even convert my root filesystem over to an LVM logical volume. The resources below will help you learn even more about LVM." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):429 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):433 +msgid "For LVM concepts and advice on get the latest kernel patches and tools installed on your system, see my previous article, <uri link=\"/doc/en/articles/lvm-p1.xml\">Learning Linux LVM, Part 1</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):438 +msgid "Download the <uri link=\"ftp://sources.redhat.com/pub/lvm2\">LVM tarball</uri> from RedHat." +msgstr "" + +#. Comment out Sistina links, Bug #119882 +#. <li> +#. Sistina now has an excellent <uri +#. link="http://www.sistina.com/lvm/doc/lvm_howto/index.html">LVM HOWTO</uri> +#. available (it's closer to a full-blown manual than a simple HOWTO). +#. </li> +#. <li> +#. Be sure to check out the <uri +#. link="http://www.sistina.com/cgi-bin/lvm-faqprocessor.cgi">Linux LVM +#. FAQ</uri>. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):454 +msgid "The impatient will want to check out <uri link=\"http://www.linux.org/docs/ldp/howto/LVM-HOWTO.html\">Heinz Mauelshagen's LVM HOWTO</uri>, which contains more examples on how to set up volume groups and logical volumes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):460 +msgid "There's also an interesting HOWTO that shows you <uri link=\"http://www.the-infinite.org/archive/docs/lvm/howto-boot-off-root-lv.txt\"> how to set up your root filesystem on a logical volume</uri>. Once LVM-0.9.1_final is out, I may try doing this." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):466 +msgid "Andreas Dilger is involved with the Linux LVM project and has a nice-looking <e>online</e><uri link=\"http://www-mddsp.enel.ucalgary.ca/People/adilger/online-ext2/\">ext2 filesystem resizer</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):472 +msgid "<uri link=\"http://www.namesys.com\">ReiserFS</uri> is an excellent filesystem (especially in combination with LVM). If you're using ReiserFS, you'll want to grab the reiserfs-utils tarball, which contains a program called <c>reiserfs_resize</c> -- allowing online resizing of ReiserFS filesystems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):479 +msgid "For more information on setting up Linux software RAID volumes, see <uri link=\"/doc/en/articles/software-raid-p1.xml\">Part 1</uri> and <uri link=\"/doc/en/articles/software-raid-p2.xml\">Part 2</uri> of Daniel's series on software RAID." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):485 +msgid "For a refresher, see Daniel's <uri link=\"/doc/en/articles/linux-kernel-compiling.xml\">tutorial on compiling the Linux kernel</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/making-the-distro-p1.xml.pot b/article/gettext/making-the-distro-p1.xml.pot new file mode 100644 index 0000000..56a2bb0 --- /dev/null +++ b/article/gettext/making-the-distro-p1.xml.pot @@ -0,0 +1,211 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(guide:link):5 +msgid "/doc/en/articles/making-the-distro-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):6 +msgid "Making the distribution, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="fox2mike@gentoo.org">Shyam Mani</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(abstract):15 +msgid "Each of us has a story to tell about our experiences with Linux. This is Daniel Robbins' Linux story. In this first of three articles, he talks about how he became a Stampede Linux developer, and why he eventually left Stampede to start his own distribution called Enoch." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(version):27 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(date):28 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):31 +msgid "Birth of the Gentoo Linux distribution" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):33 +msgid "Linux and me" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):36 +msgid "For every Linux geek there's a time when Linux becomes more than just a name and reveals itself as something more wonderful, powerful, and intriguing than anything a developer has ever encountered. My revelation came while I was working at the University of New Mexico as a sysadmin. Our NT server was running pretty well and I had some extra time on my hands. So I got Debian set up on a Pentium 166 server box and started learning ... and learning and learning and learning. And then I was hooked." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):46 +msgid "First I learned the basic ins and outs of Linux: how to get around, perform backups, get Samba running, etc. Then I set up qmail and Apache and learned python and shell programming. I built a departmental Intranet. I got Linux installed at home and began trying different distributions. Finally I settled with Stampede Linux. You know how the progression goes: first you struggle with grasping Linux basics; then, when you have a decent grip, you customize your Linux, learning as you go. Because Linux has nothing to hide, you can explore the technology and tools that make it tick while you grow in Linux fluency." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):61 +msgid "Linux is about potential" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):64 +msgid "Linux offered something I had never seen before. If I had to put that magical something into words, I'd call it potential: the potential to change, to improve, to fix things, and yes, even to break things. As I upgraded to new kernel versions I saw Linux improve before my eyes and transform itself almost daily. And I was along for the ride! I was a part of the transformation. It was fun." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):73 +msgid "If you're anything like me, before you were exposed to Linux and open source you looked to those big companies in Redmond and Cupertino to provide a next-generation operating system that finally worked exactly the way you wanted it to. But alas, that dream never became reality. And while we were waiting, Linux came along. And although it had a lot of rough edges, it provided something for us hacker guys and gals that we could improve upon while we waited for the next big thing. Then one day we awoke to find that Linux had become the next big thing. And smiling all the while, we continued to hack away." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):88 +msgid "Linux is about people" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):91 +msgid "The next thing I learned was that Linux is about people. Isn't that refreshing? Linux isn't just a bunch of source code. It's a community. We rely on this community to get our questions answered, and we become part of the community when we start helping others by contributing our time and expertise." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):98 +msgid "IRC (Internet relay chat) is a great place to meet people and waste a tremendous amount of time. The #stampede channel on irc.openprojects.net became my official hangout. That's where I'd ask my Linux questions. It's also where I first began to help other people out. #stampede desperately needed experienced Linux users to help out newbies who had just gotten the distribution installed. As is common on IRC, many of the experienced Stampede people had lost their zeal for answering (yet another) newbie question. But I was so excited that I actually knew the answer to newbies' questions, that I couldn't resist helping out! And that's how my involvement with Stampede began. I was just another guy who liked to answer questions. Of course, it wasn't entirely altruistic, because I also helped myself to expert Linux knowledge that the more experienced people on the channel (not to mention the Stampede developers themselves!) had to offer." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):117 +msgid "Getting involved" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):120 +msgid "When people ask me how to get involved in an open source project, I tell them to find a place where they can be helpful, even if it's just by helping with basic Linux questions. A sincere desire to help others is a great ticket into the Linux community because this sentiment is at the heart of all open source development (including Linux). At least, it should be." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):128 +msgid "Along the way you'll inevitably run into people who know more than you. And you'll learn from them just as newbies continue to learn from you. It's also likely that as you gain more experience you'll come across opportunities to help in new ways. Maybe some of the project developers you come across will suggest something, or they'll ask for help themselves. They may even invite you to become part of the development team. If you're focused on helping others, they'd be foolish to pass you by. If you're helping a lot of people out, you will definitely be noticed in the community. That's sort of how it happened with Stampede and me." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):140 +msgid "Gradually I became more and more involved in Stampede development. Before long, I was an official Stampede developer. With the blessing of skibum (Matt Wood, Stampede's head honcho), I began working on a new version of Stampede's primitive .slp packaging format. At the time the .slp package format consisted of a .tar.bz2 archive with a fixed-length footer stuck on the end that contained information about the package author, a description of the contents, the package creator, etc. This approach had two major problems: the fields were a fixed length and the footer really wasn't that big, and there was no extensibility built into the format (there was no way to add any additional fields to the .slp format in the future). Obviously this thing needed a major overhaul." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):153 +msgid "Working with the senior Stampede developers, I wrote up a proposal of how to deal with the problem. Then I started coding the prototype tools in Python. The new format (codenamed slpv6) was somewhat similar to the IFF file format from the Amiga world. This next-generation .slp format allowed for 2 32 fields, 2 32 categories of fields, and a maximum field data length of 2 32 bytes. Not only was the format very extensible, it was also more compact than plain-text and easy to parse. Both text and binary data could be stored in the format, which allowed for a lot of possibilities for the future. The idea was to stick this next-generation dynamic header on the end of the archive file, thereby producing a next-generation .slp format that would serve Stampede users for years to come and at the same time maintain compatibility with standard UNIX archive formats." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):170 +msgid "People can get ugly" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):173 +msgid "slpv6 development was going well and all the senior developers were happy with my progress. But unfortunately, two lower-level Stampede developers wanted to control the slpv6 project. They didn't like the direction I was taking, and they spent most of their time insulting the new slpv6 system. Though I spent hours in heated development discussions defending the proposal against their attacks, we weren't able to resolve anything. Eventually it became clear that they were just naturally argumentative and wouldn't be happy until they had their way. Fortunately for me, my project had the approval of the senior Stampede developers. But these discussions began to wear on me and made Stampede development very unpleasant. Ugh!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):186 +msgid "I couldn't avoid these guys since I had to hang out on #stampede to chat with higher-level developers. And every time I was on the channel they became combative, trying to undermine my work. They'd use devious techniques like calling for development meetings (really just an opportunity to insult my work in front of the senior developers). They'd also try to call for votes, attempting to seize control of Stampede. Of course they'd only call for a vote when they thought they had convinced enough people to agree with them. Throughout all of this I continued my slpv6 development. Needless to say, the senior development loved my work and wanted me to continue (without their support I wouldn't have been able to stick it out)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):202 +msgid "Understanding the freak" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):205 +msgid "These two guys belong to a category of developer I like to call \"the freak\". But although they made my development work very unpleasant, I also learned a lot from having to deal with them. At this point I'd like to offer you an expos?f the freak developers, a sort of comprehensive overview: the qualities that make a freak, the freak's modus operandi, and how you, the development project leader, can confront and possibly reform the freak without exerting a lot of effort." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):215 +msgid "In order to avoid emotional damage, you'll need one prerequisite: a backbone. If you're unable to confront the freak in a respectful but firm manner, there's no hope. The freak's goal is to control as much of your project as possible so that he or she will feel powerful. The freak will use several techniques to make this happen. First they'll start unfairly criticizing or bitterly complaining about a project and/or the developers working on a project. Then they will refrain from offering any constructive solutions. They will also not be willing to help with the project in any other way unless they are promoted to the role of project manager. Their goal is to convince you to give them as much authority as possible so that they can solve problems that only they, with their finely trained freak eyes, can see." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):229 +msgid "If the criticism and complaining aren't effective, they'll request a developer meeting. This will be their opportunity to try and divide your development team into two factions. When they think that they've gotten enough people on their side, they'll request a vote (knowing they will win). If they don't win the vote or they are overruled, they'll push for another developer meeting next week in which they'll again try to divide your development team. They'll repeat this process endlessly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):239 +msgid "If the developer meeting approach doesn't work, freaks will become reformers. By adopting this role they will try to streamline (read: undermine) the oppressive and unfair executive decision-making process by attempting to replace it with something more democratic (read: easily manipulated.) This will often involve convincing you that you should do whatever the majority of your developers want. Freaks love this because then you can't override those developer meeting votes anymore (muhahaha!). If you allow this to happen, you've basically given the freak the keys to your Lexus. You're powerless." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):250 +msgid "In another approach, freaks will irritate and drive away your productive developers. Then they'll work your entire team into a frenzy as they forcefully try to reform the project's power structure. If their efforts are finally defeated, they'll try to rally as many defectors together as possible and fork from your project. Ouch!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):261 +msgid "Managing the freak" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):264 +msgid "You can identify these guys pretty easily. They're the ones who aren't writing any code (nor do they have any intention to). Instead they spend their time talking about more important things. You know, those managerial issues. If you're a project leader, it's pretty easy to deal with them. Just tell them that you won't consider any proposal unless they produce working code. Or insist that they constructively help the current project, which includes obeying the current project manager, before giving them the opportunity to offer any (constructive) criticism. If they write some nice code or start being more helpful, great. If not, tell them to go away. They'll either leave the project (if you ignore them long enough), or they'll get their act together and start writing some code and generally become more pleasant." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):278 +msgid "Unfortunately the senior Stampede developers didn't take on freak management. In other words, they allowed these two guys to pester me (and others) to no end. While the senior developers were always in favor of my development work, they didn't do much to get these guys under control. So one day I decided that it would be easier to create my own distribution rather than have to put up with the two freaks. I resigned from Stampede development and started making plans to produce my own distro." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):288 +msgid "While I felt a bit weird about leaving a project because of two lower-level developers, the fact that they weren't dealt with really indicated that the project had severe managerial problems. If the higher-level developers weren't able or willing to make sure the Stampede development effort was pleasant and rewarding, then I didn't want to be there." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):299 +msgid "Starting afresh" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):302 +msgid "Once I left I breathed a big sigh of relief. Wow! Finally, things were calm and quiet. Now it was time to define what my distribution would be about and what it would contribute to the Linux distribution scene. One of the things that attracted me to Stampede was its raw performance (thanks to its use of the experimental Pentium-optimized pgcc compiler). So I decided to focus first on performance. In addition to minimizing CPU utilization, I also wanted to minimize bloat. Too many distributions (especially those popular shrink-wrapped ones) enable so many daemons by default that you barely have any RAM left after opening an xterm. I wanted my distribution to be lean and mean, and focused on maximizing the performance of the hardware that it ran on. I decided to take a holistic approach and tackle the performance problem from all angles." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):316 +msgid "But I had a serious lack of resources, since I was the only developer for my distribution! How could I possibly create something that was comparable to Caldera or RedHat off the ground on my own? The answer was automation. I had to write scripts to automate everything, so that I would have a minimal amount of time-consuming, repetitive labor. After all, that's what computers do best, right?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):325 +msgid "I quickly saw that writing simple scripts for the kind of automation I needed wasn't going to be enough. I needed to design a complete system for generating a Linux distribution from scratch. I tentatively called it the ebuild system and got to work. The ebuild system would be able to automatically create all the distribution binaries, automating everything from unpacking and patching the sources to compilation, installation and packaging. After getting a basic ebuild prototype working, I started creating ebuild scripts for the key components of a Linux distribution (like gcc, glibc, binutils, util-linux, and friends). My Stampede development box was gradually turning into my own system, as I redesigned the initialization scripts (basing them on the Stampede initialization scripts that I had previously designed) and testing and installing every new package that I created." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):340 +msgid "A few months later I had a complete, self-hosted Linux distribution. I named it Enoch and sat back and smiled contentedly. But what became of Enoch, and how did Gentoo Linux evolve? Join me in my next article as I tell the story of how Enoch became Gentoo Linux, and the many new challenges I faced along the way." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):350 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(li):354 +msgid "Continue reading my story with \"Making the distribution, <uri link=\"/doc/en/articles/making-the-distro-p2.xml\">Part 2</uri> and <uri link=\"/doc/en/articles/making-the-distro-p3.xml\">Part 3</uri>\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(li):359 +msgid "Visit the <uri link=\"/index.xml\">Gentoo Linux Web site</uri> for more information on the distribution." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(li):363 +msgid "Learn more about the Gentoo Linux ebuild system in Daniel's article, <uri link=\"http://www.gentoo.org/doc/en/articles/bash-by-example-p3.xml\">Bash by example, Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):373 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):376 +msgid "Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a contributing author of several books published by MacMillan: Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade when he was first exposed to the Logo programming language and a potentially lethal dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife Mary and his new baby daughter, Hadassah. You can contact Daniel at <mail link=\"drobbins@gentoo.org\">drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/making-the-distro-p2.xml.pot b/article/gettext/making-the-distro-p2.xml.pot new file mode 100644 index 0000000..3c231e9 --- /dev/null +++ b/article/gettext/making-the-distro-p2.xml.pot @@ -0,0 +1,247 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(guide:link):5 +msgid "/doc/en/articles/making-the-distro-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):6 +msgid "Making the distribution, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="fox2mike@gentoo.org">Shyam Mani</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(abstract):15 +msgid "In his previous article, Daniel Robbins told the story of how he became a Stampede Linux developer and why he eventually left Stampede to start the Enoch Linux distribution. In this go-round he lets you in on the strange events that happened after the Enoch development team discovered a little-known, blazingly fast compiler." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(version):28 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(date):29 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):32 +msgid "From Enoch to Gentoo, via minor setbacks and corporate run-ins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):34 +msgid "First steps to Enoch" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):37 +msgid "In my <uri link=\"/doc/en/articles/making-the-distro-p1.xml\">previous article</uri>, I gave you the low-down on my days with the Stampede development team and why I left (to get away from lower-level politically-minded, project-controlling \"freaks\"). Because of the interference from these meddlesome by-standers, I figured it would be easier to put together my own Linux distribution than to continue improving Stampede under such dirty conditions! Fortunately I took with me a considerable amount of experience based on my (may I say substantial?) work for Stampede, including maintaining several of their packages, designing the initialization scripts, and leading the slpv6 (next-generation package management project)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):50 +msgid "The distribution I began working on, code-named Enoch, was going to be blazingly fast because it would completely automate the package creation and upgrading process. I have to admit that this was in large part because I was a one-member team and couldn't afford to spend my time on repetitive work that my development box could be automated to do for me. And since I was designing a complete distribution from scratch (rather than \"spinning off\" from someone like RedHat), I had my work cut out for me and needed all the free time I could scrounge up." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):60 +msgid "After getting my basic Enoch system up and running, I headed back to irc.openprojects.net and started my own channel called #enoch. From there I gradually assembled a team of about ten developers. In those early days we all hung out on IRC and worked on the distribution in our spare time. As we communally and cooperatively hacked away at it, finding and fixing new bugs, Enoch became more functional and professional every day." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):72 +msgid "The first roadblock" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):75 +msgid "One inevitable day, Enoch hit its first roadblock. After adding Xfree86, glib, and gtk+, I decided to get xmms (an X11/gtk+-based MP3/CD player app) working. I figured it was time to celebrate with some music! But after installing xmms, I tried to start it... and X locked up! At first I thought xmms locked up because I used insane compiler optimizations (\"-O6 -mpentiumpro\", in case you were wondering). My first thought, to compile xmms with standard optimizations, didn't solve the problem. So I started looking elsewhere. After spending a full week of development time trying to track down the problem, I got an e-mail from an Enoch user, Omegadan, who was also experiencing xmms lockups." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):87 +msgid "We corresponded for a while, and after many hours of testing we determined that the problem was a POSIX threads-related issue. For some reason, a pthread_mutex_trylock() call did not return the way it should. As the creator of a distribution, these were the types of bugs I really didn't want to encounter. I counted on the developers to release perfect sources so I could focus on enhancing the Linux experience rather than getting buggy sources to work. Of course I soon learned that this was an unrealistic expectation, and that problems like will always pop up from time to time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):98 +msgid "As it turned out, the problem wasn't with xmms, gtk+, or glib. And it wasn't an issue with Xfree86 3.3.5 not being thread-safe and locking up. Surprisingly, we found the bug in the Linux POSIX threads implementation itself, part of the GNU C library (glibc) version 2.1.2. I was shocked at the time to find that such a critical part of Linux had such a major bug. (And we used a release version of glibc in Enoch, not a prerelease or CVS version!)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):107 +msgid "So how did we track down the problem? Actually, we never were able to come up with a bug fix, but at one point I stumbled across a couple of e-mails on the glibc developer mailing list from another person who had the same problem. The glibc developer who replied posted a patch that solved the thread problem for us. But I was curious why RedHat 6 (which also used glibc 2.1.2) didn't suffer from this problem since the patch was just posted and RedHat 6 had been available for some time. To find out, I downloaded RedHat's glibc SRPM (source RPM) and took a look at their patches." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):118 +msgid "RedHat had their own homegrown glibc patch that solved the pthread_mutex_trylock() issue. Apparently they experienced the same problem and created their own custom fix. Too bad they didn't send this patch \"upstream\" to the glibc developers so it could be shared with the rest of the world. But who knows, maybe RedHat sent the patch upstream and for some reason the glibc developers didn't accept it. Or maybe the thread bug was triggered by a specific combination of compiler and binutils versions, and RedHat never ran into it (although they did have a thread patch in their SRPM). I suppose we'll never know exactly what happened. But I did learn that RedHat SRPMs contain a lot of private bug fixes and tweaks that never seem to make it upstream to the original developers. I'm going to rant about this for a little while." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):135 +msgid "Rant" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):138 +msgid "When you put together a Linux distribution it's really important that any bug fixes you create are sent upstream to the original developers. As I see it, this is one of the many ways that distribution creators contribute to Linux. We're the guys who actually get all these different programs working as a unified whole. We should send our fixes upstream as we unify so that other users and distributions can benefit from our discoveries. If you decide to keep bug fixes to yourself, you're not helping anyone; you're just ensuring that a lot of people will waste time fixing the same problem over and over again. This kind of policy goes against the whole open source ethic and stunts the growth of Linux development. Maybe I should say that it \"bugs\" us all." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):151 +msgid "It's unfortunate that some distributions (ahem) aren't as good (RedHat) as others (Debian) about sharing their work with the community." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):159 +msgid "Compiler drama" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):162 +msgid "During the time we were trying to fix the glibc threads problem, I e-mailed Ulrich Drepper (one of the guys at Cygnus who is heavily involved with glibc development). I mentioned the POSIX thread problem we were having, and that Enoch was using pgcc for optimum performance. And he responded with something like this (I'm paraphrasing here): \"Our own compiler included with the CodeFusion product has an excellent x86 backend that produces executables far faster than those generated with pgcc.\" Obviously, I was very interested in testing out this mystery \"turbo\" compiler the Cygnus guys had created." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):173 +msgid "I thereupon requested a demo copy of Cygnus Codefusion 1.0 so that I could test it out, and Omegadan and I were amazed to find that this compiler was everything that Ulrich claimed and then some. The x86 backend increased the performance of some of the CPU-intensive executables (like bzip2) by close to 90%! All applications seemed to benefit from at least a 10% real-world performance increase, and all we did was swap out compilers. Enoch even booted 30 - 40% faster. The performance gains were far, far greater than what we gained by switching from gcc to pgcc. Obviously, after experiencing it for ourselves, we wanted to use this compiler for Enoch. Fortunately, the sources were included on the CodeFusion CD and were released under the GPL, so we were fully permitted to use this compiler... or so we thought." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):190 +msgid "Let the freakiness begin" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):193 +msgid "I sent an e-mail to the marketing manager at Cygnus to let them know our intentions, expecting a \"yeah, go for it, thanks for using our compiler\" response. Instead the reply was that although we were (technically) allowed to use the Cygnus compiler, we were strongly urged not to use or include the compiler sources with Enoch. I responded by asking why they had released the source under the GPL, if that was the case. It's my guess that if they had a choice, they wouldn't have used the GPL, but because they derived their compiler from egcs (released under the GPL), they had no choice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):204 +msgid "This is a good example of a situation where the GPL prevented a company from creating a proprietary product based on open sources. My educated guess is that Cygnus was afraid that if we used their compiler we would undermine their boxed product sales, which would be especially strange because none of their marketing materials (nor the InfoWorld review) mentioned the new compiler included with CodeFusion. CodeFusion was marketed solely as a \"development IDE\" product, not as a compiler." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):214 +msgid "In an attempt to put some of their paranoia to rest, I offered to endorse CodeFusion and place the endorsement on our Web site with a link to help spur CodeFusion sales. Personally I didn't think that a \"turbo\" Enoch would negatively affect their sales, since CodeFusion was marketed as an IDE. But I tried nevertheless to make them happy. The IDE component of CodeFusion was a commercial product, and we had no desire or intention (or right) to distribute it with Enoch." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):224 +msgid "I e-mailed my (generous?) offer to Cygnus and received another strange response. They wanted authority over all of our \"marketing materials\" (apparently, this also included the content of our Web site!) Another shocker. The Cygnus marketing team seemed to have no grasp of how the Linux community or the GPL worked, so I decided to cut off communication with Cygnus for the indefinite future. In the mean time, we created a private \"turbo\" and public \"non-turbo\" version of Enoch, leaving the final decision for later." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):234 +msgid "But after several months they integrated the CodeFusion x86 backend into gcc 2.95.2. Now everyone could benefit from the nice new backend, not just the people who knew about the \"secret GPL compiler\" included on the CodeFusion CD. But we decided to go ahead and use gcc rather than the CodeFusion compiler. In addition to being more stable, gcc 2.95.2 also allowed us avoid Cygnus, which by this time had been purchased by RedHat for a ridiculous sum of money. (Note: the new x86 backend in gcc 2.95.2 is what gave newer Linux distributions the significant speed boost that we all got to experience. It also gave FreeBSD 4.0 a nice speed boost over 3.3.6. Notice the difference?)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):249 +msgid "On the soapbox" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):252 +msgid "Thanks to this and other experiences, I've learned a lot about for-profit open source companies. There's absolutely nothing bad about being a for-profit open source company. Nor is there anything morally wrong with producing proprietary closed-source software, if that's what you'd like to do. But it doesn't make any sense for open source companies to subvert or refuse to cooperate with the rest of the open source world, either by not supporting the GPL or by any other means. This is a practical point that clearly makes business sense." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):262 +msgid "Open source companies should realize that the free exchange of ideas and code is what they profit from. By opposing things like the standard GPL practices, they undermine the environment they rely upon to prosper and grow. If open source is the soil from which your business has sprouted, it makes sense to keep the soil healthy." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):270 +msgid "I understand that there's a temptation to keep at least some information secret for short-term financial gain. Advanced code or special techniques provide a coveted competitive advantage, which could potentially result in increased sales and profit. But if the goal is to be the sole provider of a product, the product should be commercial rather than open source. Open source does not allow for exclusive access to the inner workings of anything. That's what it means." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):282 +msgid "Back to Enoch" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):285 +msgid "Now, I'll step down from my soapbox and continue my story." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):289 +msgid "As Enoch became more and more refined, we decided that a name change was in order, and \"Gentoo Linux\" was born. By this time we had released a couple of versions of Enoch (now Gentoo), and were racing to get to Gentoo Linux version 1.0. Around this time I also decided to upgrade my old Celeron 300 box (overclocked and rock-solid at 450Mhz) to a brand-new Abit BP6 (a dual Celeron board that had just hit the market). I sold my old box and put my dual Celeron 366 system together. After overclocking the processors to something on the order of 500Mhz, I was cruising. But I noticed that my new machine wasn't very stable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):300 +msgid "Obviously my first reaction was to go back down to 2x366Mhz. But now I experienced an even stranger problem. As long as my machine kept the CPUs chugging away, the machine didn't lock up. But if I left the machine idle overnight, there was a good probability that the system would lock up completely. Yes, an idle bug -- argh! After some research, I found several other Linux users with the same problem on this particular motherboard. A chip on the BP6 (was it the PCI controller?) seemed to be flaky or out of spec, which caused Linux to lock up at idle." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):311 +msgid "I was more than a wee bit upset, and because I couldn't afford to order more PC parts, Gentoo development effectively halted. I became more and more pessimistic about Linux and decided to switch over to FreeBSD. Yes, FreeBSD. And that's where I'll end this installment -- see you in Part 3. :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):321 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):325 +msgid "Start at the beginning of my story with \"Making the distribution\", <uri link=\"/doc/en/articles/making-the-distro-p1.xml\">Part 1</uri>, and finish up with <uri link=\"/doc/en/articles/making-the-distro-p3.xml\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):330 +msgid "Find out more about <uri link=\"/index.xml\">Gentoo Linux</uri> from our Web site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):334 +msgid "Check out the competetion at <uri link=\"http://www.freebsd.org/\">FreeBSD</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):338 +msgid "Read up on the <uri link=\"http://www.gnu.org/copyleft/gpl.html\">GPL</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):341 +msgid "Take a look at the official <uri link=\"http://www.stampede.org/\">Stampede site</uri>." +msgstr "" + +#. <li> +#. Hang out on <uri +#. link="http://irc.openprojects.net/">irc.openprojects.net</uri>. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):349 +msgid "Find out more about the <uri link=\"http://www.xfree86.org/\">Free X86 Project</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):353 +msgid "Get the <uri link=\"http://developer.gnome.org/doc/API/gtk/\">GTK+ Reference Documentation</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):357 +msgid "Check out the <uri link=\"http://www.xmms.org/\">XMultiMedia System</uri>, an X11/gtk+-based MP3/CD player app." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):361 +msgid "Get started on threads with a <uri link=\"http://www.math.arizona.edu/swig/pthreads/threads.html\">POSIX Threads tutorial</uri> from the University of Arizona." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):366 +msgid "Get the latest on the <uri link=\"http://www.rpm.org/\">RPM Packaging Tool</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):370 +msgid "Visit the good folks at <uri link=\"http://www.debian.org/\">Debian</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):373 +msgid "And see the official <uri link=\"http://gcc.gnu.org/\">GCC</uri> site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):381 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):384 +msgid "Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a contributing author of several books published by MacMillan: Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade when he was first exposed to the Logo programming language and a potentially lethal dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife Mary and his new baby daughter, Hadassah. You can contact Daniel at <mail link=\"drobbins@gentoo.org\">drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/making-the-distro-p3.xml.pot b/article/gettext/making-the-distro-p3.xml.pot new file mode 100644 index 0000000..bbef601 --- /dev/null +++ b/article/gettext/making-the-distro-p3.xml.pot @@ -0,0 +1,263 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(guide:link):5 +msgid "/doc/en/articles/making-the-distro-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):6 +msgid "Making the distribution, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="fox2mike@gentoo.org">Shyam Mani</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(abstract):15 +msgid "This article concludes his story -- about how he ended up creating his own distribution called Gentoo Linux. He wraps up the series by telling how he left the Linux world to move to FreeBSD, and then came back to the Linux world, restarting Gentoo Linux development with a fresh perspective. In addition to comparing Linux and FreeBSD in a number of areas, he also describe current Gentoo Linux development progress and share a future vision for the distribution." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(version):30 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(date):31 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):34 +msgid "The author strays from Linux and then returns" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):38 +msgid "At the end of my <uri link=\"/doc/en/articles/making-the-distro-p2.xml\">previous article</uri>, I described how Gentoo Linux development had effectively been brought to a halt by a strange idle-lockup bug that I began experiencing as soon as I upgraded to a new dual-Celeron motherboard (an Abit BP6). Because I was unable to fix the problem, and at the time didn't have the funds to replace my motherboard, I decided to halt Gentoo Linux development and switch over to FreeBSD. I needed a working system, and since Linux was locking up all the time, this would be an excellent time to get familiar with a BSD operating system. So I installed FreeBSD, started learning, and didn't touch Linux at all for several months." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):54 +msgid "FreeBSD impressions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):57 +msgid "All in all, I really liked FreeBSD. I felt that the operating system was well put together and that nearly every part of the system had a consistently high-level of refinement that's almost never found in the Linux world. I enjoyed the fact that FreeBSD contained a full complement of man pages, unlike Linux where many programs only have GNU info documentation, which I don't particularly like using." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):66 +msgid "Most of all, I was impressed with FreeBSD's ports system, the technology used to maintain and upgrade the system. Unlike the Linux approach, ports didn't use binary packages but instead automatically compiled everything locally from their original sources. Whether you were installing Samba or upgrading the core system, everything was compiled right on your local machine. This approach appealed to me and was very similar to the one I had been creating under Gentoo Linux. In this and many other ways, FreeBSD's design agreed with my sensibilities as a developer and a system administrator. For this reason, FreeBSD provided a comfortable work environment for many months, and I'm glad I took the time to get familiar with this excellent operating system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):82 +msgid "FreeBSD pros" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):85 +msgid "A lot of the differences between Linux and FreeBSD come from their different development structures. Linux development is very decentralized, and we rely on distributions to pull in and unite the various pieces of Linux scattered throughout the Internet. Compare this to FreeBSD and the other BSDs (OpenBSD and NetBSD), where there's a unified development team plugging away at a single, unified set of sources. Well, at least each BSD has its own set of unified sources. This can be a good thing, and results in FreeBSD not having a \"patched together\" feel like many Linux distributions do." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):96 +msgid "Next, we can compare the technology under the hood. Many a FreeBSD fan will assert that FreeBSD is better suited to being a server than Linux is. They'll tell you that FreeBSD is better under high loads, and has a better TCP/IP stack. If you're comparing Linux 2.2 or earlier with FreeBSD, I'd have to agree. FreeBSD is a great server OS, that's for sure. But, that's just Linux 2.2 and earlier. I happen to be a big fan of the 2.4 test kernels that I've been running. They're really, really great and contain a nice TCP/IP stack and a totally redesigned \"netfilter\" system that really rocks. In the end, I think that Linux will be the one to set new performance standards and make free UNIX servers even more competitive versus their commercial counterparts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):112 +msgid "FreeBSD cons" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):115 +msgid "As for the desktop, rather than the server world, there's really no comparison -- Linux is where the action is. All the latest desktop developments appear on Linux first, and Linux is ahead in its support of accelerated 3D graphics and sound cards. With Linux 2.4 approaching, Linux will continue its dominance in this area." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):123 +msgid "The one thing I don't like about FreeBSD is its use of the UFS filesystem. While UFS is more reliable and rugged than ext2, it's also mind-numbingly slow. It's possible to use a special UFS extension called soft updates, which is able to speed up the filesystem by aggregating IO operations into bigger chunks. While soft updates improves UFS tremendously, I can't say that UFS really outperforms ext2 in any way. Of course, it's more reliable, so FreeBSD ends up beating Linux in the filesystem war. Again, at least this is true when comparing older Linux 2.2 distributions to FreeBSD." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):134 +msgid "However, the tables turn when we start to compare modern Linux 2.2 and Linux 2.4 to FreeBSD. ReiserFS (a new journalling filesystem available for Linux) is just amazing. Linux also has ext3, IBM's JFS, and XFS to look forward to, from which we expect excellent performance and reliability as well. As of now, ReiserFS gives Linux a major speed advantage over FreeBSD, and is one of the reasons I believe that Linux 2.4 overturns many of the old arguments of FreeBSD's superiority over Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):147 +msgid "Back to Gentoo Linux development" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):150 +msgid "After a few months, I decided to rejoin the Linux world and get Gentoo Linux running on a new development box. At first, the decision to restart Gentoo Linux development was more of a business decision -- I had invested a lot of my time in becoming Linux-knowledgeable, and it would be a waste to throw all this knowledge away by sticking with BSD. However, shortly after I began updating Gentoo Linux, I found several new reasons why Linux was worth switching back to, namely all the filesystem and kernel improvements mentioned above. FreeBSD was a peaceful home, but a little too boring, too staid. Linux is where the action was, where major progress was being made. There's no doubt that if you're looking for excitement and innovation, Linux is the place to be." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):163 +msgid "To me, the Linux 2.2 era was a disappointing letdown from the 2.0 era, but the 2.4 era promised to be worth the wait. So, Gentoo Linux was reborn, and I was excited." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):169 +msgid "There was another key to Gentoo Linux's rebirth -- Achim Gottinger, my development team lead. I want to take some space to thank Achim for helping me restart Gentoo Linux development. I started getting e-mails from Achim shortly before my return to the Linux world. In almost every e-mail, he'd include some new .ebuild (autobuild) scripts for Gentoo Linux, or some desperately needed bugfixes. As I restarted Gentoo Linux development, Achim continued to contribute his time and resources to help get the distribution back on its feet. Up until recently, Achim and I have been the only two people working on Gentoo Linux, and this has been by choice. Because we both have a similar vision for the distribution, and because of Achim's skill, we were able to get a tremendous amount of work done and I never really felt that adding a third developer would significantly help our progress. Now, Achim serves as the Gentoo Linux development lead, and continues to make major improvements to Gentoo Linux on an almost daily basis. We've reached the point where we're ready for others to start working on our CVS tree, and have begun to gradually and carefully expand the Gentoo Linux development team." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):191 +msgid "The new vision" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):194 +msgid "I don't feel that the time I spent in the BSD world was in any way wasted. In fact, it gave me a tremendous opportunity to reflect on the happenings in the entire Linux community and how Gentoo Linux could help to improve things." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):200 +msgid "In the new version of Gentoo Linux, I made the decision to not use pgcc anymore, nor use very high optimizations to compile all binaries. Since stability was paramount, we would use reasonable (\"-O2 -mpentium\") optimizations but provide an easy way for users to customize these optimizations to their liking by using our autobuild system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):208 +msgid "FreeBSD gave me a really good idea of how an autobuild system should function. I decided to add several FreeBSD features to make our autobuild system (now called Portage) a true next-generation ports system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):214 +msgid "Portage is the heart of Gentoo Linux, and is more than a simple package management or maintenance system. Consisting of a set of build tools and build scripts, Portage allows you to rebuild the entire distribution from original sources. But more importantly to me, Portage gives the user full access to the intelligence of how Gentoo Linux was built. To us, this is very important because it means that we are documenting how to build a distribution while at the same time moving Gentoo Linux development forward. And, because Portage is easy to use and understand, we hope that it will open up Linux internals to even more people, so that others can begin to contribute to our sources and scripts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):226 +msgid "Portage is our way of opening up Linux technology to others. By studying the autobuild scripts, you can see how all the various packages fit together into a unified whole. If necessary, you can grab our entire CVS tree and hack away at it, producing your own custom distribution or Linux-based technology. We believe that this is a good thing -- we want to give people the knowledge they need to take Linux into new realms." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):238 +msgid "Commercial concerns" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):241 +msgid "Since its inception, there have been many people of various backgrounds involved with Gentoo Linux development. And I wasn't surprised to find that our developers had wildly different opinions of how we should approach the money-making end of Gentoo Linux. Basically, there were two groups of developers: one group was generally opposed to money-making pursuits, while the other group was excited about helping Gentoo Linux become a successful commercial product. This was an expected split; the first group saw commercial involvement as a corrupting influence, while the second saw no such negative associations." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):253 +msgid "In the Enoch days, I used to waver on this issue and didn't really know the right approach. I recognized the fact that distributions like Debian were truly committed to free distribution of their software. I liked that. Compared to other commercial distributions, they made things easy for the user by providing detailed instructions on their Web site. That was a good thing, and something I wanted to emulate." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):262 +msgid "At the same time, I really wanted Gentoo Linux to be commercially successful. I struggled to find a balance, but never really found one until recently." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):270 +msgid "What to do?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):273 +msgid "So, how are we planning to balance commercial and non-commercial interests? The key is to remember our foundation -- the foundation of Gentoo Linux is Open Source software. Thus, the foundation for all our endeavors must focus on Open Source. It's not good enough to just acknowledge Open Source software, or just to use it. We must also encourage its development and distribution, and never oppose this stance for commercial gain. More importantly, we must never structure our business model so that there's a temptation to restrict the free distribution of our sources. Our development team needs to be open and accessible to the public, and free distribution of Gentoo Linux must not only be allowed, but encouraged. We need to be Open Source advocates, not just in word, but in action also." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):287 +msgid "If a company wants to use Gentoo Linux for a commercial Linux-based technology, they can just grab the contents of our CVS tree and start using it, since all our work is distributed under the GPL. We don't want to limit the use of our work in any way, except to ensure that all derivative products comply with the GNU Public License." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):295 +msgid "We'd like as many people as possible to benefit from our work, but we'd also like to benefit as much as possible from your improvements to Gentoo Linux. If you're part of a company using Gentoo Linux as a base for your product, we hope that you'll send any freely-distributable improvements to us so that we can add them to our CVS tree. That way, everyone benefits. We can continue to maintain and improve your additions, and you in turn can benefit from these improvements. We want to foster collaboration between commercial and non-commercial entities. This way, both the sysadmin using Gentoo Linux at his ISP and the corporation building a commercial server product can benefit from each other's improvements and fixes to Gentoo Linux. It's time to promote the free exchange of code between everyone. Only Open Source makes it possible." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):312 +msgid "What does the future hold?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):315 +msgid "Right now, we're at the verge of releasing Gentoo Linux 1.0 (it may be available by the time you read this article on developerWorks.) But what does the future hold?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):321 +msgid "As we move towards 2.0, I hope to continue to improve Portage, the technology at the heart of Gentoo Linux. Any major improvement to Gentoo Linux generally starts with an improvement to Portage. I'd like to continue the process of converting the majority of the code from bash to python, which will allow us to add new features like object-oriented design to our autobuild system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):329 +msgid "In addition to changes to Portage, I hope to continue to slowly and carefully grow our development team by finding skilled developers who share our same vision. As our development team grows, we will be able to vastly expand the number of autobuild scripts available for Gentoo Linux. But even more important than this, a slightly larger development team will give us the resources we need to continue to keep Gentoo Linux on the cutting edge of Linux technology. That's where the fun is :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):339 +msgid "We also hope that commercial Linux technology companies will choose Gentoo Linux as a base for their products. We currently have one such relationship and we hope to have many more in the future. These kinds of collaborations promise to be lots of fun and to be a great benefit to all Gentoo Linux users." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):346 +msgid "In the end, our primary goal is to contribute something meaningful to the Linux community. Although there are many Linux distributions to choose from, we know that Gentoo Linux offers something that really isn't available anywhere else. We're excited about the future of Gentoo Linux development, and we hope you are too." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):357 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):361 +msgid "Start at the beginning of my story with \"Making the distribution\", <uri link=\"/doc/en/articles/making-the-distro-p1.xml\"> Part 1</uri>, and <uri link=\"/doc/en/articles/making-the-distro-p2.xml\">Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):366 +msgid "Find out more about <uri link=\"/index.xml\">Gentoo Linux</uri> from our Web site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):370 +msgid "Check out the competetion at <uri link=\"http://www.freebsd.org/\">FreeBSD</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):374 +msgid "Read up on the <uri link=\"http://www.gnu.org/copyleft/gpl.html\">GPL</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):377 +msgid "Take a look at the official <uri link=\"http://www.stampede.org/\">Stampede site</uri>." +msgstr "" + +#. <li> +#. Hang out on <uri +#. link="http://irc.openprojects.net/">irc.openprojects.net</uri>. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):385 +msgid "Find out more about the <uri link=\"http://www.xfree86.org/\">Free X86 Project</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):389 +msgid "Get the <uri link=\"http://developer.gnome.org/doc/API/gtk/\">GTK+ Reference Documentation</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):393 +msgid "Check out the <uri link=\"http://www.xmms.org/\">XMultiMedia System</uri>, an X11/gtk+-based MP3/CD player app." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):397 +msgid "Get started on threads with a <uri link=\"http://www.math.arizona.edu/swig/pthreads/threads.html\">POSIX Threads tutorial</uri> from the University of Arizona." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):402 +msgid "Get the latest on the <uri link=\"http://www.rpm.org/\">RPM Packaging Tool</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):406 +msgid "Visit the good folks at <uri link=\"http://www.debian.org/\">Debian</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):409 +msgid "And see the official <uri link=\"http://gcc.gnu.org/\">GCC</uri> site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):417 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):420 +msgid "Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a contributing author of several books published by MacMillan: Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade when he was first exposed to the Logo programming language and a potentially lethal dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife Mary and his new baby daughter, Hadassah. You can contact Daniel at <mail link=\"drobbins@gentoo.org\">drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/maximum-swappage.xml.pot b/article/gettext/maximum-swappage.xml.pot new file mode 100644 index 0000000..fcc702f --- /dev/null +++ b/article/gettext/maximum-swappage.xml.pot @@ -0,0 +1,171 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(guide:link):5 +msgid "/doc/en/articles/maximum-swappage.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(title):6 +msgid "Maximum swappage" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(abstract):15 +msgid "Learn how to improve the swap performance on your Linux server by several orders of magnitude. Author Daniel Robbins takes you through this quick tip on getting the most from your server." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(version):26 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(date):27 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(title):30 +msgid "Getting the most out of swap" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):34 +msgid "When you set up a brand new Linux server, do you create a single 128 MB swap partition? If so, did you know that you are severely limiting swap performance? Would you like to increase swap performance by several orders of magnitude, and to create swap partitions larger than 1 GB? It's possible, requiring no kernel patches or special hardware, just pure geek know-how!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):42 +msgid "Some of you may not really care about swap. After all, Linux systems are typically very memory efficient, and swap is often barely touched. While often true on desktop systems, servers are another story. Because servers may handle unexpected stresses, such as runaway processes, denial of service attacks, or even the Slashdot effect, they need to have adequate high-speed swap so that they do not grind to a halt and possibly crash when all physical memory (and then some) is exhausted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):52 +msgid "Still not convinced that this is a big deal? I'll show you how easy it is to bring down a server by launching a massive amount of new processes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(warn):57 +msgid "Please, if you try this, do it only on a non-production server that you actually administer!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):62 +msgid "Let's say you have two customized <c>grep</c> commands in <path>/usr/bin</path>, called <c>bobgrep</c> and <c>jimgrep</c>. Now, let's assume that <c>bobgrep</c> is simply a shell script that calls the ELF executable <c>jimgrep</c>, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(pre:caption):69 +msgid "The bobgrep script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(pre):69 +#, no-wrap +msgid "\n#!/bin/bash\njimgrep -r $*\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):74 +msgid "Everything looks good so far, but what happens if <c>jimgrep</c> gets accidentally replaced with a symbolic link to <c>bobgrep</c>? Well, in that case, calling <c>bobgrep</c> or <c>jimgrep</c> will cause an infinite loop, causing hundreds of bash processes to be spawned in mere seconds. This actually happened to me once, and believe me, it hurt!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):82 +msgid "If a server doesn't have adequate swap, a situation like this can cause the machine to lock up in much less than a minute. How do we fix the problem? One way is to increase the swap size beyond 128 MB. Fortunately for us, there is absolutely no 128 MB limit on swap under Linux 2.2.x+ and later kernels, as there was in the past. The current limits are approximately 2 GB on x86, PowerPC, and MC680x0 systems, 512 MB on MIPS systems, 128 GB on Alpha, and a whopping 3 terabytes on UltraSparc platforms!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(pre:caption):92 +msgid "Swap partition size limits under modern Linux kernels" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(pre):92 +#, no-wrap +msgid "\nx86 2 Gigabytes\nPowerPC 2 Gigabytes\nMotorola 680x0 2 Gigabytes\nSparc 1 Gigabyte\nMIPS 512 Megabytes\nAlpha 128 Gigabytes\nUltraSparc 3 Terabytes\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):102 +msgid "While it's nice to be able to increase swap partition size to beyond 128 MB, how about increasing performance? Ideally, it would be nice if we could set up swap partitions in a RAID 0 stripe, so that reads and writes are equally distributed between all partitions. If these partitions are on separate drives and/or controllers, this will multiply swap file performance, allowing your servers to handle temporary memory usage \"spikes\" without getting dramatically bogged down." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):112 +msgid "Amazingly, all modern Linux kernels, by default (with no special kernel options or patches) allow you to parallelize swap, just like a RAID 0 stripe. By using the <c>pri</c> option in <path>/etc/fstab</path> to set multiple swap partitions to the same priority, we tell Linux to use them in parallel:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(pre:caption):119 +msgid "Set multiple swap partitions to the same priority" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(pre):119 +#, no-wrap +msgid "\n/dev/sda2 none swap sw,pri=3 0 0\n/dev/sdb2 none swap sw,pri=3 0 0\n/dev/sdc2 none swap sw,pri=3 0 0\n/dev/sdd2 none swap sw,pri=1 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):126 +msgid "In the above example, Linux will use swap partitions sda2, sdb2, and sdc2 in parallel. Since these partitions are on different drives, and possibly even different SCSI controllers, read and write throughput will nearly triple. The fourth swap partition, sdd2, will be used only after the first three partitions have been exhausted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):134 +msgid "The <c>pri</c> option is really easy to use. The priority must be a number between 0 and 32767, with 32767 being the highest priority. The swap partitions will be used from highest priority to lowest priority, meaning that a partition with a priority of x will only be used only if all partitions with a priority greater than x are already full. If several partitions have the same priority, Linux will automatically parallelize access between them. This allows you to not only parallelize swap, but also prioritize access so that the partitions on the fastest drives (or regions of the drives) are used first. So, you can set up an emergency swap partition on an old, slower drive that will be used only if all high-speed swap is exhausted first." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):147 +msgid "Now it's time to put some of this swapping knowledge into action. To loosely quote Mr. Miyagi of Karate Kid fame: \"Swap on, swap off, geek-san!\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(title):155 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(li):159 +msgid "In <uri link=\"/doc/en/articles/partitioning-p1.xml\">Partitioning in action: Moving /home</uri>, I show you step-by-step how to move <path>/home</path> to a new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(li):164 +msgid "In <uri link=\"/doc/en/articles/partitioning-p2.xml\">Partitioning in action</uri>, I show you step-by-step how to move <path>/var</path> and <path>/tmp</path> to a new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(li):169 +msgid "In my second tip, <uri link=\"/doc/en/articles/partition-planning-tips.xml\">Partition planning tips</uri>, I share several ways of effectively organizing your partition layout." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(li):175 +msgid "The <uri link=\"http://www.redhat.com/mirrors/LDP/LDP/sag/index.html\">Linux system administrator's guide</uri> mirrored on Red Hat's home page." +msgstr "" + +#. Link doesn't work anymore, commenting for the time being - fox2mike +#. <li> +#. A good high-level <uri link="http://www.gwdg.de/gs-2.0/chapter2_6.html"> +#. overview of Linux system administration</uri>. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(li):185 +msgid "For more information on optimizing file system performance, take a look at Linas Vepstas' <uri link=\"http://www.tldp.org\">Linux Software RAID HOWTO</uri>. Since the most recent software RAID code has been merged into the 2.3 series kernels, it is a viable option for further enhancing Linux disk performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(title):197 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):200 +msgid "Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a contributing author of several books published by MacMillan: Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade when he was first exposed to the Logo programming language and a potentially lethal dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife Mary and his new baby daughter, Hadassah. You can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/openssh-key-management-p1.xml.pot b/article/gettext/openssh-key-management-p1.xml.pot new file mode 100644 index 0000000..460d7ec --- /dev/null +++ b/article/gettext/openssh-key-management-p1.xml.pot @@ -0,0 +1,314 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):6 +msgid "OpenSSH key management, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(author:title):7 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(mail:link):8 +msgid "drobbins" +msgstr "" + +#. xmlified by Max Lorenz (anarchyisgoodforthee@gmail.com) +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(abstract):12 +msgid "In this series, you'll learn how RSA and DSA authentication work, and see how to set up passwordless authentication the right way. In the first article of the series, Daniel Robbins focuses on introducing the RSA and DSA authentication protocols and showing you how to get them working over the network." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(version):25 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(date):26 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):29 +msgid "Understanding RSA/DSA authentication" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):33 +msgid "Many of us use the excellent OpenSSH (see <uri link=\"#resources\">Resources</uri> later in this article) as a secure, encrypted replacement for the venerable <c>telnet</c> and <c>rsh</c> commands. One of OpenSSH's more intriguing features is its ability to authenticate users using the RSA and DSA authentication protocols, which are based on a pair of complementary numerical keys. As one of its main appeals, RSA and DSA authentication promise the capability of establishing connections to remote systems <e>without supplying a password</e>. While this is appealing, new OpenSSH users often configure RSA/DSA the quick and dirty way, resulting in passwordless logins, but opening up a big security hole in the process." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):49 +msgid "What is RSA/DSA authentication?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):52 +msgid "SSH, specifically OpenSSH (a completely free implementation of SSH), is an incredible tool. Like <c>telnet</c> or <c>rsh</c>, the ssh client can be used to log in to a remote machine. All that's required is for this remote machine to be running <c>sshd</c>, the <c>ssh</c> server process. However, unlike <c>telnet</c>, the ssh protocol is very secure. It uses special algorithms to encrypt the data stream, ensure data stream integrity and even perform authentication in a safe and secure way." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):62 +msgid "However, while <c>ssh</c> is really great, there is a certain component of <c>ssh</c> functionality that is often ignored, dangerously misused, or simply misunderstood. This component is OpenSSH's RSA/DSA key authentication system, an alternative to the standard secure password authentication system that OpenSSH uses by default." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):70 +msgid "OpenSSH's RSA and DSA authentication protocols are based on a pair of specially generated cryptographic keys, called the <e>private key</e> and the <e>public key</e>. The advantage of using these key-based authentication systems is that in many cases, it's possible to establish secure connections without having to manually type in a password." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):78 +msgid "While the key-based authentication protocols are relatively secure, problems arise when users take certain shortcuts in the name of convenience, without fully understanding their security implications. In this article, we'll take a good look at how to correctly use RSA and DSA authentication protocols without exposing ourselves to any unnecessary security risks. In my next article, I'll show you how to use <c>ssh-agent</c> to cache decrypted private keys, and introduce <c>keychain</c>, an <c>ssh-agent</c> front-end that offers a number of convenience advantages without sacrificing security. If you've always wanted to get the hang of the more advanced authentication features of OpenSSH, then read on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):94 +msgid "How RSA/DSA keys work" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):97 +msgid "Here's a quick general overview of how RSA/DSA keys work. Let's start with a hypothetical scenario where we'd like to use RSA authentication to allow a local Linux workstation (named <e>localbox</e>) to open a remote shell on <e>remotebox</e>, a machine at our ISP. Right now, when we try to connect to <e>remotebox</e> using the <c>ssh</c> client, we get the following prompt:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):105 +msgid "Connecting to remotebox" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):105 +#, no-wrap +msgid "\n$ <i>ssh drobbins@remotebox</i>\ndrobbins@remotebox's password:\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):110 +msgid "Here we see an example of the <c>ssh</c><e>default</e> way of handling authentication. Namely, it asks for the password of the <e>drobbins</e> account on <e>remotebox</e>. If we type in our password for <e>remotebox</e>, <c>ssh</c> uses its secure password authentication protocol, transmitting our password over to <e>remotebox</e> for verification. However, unlike what <c>telnet</c> does, here our password is encrypted so that it can not be intercepted by anyone sniffing our data connection. Once <e>remotebox</e> authenticates our supplied password against its password database, if successful, we're allowed to log on and are greeted with a <e>remotebox</e> shell prompt. While the <c>ssh</c> default authentication method is quite secure, RSA and DSA authentication open up some new possibilities." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):124 +msgid "However, unlike the <c>ssh</c> secure password authentication, RSA authentication requires some initial configuration. We need to perform these initial configuration steps only once. After that, RSA authentication between <e>localbox</e> and <e>remotebox</e> will be totally painless. To set up RSA authentication, we first need to generate a pair of keys, one private and one public. These two keys have some very interesting properties. The public key can be used to encrypt a message, and only the holder of the private key can decrypt it. The public key can only be used for <e>encryption</e>, and the private key can only be used for <e>decryption</e> of a message encoded by the matching public key. The RSA (and DSA) authentication protocols use the special properties of key pairs to perform secure authentication, without needing to transmit any confidential information over the network." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):139 +msgid "To get RSA or DSA authentication working, we perform a single one-time configuration step. We copy our <e>public key</e> over to <e>remotebox</e>. The public key is called \"public\" for a reason. Since it can only be used to <e>encrypt</e> messages for us, we don't need to be too concerned about it falling into the wrong hands. Once our public key has been copied over to <e>remotebox</e> and placed in a special file (<path>~/.ssh/authorized_keys</path>) so that <e>remotebox</e>'s <c>sshd</c> can locate it, we're ready to use RSA authentication to log onto <e>remotebox</e>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):151 +msgid "To do this, we simply type <c>ssh drobbins@remotebox</c> at <e>localbox</e>'s console, as we always have. However, this time, <c>ssh</c> lets <e>remotebox</e>'s <c>sshd</c> know that it would like to use the RSA authentication protocol. What happens next is rather interesting. <e>Remotebox</e>'s <c>sshd</c> generates a random number, and encrypts it using our public key that we copied over earlier. Then, it sends this encrypted random number back to the <c>ssh</c> running on <e>localbox</e>. In turn, our <c>ssh</c> uses our <e>private key</e> to decrypt this random number, and then sends it back to <e>remotebox</e>, saying in effect \"See, I really <e>do</e> hold the matching private key; I was able to successfully decrypt your message!\" Finally, <c>sshd</c> concludes that we should be allowed to log in, since we hold a matching private key. Thus, the fact that we hold a matching private key grants us access to <e>remotebox</e>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):170 +msgid "Two observations" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):173 +msgid "There are two important observations about the RSA and DSA authentication. The first is that we really only need to generate one pair of keys. We can then copy our public key to the remote machines that we'd like to access and they will all happily authenticate against our single private key. In other words, we don't need a key pair for <e>every</e> system we'd like to access. Just one pair will suffice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):182 +msgid "The other observation is that our <e>private key should not fall into the wrong hands</e>. The private key is the one thing that grants us access to our remote systems, and anyone that possesses our private key is granted exactly the same privileges that we are. Just as we wouldn't want strangers to have keys to our house, we should protect our private key from unauthorized use. In the world of bits and bytes, this means that no one should be able to read or copy our private key." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):192 +msgid "Of course, the <c>ssh</c> developers are aware of the private keys' importance, and have built a few safeguards into <c>ssh</c> and <c>ssh-keygen</c> so that our private key is not abused. First, <c>ssh</c> is configured to print out a big warning message if our key has file permissions that would allow it to be read by anyone but us. Secondly, when we create our public/private key pair using <c>ssh-keygen</c>, <c>ssh-keygen</c> will ask us to enter a passphrase. If we do, our private key will be encrypted using this passphrase, so that even if it is stolen, it will be useless to anyone who doesn't happen to know the passphrase. Armed with that knowledge, let's take a look at how to configure <c>ssh</c> to use the RSA and DSA authentication protocols." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):208 +msgid "ssh-keygen up close" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):211 +msgid "The first step in setting up RSA authentication begins with generating a public/private key pair. RSA authentication is the original form of <c>ssh</c> key authentication, so RSA should work with any version of OpenSSH, although I recommend that you install the most recent version available, which was openssh-2.9_p2 at the time this article was written. Generate a pair of RSA keys as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):220 +msgid "Using ssh-keygen" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):220 +#, no-wrap +msgid "\n$ <i>ssh-keygen</i>\nGenerating public/private rsa1 key pair.\nEnter file in which to save the key (/home/drobbins/.ssh/identity): <comment>(hit enter)</comment>\nEnter passphrase (empty for no passphrase): <comment>(enter a passphrase)</comment>\nEnter same passphrase again: <comment>(enter it again)</comment>\nYour identification has been saved in /home/drobbins/.ssh/identity.\nYour public key has been saved in /home/drobbins/.ssh/identity.pub.\nThe key fingerprint is:\na4:e7:f2:39:a7:eb:fd:f8:39:f1:f1:7b:fe:48:a1:09 drobbins@localbox\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):232 +msgid "When <c>ssh-keygen</c> asks for a default location for the key, we hit enter to accept the default of <path>/home/drobbins/.ssh/identity</path>. <c>ssh-keygen</c> will store the private key at the above path, and the <e>public</e> key will be stored right next to it, in a file called identity.pub." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):240 +msgid "Also note that <c>ssh-keygen</c> prompted us to enter a passphrase. When prompted, we entered a good passphrase (seven or more hard-to-predict characters). <c>ssh-keygen</c> then encrypted our private key (<path>~/.ssh/identity</path>) using this passphrase so that our private key will be useless to anyone who does not know it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):251 +msgid "The quick compromise" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):254 +msgid "When we specify a passphrase, it allows <c>ssh-keygen</c> to secure our private key against misuse, but it also creates a minor inconvenience. Now, every time we try to connect to our <e>drobbins@remotebox</e> account using <c>ssh</c>, <c>ssh</c> will prompt us to enter the passphrase so that it can decrypt our private key and use it for RSA authentication. Again, we won't be typing in our password for the <e>drobbins</e> account on <e>remotebox</e>, we'll be typing in the passphrase needed to locally decrypt our private key. Once our private key is decrypted, our <c>ssh</c> client will take care of the rest. While the mechanics of using our remote password and the RSA passphrase are completely different, in practice we're still prompted to type a \"secret phrase\" into <c>ssh</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):268 ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):285 +msgid "Logging in with passphrase" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):268 +#, no-wrap +msgid "\n$ <i>ssh drobbins@remotebox</i>\nEnter passphrase for key '/home/drobbins/.ssh/identity': <comment>(enter passphrase)</comment>\nLast login: Thu Jun 28 20:28:47 2001 from localbox.gentoo.org \n\nWelcome to remotebox!\n\n$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):278 +msgid "Here's where people are often mislead into a quick compromise. A lot of the time, people will create unencrypted private keys just so that they don't need to type in a password. That way, they simply type in the ssh command, and they're immediately authenticated via RSA (or DSA) and logged in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):285 +#, no-wrap +msgid "\n$ <i>ssh drobbins@remotebox</i>\nLast login: Thu Jun 28 20:28:47 2001 from localbox.gentoo.org \n\nWelcome to remotebox!\n\n$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):294 +msgid "However, while this is convenient, you shouldn't use this approach without fully understanding its security impact. With an unencrypted private key, if anyone ever hacks into <e>localbox</e>, they'll also get automatic access to <e>remotebox</e> and any other systems that have been configured with the public key." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):302 +msgid "I know what you're thinking. Passwordless authentication, despite being a bit risky does seem really appealing. I totally agree. But <e>there is a better way!</e> Stick with me, and I'll show you how to gain the benefits of passwordless authentication without compromising your private key security. I'll show you how to masterfully use <c>ssh-agent</c> (the thing that makes <e>secure</e> passwordless authentication possible in the first place) in my next article. Now, let's get ready to use <c>ssh-agent</c> by setting up RSA and DSA authentication. Here step-by-step directions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):316 +msgid "RSA key pair generation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):319 +msgid "To set up RSA authentication, we'll need to perform the one-time step of generating a public/private key pair. We do this by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):324 +msgid "Generating keys..." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):324 +#, no-wrap +msgid "\n$ <i>ssh-keygen</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):328 +msgid "Accept the default key location when prompted (typically <path>~/.ssh/identity</path> and <path>~/.ssh/identity.pub</path> for the public key), and provide <c>ssh-keygen</c> with a secure passphrase. Once <c>ssh-keygen</c> completes, you'll have a public key as well as a passphrase-encrypted private key." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):339 +msgid "RSA public key install" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):342 +msgid "Next, we'll need to configure remote systems running <c>sshd</c> to use our <e>public</e> RSA key for authentication. Typically, this is done by copying the public key to the remote system as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):348 +msgid "Copying the public key" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):348 +#, no-wrap +msgid "\n$ <i>scp ~/.ssh/identity.pub drobbins@remotebox:</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):352 +msgid "Since RSA authentication isn't fully set up yet, we'll be prompted to enter our password on <e>remotebox</e>. Do so. Then, log in to <e>remotebox</e> and append the public key to the <path>~/.ssh/authorized_keys</path> file like so:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):358 +msgid "Installing the public key" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):358 +#, no-wrap +msgid "\n$ <i>ssh drobbins@remotebox</i>\ndrobbins@remotebox's password: <comment>(enter password)</comment>\nLast login: Thu Jun 28 20:28:47 2001 from localbox.gentoo.org \n\nWelcome to remotebox!\n\n$ <i>cat identity.pub >> ~/.ssh/authorized_keys</i>\n$ <i>exit</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):369 +msgid "Now, with RSA authentication configured, we should be prompted to enter our RSA <e>passphrase</e> (rather than our <e>password</e>) when we try to connect to <e>remotebox</e> using <c>ssh</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):375 +msgid "Logging in with pubkey authentication" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):375 +#, no-wrap +msgid "\n$ <i>ssh drobbins@remotebox</i>\nEnter passphrase for key '/home/drobbins/.ssh/identity': \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):380 +msgid "Hurray, RSA authentication configuration complete! If you weren't prompted for a passphrase, here are a few things to try. First, try logging in by typing <c>ssh -1 drobbins@remotebox</c>. This will tell ssh to only use version 1 of the ssh protocol, and may be required if for some reason the remote system is defaulting to DSA authentication. If that doesn't work, make sure that you don't have a line that reads <c>RSAAuthentication no</c> in your <path>/etc/ssh/ssh_config</path>. If you do, comment it out by pre-pending it with a \"#\". Otherwise, try contacting the <e>remotebox</e> system administrator and verifying that they have enabled RSA authentication on their end and have the appropriate settings in <path>/etc/ssh/sshd_config</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):396 +msgid "DSA key generation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):399 +msgid "While RSA keys are used by version 1 of the <c>ssh</c> protocol, DSA keys are used for protocol level 2, an updated version of the <c>ssh</c> protocol. Any modern version of OpenSSH should be able to use both RSA and DSA keys. Generating DSA keys using OpenSSH's <c>ssh-keygen</c> can be done similarly to RSA in the following manner:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):407 +msgid "Generating a DSA key pair" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):407 +#, no-wrap +msgid "\n$ <i>ssh-keygen -t dsa</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):411 +msgid "Again, we'll be prompted for a passphrase. Enter a secure one. We'll also be prompted for a location to save our DSA keys. The default, normally <path>~/.ssh/id_dsa</path> and <path>~/.ssh/id_dsa.pub</path>, should be fine. After our one-time DSA key generation is complete, it's time to install our DSA public key to remote systems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):422 +msgid "DSA public key install" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):425 +msgid "Again, DSA public key installation is almost identical to RSA. For DSA, we'll want to copy our <path>~/.ssh/id_dsa.pub</path> file to <e>remotebox</e>, and then append it to the <path>~/.ssh/authorized_keys2</path> on <e>remotebox</e>. Note that this file has a different name than the RSA <path>authorized_keys</path> file. Once configured, we should be able to log in to <e>remotebox</e> by typing in our DSA private key passphrase rather than typing in our actual <e>remotebox</e> password." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(note):435 +msgid "Nowadays you should only use version 2 of the ssh protocol, as version 1 has weaknesses." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):443 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):446 +msgid "Right now, you should have RSA or DSA authentication working, but you still need to type in your passphrase for every new connection. In my next article, we'll see how to use <c>ssh-agent</c>, a really nice system that allows us to establish connections <e>without</e> supplying a password, but also allows us to keep our private keys encrypted on disk. I'll also introduce <c>keychain</c>, a very handy <c>ssh-agent</c> front-end that makes <c>ssh-agent</c> even more secure, convenient, and fun to use. Until then, check out the handy resources below to keep yourself on track." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):461 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(li):466 +msgid "Read Daniel's other two articles in this series, <uri link=\"/doc/en/articles/openssh-key-management-p2.xml\">OpenSSH key management, Part 2</uri> and <uri link=\"/doc/en/articles/openssh-key-management-p3.xml\">OpenSSH key management, Part 3</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(li):473 +msgid "Be sure to visit the home of <uri link=\"http://www.openssh.com\">OpenSSH</uri> development." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(li):477 +msgid "Check out the <uri link=\"http://www.openssh.com/faq.html\">OpenSSH FAQ</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(li):481 +msgid "<uri link=\"http://www.chiark.greenend.org.uk/~sgtatham/putty/\">PuTTY</uri> is an excellent <c>ssh</c> client for Windows machines." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(li):485 +msgid "You may find O'Reilly's <e>SSH, The Secure Shell: The Definitive Guide</e> to be helpful. The <uri link=\"http://www.snailbook.com/\">authors' site</uri> contains information about the book, a FAQ, news, and updates." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/openssh-key-management-p2.xml.pot b/article/gettext/openssh-key-management-p2.xml.pot new file mode 100644 index 0000000..8c92a9e --- /dev/null +++ b/article/gettext/openssh-key-management-p2.xml.pot @@ -0,0 +1,303 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(guide:link):5 +msgid "/doc/en/articles/openssh-key-management-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):6 +msgid "OpenSSH key management, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(abstract):12 +msgid "Many developers use the excellent OpenSSH as a secure, encrypted replacement for the venerable telnet and rsh commands. One of OpenSSH's more intriguing features is its ability to authenticate users using the RSA and DSA authentication protocols, which are based upon a pair of complementary numerical \"keys\". One of the main appeals of RSA and DSA authentication is the promise of being able to establish connections to remote systems without supplying a password. In this second article, Daniel introduces ssh-agent (a private key cache) and keychain, a special bash script designed to make key-based authentication incredibly convenient and flexible." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(version):29 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(date):30 +msgid "2010-10-19" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):33 +msgid "Introducing ssh-agent and keychain" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):35 +msgid "Introducing ssh-agent" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):38 +msgid "ssh-agent, included with the OpenSSH distribution, is a special program designed to make dealing with RSA and DSA keys both pleasant and secure (see Part 1 of this series for an introduction to RSA and DSA authentication.) ssh-agent, unlike ssh, is a long-running daemon designed for the sole purpose of caching your decrypted private keys." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):46 +msgid "ssh includes built-in support that allows it to communicate with ssh-agent, allowing ssh to acquire your decrypted private keys without prompting you for a password for every single new connection. With ssh-agent you simply use ssh-add to add your private keys to ssh-agent's cache. It's a one-time process; after using ssh-add, ssh will grab your private key from ssh-agent, rather than bugging you by prompting for a passphrase." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):58 +msgid "Using ssh-agent" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):61 +msgid "Let's take a look at how this whole ssh-agent key caching system works. When ssh-agent starts up, it spits out a few important environment variables before detaching from the shell and continuing to run in the background. Here's some example output generated by ssh-agent when it begins:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):68 +msgid "Running ssh-agent daemon" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):68 +#, no-wrap +msgid "\n$ <i>ssh-agent</i>\nSSH_AUTH_SOCK=/tmp/ssh-XX4LkMJS/agent.26916; export SSH_AUTH_SOCK;\nSSH_AGENT_PID=26917; export SSH_AGENT_PID;\necho Agent pid 26917;\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):75 +msgid "As you can see, ssh-agent's output is actually a series of bash commands; if executed, these commands would set a couple of environment variables, SSH_AUTH_SOCK and SSH_AGENT_PID. Due to the included export commands, these environment variables would be made available to any additional commands run later. Well, all that would happen if these lines were actually evaluated by the shell, but right now they're simply printed to stdout. To fix this, we can invoke ssh-agent in the following way:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):85 +msgid "Different way of invoking ssh-agent" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):85 +#, no-wrap +msgid "\n$ <i>eval `ssh-agent`</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):89 +msgid "This command tells bash to run ssh-agent and then evaluate ssh-agent's output. Invoked this way (with back-quotes, not normal single quotes), the SSH_AGENT_PID and SSH_AUTH_SOCK variables get set and exported by your shell, making these variables available to any new processes you may start during your login session." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):97 +msgid "The best way to start ssh-agent is to add the above line to your <path>~/.bash_profile</path>; that way, all programs started in your login shell will see the environment variables, be able to locate ssh-agent and query it for keys as needed. The environment variable of particular importance is SSH_AUTH_SOCK; the SSH_AUTH_SOCK contains a path to a UNIX domain socket that ssh and scp can use to establish a dialogue with ssh-agent." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):109 +msgid "Using ssh-add" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):112 +msgid "But of course, ssh-agent starts up with an empty cache of decrypted private keys. Before we can really use ssh-agent, we first need to add add our private key(s) to ssh-agent's cache using the ssh-add command. In the following example, I use ssh-add to add my <path>~/.ssh/identity</path> private RSA key to ssh-agent's cache:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):120 +msgid "Loading private RSA key to ssh-agent's cache" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):120 +#, no-wrap +msgid "\n$ <i>ssh-add ~/.ssh/identity</i>\nNeed passphrase for /home/drobbins/.ssh/identity\nEnter passphrase for /home/drobbins/.ssh/identity \n(enter passphrase)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):127 +msgid "As you can see, ssh-add asked for my passphrase so that the private key can be decrypted and stored in ssh-agent's cache, ready for use. Once you've used ssh-add to add your private key (or keys) to ssh-agent's cache and SSH_AUTH_SOCK is defined in your current shell (which it should be, if you started ssh-agent from your ~/.bash_profile), then you can use scp and ssh to establish connections with remote systems without supplying your passphrase." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):139 +msgid "Limitations of ssh-agent" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):142 +msgid "ssh-agent is really cool, but its default configuration still leaves us with a few minor inconveniences. Let's take a look at them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):147 +msgid "For one, with <c>eval `ssh-agent`</c> in <path>~/.bash_profile</path>, a new copy of ssh-agent is launched for every login session; not only is this a tad bit wasteful, but it also means that you need to use ssh-add to add a private key to each new copy of ssh-agent. If you only open a single terminal or console on your system, this is no big deal, but most of us open quite a few terminals and need to type in our passphrase every single time we open a new console. Technically, there's no reason why we should need to do this since a single ssh-agent process really should suffice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):158 +msgid "Another problem with the default ssh-agent setup is that it's not compatible with cron jobs. Since cron jobs are started by the cron process, they won't inherit the SSH_AUTH_SOCK variable from their environment, and thus won't know that a ssh-agent process is running or how to contact it. It turns out that this problem is also fixable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):169 +msgid "Enter keychain" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):172 +msgid "To solve these problems, I wrote a handy bash-based ssh-agent front-end called keychain. What makes keychain special is the fact that it allows you to use a single ssh-agent process per system, not just per login session. This means that you only need to do one ssh-add per private key, period. As we'll see in a bit, keychain even helps to optimize the ssh-add process by only trying to add private keys that aren't already in the running ssh-agent's cache." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):181 +msgid "Here's a run-through of how keychain works. When started from your <path>~/.bash_profile</path>, it will first check to see whether an ssh-agent is already running. If not, then it will start ssh-agent and record the important SSH_AUTH_SOCK and SSH_AGENT_PID variables in the <path>~/.keychain/<hostname>-sh</path> file for safe keeping and later use. Here's the best way to start keychain; like using plain old ssh-agent, we perform the necessary setup inside <path>~/.bash_profile</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):191 +msgid "Settings for ssh-agent in ~/.bash_profile" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):191 +#, no-wrap +msgid "\n#!/bin/bash\n\n<comment># example ~/.bash_profile file</comment>\n/usr/bin/keychain ~/.ssh/id_rsa\n\n<comment># redirect ~/.keychain/ output to /dev/null to zap the annoying\n# \"Agent PID\" message</comment>\nsource ~/.keychain/<hostname>-sh > /dev/null\n\n<comment># the environment variables are stored using a hostname-shell file,\n# so replace <hostname> with your hostname, and the standard \"sh\" with\n# \"csh\" or \"fish\" if you use either of those shells</comment>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):206 +msgid "As you can see, with keychain we source the <path>~/.keychain/<hostname>-sh</path> file rather than evaluating output as we did when using ssh-agent directly. However, the result is the same -- our ever-important SSH_AUTH_SOCK is defined, and ssh-agent is running and ready for use. And because SSH_AUTH_SOCK is recorded in <path>~/.keychain/</path>, our own shell scripts and cron jobs can easily connect with ssh-agent just by sourcing the <path>~/.keychain/<hostname>-sh</path> file. keychain itself also takes advantage of this file; you'll remember that when keychain starts up, it checks to see whether an existing ssh-agent is running. If so, it uses the appropriate file in <path>~/.keychain/</path> to acquire the proper SSH_AUTH_SOCK setting, thus allowing it to use the existing agent rather than starting a new one. keychain will start a new ssh-agent process only if the <path>~/.keychain/</path> file is stale (points to a non-existent ssh-agent) or if <path>~/.keychain/</path> itself does not exist." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):226 ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):233 +msgid "Installing keychain" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):229 +msgid "Installing keychain is easy:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):233 +#, no-wrap +msgid "\n# <i>emerge keychain</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):237 +msgid "Now that keychain is in <path>/usr/bin/</path>, add it to your <path>~/.bash_profile</path>, supplying paths to your private keys as arguments. Here's a good standard keychain-enabled <path>~/.bash_profile</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):244 +msgid "Enabling keychain in ~/.bash_profile" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):244 +#, no-wrap +msgid "\n#!/bin/bash\n\n<comment># on this next line, we start keychain and point it to the private keys that\n# we'd like it to cache</comment>\n/usr/bin/keychain ~/.ssh/id_rsa ~/.ssh/id_dsa\n\n<comment># the environment variables are stored using a hostname-shell file,\n# so replace <hostname> with your hostname, and the standard \"sh\" with\n# \"csh\" or \"fish\" if you use either of those shells</comment>\nsource ~/.keychain/<hostname>-sh > /dev/null\n\n<comment># sourcing ~/.bashrc is a good thing</comment>\nsource ~/.bashrc\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):263 +msgid "Keychain in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):266 +msgid "Once you've configured your <path>~/.bash_profile</path> to call keychain at every login, log out and log back in. When you do, keychain will start ssh-agent, record the agent's environment variable settings in <path>~/.keychain/</path>, and then prompt you for passphrases for any private keys specified on the keychain command-line in <path>~/.bash_profile</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(figure:link):274 +msgid "/images/docs/l-ssh-1.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(figure:caption):274 +msgid "Keychain starts for the first time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):276 +msgid "Once you enter your passphrases, you private keys will be cached, and keychain will exit. Then, <path>~/.keychain/<hostname>-sh</path> will be sourced, initializing your login session for use with ssh-agent. Now, if you log out and log back in again, you'll find that keychain will find the existing ssh-agent process; it didn't terminate when you logged out. In addition, keychain will verify that the private key(s) you specified are already in ssh-agent's cache. If not, then you'll be prompted for the appropriate passphrases, but if all goes well, your existing ssh-agent will still contain the private key that you previously added; this means that you're not prompted for a password:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(figure:link):288 +msgid "/images/docs/l-ssh-2.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(figure:caption):288 +msgid "Keychain finds an existing ssh-agent" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):290 +msgid "Congratulations; you've just logged in and should be able to ssh and scp to remote systems; you didn't need to use ssh-add right after login, and ssh and scp won't prompt you for a passphrase either. In fact, as long as your initial ssh-agent process keeps running, you'll be able to log in and establish ssh connections without supplying a password. And it's very likely that your ssh-agent process will continue to run until the machine is rebooted; since you're most likely setting this up on a Linux system, it's possible that you may not need to enter your passphrase for several months! Welcome to the world of secure, passwordless connections using RSA and DSA authentication." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):302 +msgid "Go ahead and create several new login sessions, and you'll see that keychain will \"hook in\" to the exact same ssh-agent process each time. Don't forget that you can also get your cron jobs and scripts to \"hook in\" to the running ssh-agent process. To use ssh or scp commands from your shell scripts and cron jobs, just make sure that they source your <path>~/.keychain/<hostname>-shell</path> file first:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):311 +msgid "Sourcing the appropriate ~/.keychain/ file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):311 +#, no-wrap +msgid "\n<comment>(The environment variables are stored using a hostname-shell file, so replace\n<hostname> with your hostname, and the standard \"sh\" with \"csh\" or \"fish\"\nif you use either of those shells)</comment>\n$ <i>source ~/.keychain/<hostname>-sh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):318 +msgid "Then, any following ssh or scp commands will be able to find the currently-running ssh-agent and establish secure passwordless connections just like you can from the shell." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):327 +msgid "Keychain options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):330 +msgid "After you have keychain up and running, be sure to type <c>keychain --help</c> to familiarize yourself with all of keychain's command-line options. We're going to take a look at one in particular: the <c>--clear</c> option." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):336 +msgid "You'll recall that in Part 1, I explained that using unencrypted private keys is a dangerous practice, because it allows someone to steal your private key and use it to log in to your remote accounts from any other system without supplying a password. Well, while keychain isn't vulnerable to this kind of abuse (as long as you use encrypted private keys, that is), there is a potentially exploitable weakness directly related to the fact that keychain makes it so easy to \"hook in\" to a long-running ssh-agent process. What would happen, I thought, if some intruder were somehow able to figure out my password or passphrase and log into my local system? If they were somehow able to log in under my username, keychain would grant them instant access to my decrypted private keys, making it a no-brainer for them to access my other accounts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):350 +msgid "Now, before I continue, let's put this security threat in perspective. If some malicious user were somehow able to log in as me, keychain would indeed allow them to access my remote accounts. Yet, even so, it would be very difficult for the intruder to steal my decrypted private keys since they are still encrypted on disk. Also, gaining access to my private keys would require a user to actually log in as me, not just read files in my directory. So, abusing ssh-agent would be a much more difficult task than simply stealing an unencrypted private key, which only requires that an intruder somehow gain access to my files in <path>~/.ssh</path>, whether logged in as me or not. Nevertheless, if an intruder were successfully able to log in as me, they could do quite a bit of additional damage by using my decrypted private keys. So, if you happen to be using keychain on a server that you don't log into very often or don't actively monitor for security breaches, then consider using the <c>--clear</c> option to provide an additional layer of security." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):367 +msgid "The <c>--clear</c> option allows you to tell keychain to assume that every new login to your account should be considered a potential security breach until proven otherwise. When you start keychain with the <c>--clear</c> option, keychain immediately flushes all your private keys from ssh-agent's cache when you log in, before performing its normal duties. Thus, if you're an intruder, keychain will prompt you for passphrases rather than giving you access to your existing set of cached keys. However, even though this enhances security, it does make things a bit more inconvenient and very similar to running ssh-agent all by itself, without keychain. Here, as is often the case, one can opt for greater security or greater convenience, but not both." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):380 +msgid "Despite this, using keychain with <c>--clear</c> still has advantages over using ssh-agent all by itself; remember, when you use keychain <c>--clear</c>, your cron jobs and scripts will still be able to establish passwordless connections; this is because your private keys are flushed at login, not logout. Since a logout from the system does not constitute a potential security breach, there's no reason for keychain to respond by flushing ssh-agent's keys. Thus, the <c>--clear</c> option an ideal choice for infrequently accessed servers that need to perform occasional secure copying tasks, such as backup servers, firewalls, and routers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):395 +msgid "We're done!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):398 +msgid "Now that the OpenSSH key management series is complete, you should be very familiar with RSA and DSA keys and know how to use them in a convenient yet secure way. Be sure to also check out the following resources:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):409 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(li):414 +msgid "Read <uri link=\"/doc/en/articles/openssh-key-management-p1.xml\">Part 1</uri> and <uri link=\"/doc/en/articles/openssh-key-management-p3.xml\">Part 3</uri> of Daniel's series on OpenSSH key management." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(li):419 +msgid "Visit the <uri link=\"http://www.openssh.com/\">home of OpenSSH development</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(li):423 +msgid "Check out the <uri link=\"http://www.openssh.com/faq.html\">OpenSSH FAQ</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(uri:link):427 +msgid "http://www.chiark.greenend.org.uk/~sgtatham/putty/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(uri):427 +msgid "PuTTY is an excellent ssh client for Windows machine" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(li):430 +msgid "You may find O'Reilly's \"SSH, The Secure Shell: The Definitive Guide\" book helpful. <uri link=\"http://www.snailbook.com/\">The Authors' site</uri> contains information about the book, a FAQ, news, and updates." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/openssh-key-management-p3.xml.pot b/article/gettext/openssh-key-management-p3.xml.pot new file mode 100644 index 0000000..754e5b6 --- /dev/null +++ b/article/gettext/openssh-key-management-p3.xml.pot @@ -0,0 +1,370 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(guide:link):5 +msgid "/doc/en/articles/openssh-key-management-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):6 +msgid "OpenSSH key management, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(abstract):12 +msgid "In this third article in a series, Daniel Robbins shows you how to take advantage of OpenSSH agent connection forwarding to enhance security. He also shares recent improvements to the keychain shell script." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(version):23 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(date):24 +msgid "2010-04-26" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):27 +msgid "Agent forwarding and keychain improvements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):31 +msgid "Many of us use the excellent OpenSSH as a secure, encrypted replacement for the venerable telnet and rsh commands. One of OpenSSH's more intriguing features is its ability to authenticate users using the RSA and DSA authentication protocols, which are based on a pair of complementary numerical \"keys.\" One of the main appeals of RSA and DSA authentication is the promise of being able to establish connections to remote systems without supplying a password. For more background, see the previous installments of this series on OpenSSH key management, which cover <uri link=\"/doc/en/articles/openssh-key-management-p1.xml\">RSA/DSA authentication</uri> (Part 1) and ssh-agent and <uri link=\"/doc/en/articles/openssh-key-management-p2.xml\">keychain</uri> (Part 2), respectively." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):46 +msgid "Since Part 2 was published on developerWorks in September 2001, and later referenced on Slashdot and Freshmeat (see <uri link=\"#resources\">Resources</uri> later in this article for links to these sites), a lot of people have started using keychain, and it's undergone a lot of changes. I've received approximately 20 or so high-quality patches from developers around the world. I've incorporated many of these patches into the keychain source, which is now at version 1.8 (see <uri link=\"#resources\">Resources</uri>). I send my sincere thanks to all those who submitted patches, bug reports, feature requests, and notes of appreciation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):61 +msgid "Tightening ssh security" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):64 +msgid "In my <uri link=\"/doc/en/articles/openssh-key-management-p2.xml\">last article</uri>, I've spent some time discussing the security benefits and tradeoffs of running ssh-agent. A few days after the second article appeared on developerWorks, I received an e-mail from Charles Karney of Sarnoff Corporation, who politely informed me of OpenSSH's new authentication agent forwarding abilities, which we'll take a look at in a bit. In addition, Charles emphasized that running ssh-agent on untrusted machines is quite dangerous: if someone manages to get root access on the system, then your decrypted keys can be extracted from ssh-agent. Even though extracting the keys would be somewhat difficult, it is within the skill of professional crackers. And the mere fact that private key theft is possible means that we should take steps to guard against it happening in the first place." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):79 +msgid "To formulate a strategy to protect our private keys, we must first put the machines we access into one of two categories. If a particular host is well-secured or isolated -- making successful root exploit against it quite unlikely -- then that machine should be considered a trusted host. If, however, a machine is used by many other people or you have some doubts about the security of the system, then the machine should be considered an untrusted host. To guard your private keys against extraction, ssh-agent (and thus keychain) should never be run on an untrusted host. That way, even if the system's security is compromised, there will be no ssh-agent around for the intruder to extract keys from in the first place." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):92 +msgid "However, this creates a problem. If you can't run ssh-agent on untrusted hosts, then how do you establish secure, passwordless ssh connections from these systems? The answer is to only use ssh-agent and keychain on trusted hosts, and to use OpenSSH's new authentication forwarding abilities to extend passwordless authentication to any untrusted hosts. In a nutshell, authentication forwarding works by allowing remote ssh sessions to contact an ssh-agent running on a trusted system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):105 +msgid "Authentication agent forwarding" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):108 +msgid "To get an idea of how authentication forwarding works, let's first take a look at a hypothetical situation where user drobbins has a trusted laptop called lappy, a trusted server called trustbox, and two other untrusted systems that he must access, called notrust1 and notrust2, respectively. Currently, he uses ssh-agent along with keychain on all four machines, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(figure:link):116 +msgid "/images/docs/l-ssh-3.jpg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(figure:caption):116 +msgid "ssh-agent running on trusted and untrusted machines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):118 +msgid "The problem with this approach is that if someone gains root access on notrust1 or notrust2, then it is of course possible for this person to extract keys from the now vulnerable ssh-agent process. To fix this, drobbins stops running ssh-agent and keychain on untrusted hosts notrust1 and notrust2. In fact, to be even more careful, drobbins decides to only use ssh-agent and keychain on lappy. This limits exposure of his decrypted private keys, protecting him against private key theft:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(figure:link):128 +msgid "/images/docs/l-ssh-4.jpg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(figure:caption):128 +msgid "ssh-agent running only on lappy; a more secure configuration" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):130 +msgid "Of course, the problem with this approach is that drobbins can now only establish passwordless connections from lappy. Let's see how to enable authentication forwarding and get around this problem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):136 +msgid "Assuming that all machines are running recent versions of OpenSSH, we can get around this problem by using authentication forwarding. Authentication forwarding allows remote ssh processes to contact the ssh-agent that is running on your local trusted machine -- rather than requiring a version of ssh-agent to be running on the same machine that you are sshing out from. This usually allows you to run ssh-agent (and keychain) on a single machine, and means that all ssh connections that originate (either directly or indirectly) from this machine will use your local ssh-agent." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):147 +msgid "To enable authentication forwarding, we add the following line to lappy and trustbox's <path>/etc/ssh/ssh_config</path>. Note that this is the config file for ssh (<path>ssh_config</path>), not the ssh daemon sshd (<path>sshd_config</path>):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):154 +msgid "Add this line to your /etc/ssh/ssh_config" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):154 +#, no-wrap +msgid "\nForwardAgent Yes\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):158 +msgid "Now, to take advantage of authentication forwarding, drobbins can connect from lappy to trustbox, and then from trustbox to notrust1 without supplying passphrases for any of the connections. Both ssh processes \"tap in\" to the ssh-agent running on lappy:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):165 +msgid "Tapping lappy" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):165 +#, no-wrap +msgid "\n$ <i>ssh drobbins@trustbox</i>\nLast login: Wed Sep 26 13:42:08 2001 from lappy\n\nWelcome to trustbox!\n$ <i>ssh drobbins@notrust1</i>\nLast login: Tue Sep 25 12:03:40 2001 from trustbox\n\nWelcome to notrust1!\n$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):177 +msgid "If you try a similar configuration and find that agent forwarding isn't working, try using <c>ssh -A</c> instead of plain old ssh to explicitly enable authentication forwarding. Here's a diagram of what went on behind the scenes when we logged in to trustbox and notrust1 using authentication forwarding, above:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(figure:link):185 +msgid "/images/docs/l-ssh-5.jpg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(figure:caption):185 +msgid "Agent forwarding in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):187 +msgid "As you can see, when ssh connected to trustbox, it maintained a connection to the ssh-agent running on lappy. When an ssh connection was made from trustbox to notrust1, this new ssh process maintained the authentication connection to the previous ssh, effectively extending the chain. Whether this authentication chain can be extended beyond notrust1 to other hosts depends on how notrust1's <path>/etc/ssh/ssh_config</path> is configured. As long as agent forwarding is enabled, all parts of the chain will be able to authenticate using the ssh-agent running on the trusted lappy." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):201 +msgid "Advantages of agent connection forwarding" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):204 +msgid "Authentication forwarding offers a number of security advantages not touched on here. To convince me of the importance of agent connection forwarding, Charles Karney shared with me these three security advantages:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):211 +msgid "The private key is stored only on the trusted machine. This prevents malicious users from grabbing your encrypted key from disk and attempting to crack the encryption." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):216 +msgid "ssh-agent runs only on the trusted machine. This prevents an intruder from doing a memory dump of a remote ssh-agent process and then extracting your decrypted private keys from the dump." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):221 +msgid "Since you only need to type in the passphrase on your trusted machine, you prevent any keystroke loggers from stealthily grabbing your passphrase as it is entered." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):228 +msgid "The one drawback to relying on authentication agent connection forwarding is that it doesn't solve the problem of allowing cron jobs to take advantage of RSA/DSA authentication. One solution to this problem is to set up all cron jobs that need RSA/DSA authentication so that they execute from a trusted machine on your LAN. If necessary, these cron jobs can use ssh to connect to remote systems to automate backups, synchronize files, and so on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):237 +msgid "Now that we've looked at authentication agent connection forwarding, let's turn to recent improvements made to the keychain script itself." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):245 +msgid "Keychain functionality improvements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):248 +msgid "Thanks to user patch submissions, many significant improvements have been made to the keychain source. Several of the user-submitted keychain patches were functionality-related. For example, you'll recall that keychain created an <path>~/.ssh-agent</path> file; the name of this file has now been changed to <path>~/.ssh-agent-[hostname]</path> so that keychain works with NFS-mounted home directories that may be accessed from several different physical hosts. In addition to the <path>~/.ssh-agent-[hostname]</path> file, there is now a <path>~/.ssh-agent-csh-[hostname]</path> file that can be sourced by csh-compatible shells. Finally, a new <c>--nocolor</c> option has been added so that colorization features can be disabled if you happen to be using a non-vt100-compatible terminal." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):265 +msgid "Shell compatibility fixes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):268 +msgid "While the functionality improvements have been significant, the vast majority of fixes have dealt with shell compatibility issues. You see, while keychain 1.0 required bash, later versions were changed to work with any sh-compatible shell. This change allows keychain to work \"out of the box\" on nearly any UNIX system, including Linux, BSD, Solaris, IRIX, and AIX as well as other UNIX platforms. While the transition to sh and general UNIX compatibility has been a bumpy ride, it has also been a tremendous learning experience. Creating a single script that runs on all of these platforms has been very tricky indeed, mainly because I simply don't have access to most of these operating systems! Thankfully, keychain users from around the globe do, and many have provided great assistance in identifying compatibility problems and submitting patches to fix them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):283 +msgid "There are really two kinds of compatibility problems that had to be fixed. First, I needed to make sure that keychain only used built-ins, expressions, and operators that were fully supported under all sh implementations, including all the popular free and commercial UNIX sh shells, zsh (in sh-compatibility mode), and bash versions 1 and 2. Here are some of the user-submitted shell-compatibility fixes that were applied to the keychain source:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):292 +msgid "Since older sh shells don't support the ~ convention to refer to a user's home directory, lines that used ~ were changed to use <c>$HOME</c> instead:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):297 +msgid "Making it $HOME" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):297 +#, no-wrap +msgid "\nhostname=`uname -n`\npidf=${HOME}/.ssh-agent-${hostname}\ncshpidf=${HOME}/.ssh-agent-csh-${hostname}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):303 +msgid "Next, all references to source were changed to . to ensure compatibility with purist NetBSD's /bin/sh, which doesn't support the source command at all:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):308 +msgid "Humoring NetBSD" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):308 +#, no-wrap +msgid "\nif [ -f $pidf ]\nthen\n . $pidf\nelse\nSSH_AGENT_PID=\"NULL\"\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):317 +msgid "Along the way, I also applied some nice performance-related fixes. One savvy shell scripter informed me that instead of \"touching\" a file by typing touch foo, you can do this instead:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):323 +msgid "Touching files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):323 +#, no-wrap +msgid "\n> <i>foo</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):327 +msgid "By relying on built-in shell syntax rather than using an external binary, a fork() is avoided and the script becomes slightly more efficient. The > foo should work with any sh-compatible shell; however, it does not appear to be supported by ash. This shouldn't be a problem for most people, since ash is more of an emergency-disk type shell rather than something people use on a day-to-day basis." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):339 +msgid "Platform executable issues" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):342 +msgid "Getting a script working under multiple UNIX operating systems requires more than adhering to pure sh syntax. Remember, most scripts also call external commands, such as grep, awk, ps, and others, and these commands must be called in a standards-compliant way as much as possible. For example, while the echo included with most versions of UNIX recognizes the <c>-e</c> option, Solaris does not -- it simply prints a <c>-e</c> to stdout when it is used. So in order to deal with Solaris, keychain now auto-detects whether <c>echo -e</c> works:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):352 +msgid "Sniffing out Solaris" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):352 +#, no-wrap +msgid "\nif [ -z \"`echo -e`\" ]\nthen\n E=\"-e\"\nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):359 +msgid "Above, E is set to <c>-e</c> if -e escaping is supported. Then, echo can be called as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):364 +msgid "Better echo" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):364 +#, no-wrap +msgid "\necho $E Usage: ${CYAN}${0}${OFF} [ ${GREEN}options${OFF} ] ${CYAN}sshkey${OFF} ...\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):368 +msgid "By using <c>echo $E</c> instead of <c>echo -e</c>, the -e option can be dynamically enabled or disabled as needed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):376 +msgid "pidof, ps" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):379 +msgid "Probably the most significant compatibility fix involved changing how keychain detects currently running ssh-agent processes. Previously, I was using the pidof command to do this, but it had to be removed since several systems don't have a pidof. Really, pidof isn't the greatest solution anyway since it lists all ssh-agent processes running on the system, regardless of user, when we're really interested in all ssh-agent processes owned by the current effective UID." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):389 +msgid "So, instead of relying on pidof, we switched over to piping ps output to grep and awk in order to extract the needed process ids. This was a user-submitted fix:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):395 +msgid "Piping better than pidof" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):395 +#, no-wrap +msgid "\nmypids=`ps uxw | grep ssh-agent | grep -v grep | awk '{print $2}'`\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):399 +msgid "The above pipeline will set the mypids variable to the values of all ssh-agent processes owned by the current user. The grep -v grep command is part of the pipeline to ensure that the grep ssh-agent process does not become part of our PID list." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):406 +msgid "While this approach is good in concept, using ps opened up a whole new can of worms since ps options are not standardized across various BSD and System V UNIX derivatives. Here's an example: while ps uxw works under Linux, it does not work under IRIX. And while <c>ps -u username -f</c> works under Linux, IRIX, and Solaris, it doesn't work under BSD, which only understands BSD-style ps options. To get around this problem, keychain auto-detects whether the current system's ps works with BSD or System V syntax before executing the ps pipeline:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):417 +msgid "Detecting BSD vs. System V" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):417 +#, no-wrap +msgid "\npsopts=\"FAIL\"\nps uxw >/dev/null 2>&1\nif [ $? -eq 0 ]\nthen\npsopts=\"uxw\"\nelse\nps -u `whoami` -f >/dev/null 2>&1\nif [ $? -eq 0 ]\nthen\npsopts=\"-u `whoami` -f\"\nfi\nfi\nif [ \"$psopts\" = \"FAIL\" ]\nthen\necho $0: unable to use \\\"ps\\\" to scan for ssh-agent processes. \nReport KeyChain version and echo system configuration to drobbins@gentoo.org.\nexit 1\nfi\n\nmypids=`ps $psopts 2>/dev/null | grep \"[s]sh-agent\" | awk '{print $2}'` > /dev/null 2>&1\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):440 +msgid "To ensure that we work with both System V and BSD-style ps commands, the script does a \"dry run\" of ps uxw, throwing away any output. If the error code from this command is zero, we know that ps uxw works and we set the psopts value appropriately. However, if ps uxw returned a non-zero error code (indicating that we need to use BSD-style options), we do a dry-run of <c>ps -u `whoami` -f</c>, again throwing away all output. At this point, hopefully we've found either a BSD or System V variant of ps that we can use. If we haven't, we print out an error and exit. But it is very likely that one of the two ps commands worked, in which case we execute the final line in the above code snippet, our ps pipeline. By using the $psopts variable expansion immediately after ps, we're able to pass the correct options to the ps command." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):454 +msgid "The ps pipeline also contains a true grep gem, which was kindly sent to me by Hans Peter Verne. Notice that <c>grep -v grep</c> is no longer part of the pipeline; instead, it has been removed and <c>grep \"ssh-agent\"</c> has been changed to grep <c>\"[s]sh-agent\"</c>. This single grep command ends up doing the same thing as <c>grep ssh-agent | grep -v grep</c>; can you figure out why?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):462 +msgid "Neat grep trick" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):462 +#, no-wrap +msgid "\nmypids=`ps $psopts 2>/dev/null | grep \"[s]sh-agent\" | awk '{print $2}'` > /dev/null 2>&1\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):466 +msgid "Stumped? If you've decided that a <c>grep \"ssh-agent\"</c> and <c>grep \"[s]sh-agent\"</c> should match the exact same lines of text, you are correct. So why do they generate different results when the output of ps is piped to them? Here's how it works: when you use grep \"[s]sh-agent\", you change how the grep command appears in the ps process list. By doing so, you prevent grep from matching itself, since the [s]sh-agent string doesn't match the [s]sh-agent regular expression. Isn't that brilliant? If you still don't get it, play around with grep a bit more and you'll get it soon enough." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):480 +msgid "Conclusion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):483 +msgid "This column concludes my coverage of OpenSSH. Hopefully, you've learned enough about it to start using OpenSSH to secure your systems. Next month's Common threads column will continue with the \"Advanced filesystem implementor's guide\" series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):495 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):500 +msgid "Read Daniel's other two articles in this series, <uri link=\"/doc/en/articles/openssh-key-management-p1.xml\">OpenSSH key management, Part 1</uri> and <uri link=\"/doc/en/articles/openssh-key-management-p2.xml\">OpenSSH key management, Part 2</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):507 +msgid "Be sure to visit the <uri link=\"http://www.openssh.com/\">home of OpenSSH development</uri>, and check out the <uri link=\"http://www.openssh.com/faq.html\">OpenSSH FAQ</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):512 +msgid "<uri link=\"http://www.chiark.greenend.org.uk/~sgtatham/putty/\">PuTTY</uri> is an excellent ssh client for Windows machines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):516 +msgid "The book \"SSH, The Secure Shell: The Definitive Guide\" (O'Reilly & Associates, 2001) may be of assistance. The <uri link=\"http://www.snailbook.com/\">authors' site</uri> contains information about the book, a FAQ, news, and updates." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/partition-planning-tips.xml.pot b/article/gettext/partition-planning-tips.xml.pot new file mode 100644 index 0000000..2c30c65 --- /dev/null +++ b/article/gettext/partition-planning-tips.xml.pot @@ -0,0 +1,123 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(guide:link):5 +msgid "/doc/en/articles/partition-planning-tips.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):6 +msgid "Partition planning tips" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(abstract):15 +msgid "Organizing your partitions correctly can be fun and rewarding. This collection of tips will help you to use those sectors wisely." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(version):25 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(date):26 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):29 +msgid "How to keep things organized on disk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):33 +msgid "Have you noticed how many new filesystems are now available for Linux these days? Not only ReiserFS, but also SGI's XFS and IBM's own JFS (in source form) are now available for Linux. What an incredible selection! And, of course, we also have the Coda filesystem as well as good old ext2. As usual, choice is an excellent thing. In this collection of tips, we'll be looking at another area where we have lots of freedom -- how to organize partitions on disk. Regardless of which new-fangled filesystem you are using, good partition layout is essential. Here are three tips that will help to keep things organized." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):47 +msgid "Don't partition the entire drive" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):50 +msgid "These days, new machines often have 20 or 34 gigabytes of storage on a single drive. These drives are great, but they create a new problem: how exactly do you partition these things? Many of us can only conceive of filling up 12 GB, and that's if we actually tried to fill things up." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):57 +msgid "Instead of partitioning the entire drive during installation, you may want to consider partitioning only the portion of the drive that you know you will actually use. Later, when you've figured out how to use the 22 GB of free space sitting at the end of your drive, you'll have a better idea of how to partition it. Then, you can fire up <c>fdisk</c> or <c>cfdisk</c> and create a partition that meets your exact needs. For now, create partitions that are large enough to hold your current files, plus allow for future growth. Don't worry, the free space at the end of your drive will still be there when you need it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):71 +msgid "Partition for backups" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):74 +msgid "My second organizational tip will help your backups go more smoothly. If you are going to regularly back up a portion of your file system tree, it's a very good idea to place this data on a separate partition. Why? Because many copying and archiving tools have a special option for not crossing partition boundaries (such as <c>cp</c>'s <c>-x</c> option), which will make it easy to select only the files you want. Also, you can select a size for this partition so that it is close to capacity of your backup media. That way, you'll never have to worry about filling up a tape, and you can monitor how close you are to filling up your backup media by using the <c>df</c> command to see how much space is left on that particular partition. Then, you can track your storage and backup needs and plan accordingly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):91 +msgid "Partition to reduce fragmentation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):94 +msgid "At the beginning of this article, I mentioned all the fancy new journaled filesystems now available for Linux. Amid all the excitement, it's easy to forget our old friend, the ext2 filesystem. ext2 does have some drawbacks; it is not extremely robust, for example. However, one thing it does excel at (especially when compared to Microsoft's NTFS) is keeping fragmentation to a minimum. If you don't know, file fragmentation occurs when there is not enough contiguous space on a filesystem to store an entire file. The result? The file is broken into non-contiguous \"fragments,\" which are stored on disk. When this file is accessed, the hard drive's head needs to jump all over the place to read in the entire file. This slows down I/O, adding additional seeks to the reading process." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):108 +msgid "OK, you may ask, what's the big deal? After all, ext2 filesystems take a long time to exhibit signs of fragmentation. However, I would argue that fragmentation is still a big problem, because although ext2 does not get fragmented easily, fragmentation is a one-way, cumulative process. That is, while ext2 fragments slowly, it cannot defragment itself. In other words, any often-modified ext2 filesystem will gradually get more and more fragmented, and thus slower. Even worse, there are no production-quality ext2 filesystem defragmenting programs currently available. This means that fragmentation is guaranteed to get worse over time, and the only way to fix it is to wipe the filesystem clean, and restore all the original files from a backup. That's a pretty involved and time-consuming process. So, how can the problem of fragmentation be dramatically reduced and contained? I'll cover all the juicy details in my next tip. See you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):127 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(li):131 +msgid "In <uri link=\"/doc/en/articles/partitioning-p1.xml\">Partitioning in action: Moving /home</uri>, I show you step-by-step how to move <path>/home</path> to a new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(li):136 +msgid "In <uri link=\"/doc/en/articles/partitioning-p2.xml\">Partitioning in action</uri>, I show you step-by-step how to move <path>/var</path> and <path>/tmp</path> to a new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(li):141 +msgid "See <uri link=\"/doc/en/articles/maximum-swappage.xml\">Maximum swappage</uri>, another tip by Daniel, where he shows how to dramatically increase swap performance under Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(li):146 +msgid "Check out the <uri link=\"http://tldp.org/docs.html#howto\">howtos</uri> at the <uri link=\"http://tldp.org\">Linux Documentation Project</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):155 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):158 +msgid "Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a contributing author of several books published by MacMillan: Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade when he was first exposed to the Logo programming language and a potentially lethal dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife Mary and his new baby daughter, Hadassah. You can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/partitioning-p1.xml.pot b/article/gettext/partitioning-p1.xml.pot new file mode 100644 index 0000000..aa2f105 --- /dev/null +++ b/article/gettext/partitioning-p1.xml.pot @@ -0,0 +1,304 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(guide:link):5 +msgid "/doc/en/articles/partitioning-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):6 +msgid "Partitioning in action, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(abstract):15 +msgid "In this new series of tips, Daniel Robbins shows you how to change partition layout on a running system. He'll also cover several tricks of the trade to minimize downtime and avoid making costly mistakes. In this particular tip, he'll show you how to move /home to another partition." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(version):27 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(date):28 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):31 +msgid "Moving /home" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):33 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):36 +msgid "The partition <path>/home</path> is one of the most-often-moved partitions. Sometimes, all the space in <path>/home</path> becomes exhausted, and an additional hard drive is required. Other times, <path>/home</path> is set up as part of the root partition, and it may need to be moved to improve performance or facilitate backup. Whatever the case, I'll show you how to move <path>/home</path> safely and efficiently." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(warn):45 +msgid "The following technique describes how to move a partition(s). Although this technique is designed so that you can \"back out\" of a failed partition move, it doesn't protect against user error. In other words, any time that you format partitions or copy large numbers of files, there's a possibility that you will type the wrong thing, causing lots of data to be destroyed. For this reason, it's highly recommended that you <e>take appropriate steps to back up all critical files before proceeding</e>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):55 +msgid "Now that you're prepared, we're ready to start moving <path>/home</path>. The exact steps you will take depend on whether <path>/home</path> currently resides on its own separate partition, or whether it is located on the root partition. Keep this in mind as we go through the steps (I'll make notes where necessary). Right now, if you are moving <path>/home</path> to a new hard drive, it should be physically installed in your system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):64 +msgid "If you are moving <path>/home</path> to an existing partition (it doesn't need to be ext2, as long as the target primary or extended partition exists), you can proceed to <uri link=\"#step2\">step 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):73 +msgid "Create a new partition, if necessary" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):76 +msgid "If the new partition doesn't exist yet, you'll need to create it using <c>cfdisk</c> (preferred) or <c>fdisk</c>. If the partition doesn't reside on your first drive, remember to specify the name of the device as the first argument to <c>cfdisk</c> or <c>fdisk</c>. After creating the appropriate primary or extended partition, you should reboot so that the partition table can be reread correctly. This is the only time you will need to reboot the system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):91 +msgid "Create a filesystem on the new partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):95 +msgid "To create a filesystem on the new partition, first make sure you know the exact device name for the new partition (for example, <path>/dev/sda5</path>). If you're not sure of the exact device name, stop now and double-check! Then type the following, as root:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):102 +msgid "Creating the filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):102 +#, no-wrap +msgid "\n# <i>mkfs.ext2 /dev/???</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):106 +msgid "In the above and following code samples, <path>???</path> should be replaced with the target partition name. After executing this command, the target partition will contain an empty ext2 filesystem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):117 +msgid "Mount the new filesystem in /mnt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):121 +msgid "Create a directory called <path>/mnt/newpart</path>, and then mount the new partition there:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):126 +msgid "Mounting the partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):126 +#, no-wrap +msgid "\n# <i>mount /dev/??? /mnt/newpart</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):135 +msgid "Drop to single-user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):139 +msgid "I delayed this step as long as possible to maximize system availability, but we now must drop into single-user mode, and copy files from <path>/home</path> to <path>/mnt/newpart</path>. You shouldn't have any files open in <path>/home</path>, and entering single-user mode eliminates this possibility:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):146 +msgid "Entering single user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):146 +#, no-wrap +msgid "\n# <i>init 1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):150 +msgid "If prompted, enter the root password to perform system maintenance. You should now have a root shell." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):160 +msgid "Change directories to /home and copy files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):164 +msgid "Type the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):168 +msgid "Copying files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):168 +#, no-wrap +msgid "\n# <i>cd /home</i>\n# <i>cp -ax * /mnt/newpart</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):173 +msgid "The <c>cp -ax</c> command recursively copies the contents of <path>/home</path> to <path>/mnt/newpart</path>, preserving all file attributes, and not crossing any mount points. After this command finishes, <path>/mnt/newpart</path> will contain an exact copy of all the files and directories currently in <path>/home</path>. If the old <path>/home</path> was on its own separate partition (listed on a separate line in <path>/etc/fstab</path>), go to <uri link=\"#step6a\">step 6a</uri>. Otherwise, proceed to <uri link=\"#step6b\">step 6b</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):189 +msgid "Use the new partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):191 +msgid "6a: /home on its own partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(note):194 +msgid "These instructions are for systems where the old <path>/home</path> is already on its own dedicated partition. If this isn't the case, see <uri link=\"#step6b\">step 6b</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):200 +msgid "Unmount the old partition by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):204 +msgid "Unmounting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):204 +#, no-wrap +msgid "\n# <i>cd /</i>\n# <i>umount /home</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):209 +msgid "Then, unmount and remount the new partition:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):213 +msgid "Remounting the partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):213 +#, no-wrap +msgid "\n# <i>umount /mnt/newpart</i>\n# <i>mount /dev/??? /home</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):218 +msgid "Now, the new partition is available at /home and is ready to be used. We can perform the last few steps in multiuser mode. Exit single-user mode, so that the system is back up and running, by pressing <c>CTRL-D</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(impo):224 +msgid "After the system starts up normally, log in as root and edit <path>/etc/fstab</path> so that <path>/dev/???</path> is now mounted automatically at <path>/home</path> instead of your old partition. For example, change this line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):231 +msgid "Old fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):231 +#, no-wrap +msgid "\n/dev/hda3 /home ext2 defaults 1 2\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):235 +msgid "to this line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):239 +msgid "New fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):239 ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):267 +#, no-wrap +msgid "\n/dev/??? /home ext2 defaults 1 2\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):246 +msgid "6b: /home on a shared partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(note):249 +msgid "These instructions are for systems where the old <path>/home</path> is on a shared partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):254 +msgid "Moving the directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):254 +#, no-wrap +msgid "\n# <i>cd /</i>\n# <i>mv /home /home.old</i>\n# <i>mkdir /home</i>\n# <i>mount /dev/??? /home</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(impo):261 +msgid "Now, leave single user mode by pressing <c>CTRL-D</c>. When the system is back up and running, edit <path>/etc/fstab</path> and add a line like the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):267 +msgid "Editing fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):271 +msgid "That way, your new partition will get mounted correctly the next time the system is rebooted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):281 +msgid "Finishing up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):285 +msgid "We deliberately left the old <path>/home</path> directory/partition behind, just in case there were problems copying files. After verifying that the system is running smoothly, you can either use your old <path>/home</path> partition for something else, or remove the <path>/home.old</path> directory." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):292 +msgid "Congratulations, you've just moved <path>/home</path>! In my next tip, we'll reconfigure a system so that <path>/tmp</path> and <path>/var</path> are on their own shared partition. See you then." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):301 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(li):305 +msgid "In <uri link=\"/doc/en/articles/partitioning-p2.xml\">Partitioning in action</uri>, I show you step-by-step how to move <path>/var</path> and <path>/tmp</path> to a new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(li):310 +msgid "In my first tip, <uri link=\"/doc/en/articles/maximum-swappage.xml\">Maximum swappage</uri>, I show how to dramatically increase swap performance under Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(li):315 +msgid "In my second tip, <uri link=\"/doc/en/articles/partition-planning-tips.xml\">Partition planning tips</uri>, I share several ways of effectively organizing your partition layout." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(li):321 +msgid "I always recommend checking out the <uri link=\"http://tldp.org/docs.html#howto\">howtos</uri> at <uri link=\"http://tldp.org/\">The Linux Documentation Project</uri> -- they're a valuable resource." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):332 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):335 +msgid "Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a contributing author of several books published by MacMillan: Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade when he was first exposed to the Logo programming language and a potentially lethal dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife Mary and his new baby daughter, Hadassah. You can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/partitioning-p2.xml.pot b/article/gettext/partitioning-p2.xml.pot new file mode 100644 index 0000000..2054bea --- /dev/null +++ b/article/gettext/partitioning-p2.xml.pot @@ -0,0 +1,291 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):6 +msgid "Partitioning in action, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph"/> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(abstract):15 +msgid "In this second tip on changing partition layout on a running system, Daniel Robbins shows you how to move /tmp and /var to their own shared partition. He also covers several tricks of the trade to minimize downtime and avoid making costly mistakes." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(version):27 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(date):28 +msgid "2010-03-02" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):31 +msgid "Consolidating data" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):33 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):36 +msgid "In my <uri link=\"/doc/en/articles/partitioning-p1.xml\">last tip</uri>, we successfully moved <path>/home</path> to a new partition. Now, it's time to learn how to consolidate often-modified files onto a new partition. Why would we want to do this? Here's an example. Often-modified files contribute heavily to fragmentation. One of the best ways to contain fragmentation is to store often-modified files on their own partition. That way, the other partitions are unaffected by the fragmentation caused by the heavily modified files. In concept, this is easy to understand, but how do you actually go about doing it?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):47 +msgid "First, you must create a new partition for the specific purpose of storing frequently modified files. You might want to locate this partition on a separate disk to enhance performance. Then, I'll walk you through the steps required to move both <path>/tmp</path> and <path>/var</path> to this new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(warn):55 +msgid "The following technique describes how to move a partition(s). Although this technique is designed so that you can \"back out\" of a failed partition move, it doesn't protect against user error. In other words, any time that you format partitions or copy large numbers of files, there's a possibility that you will type the wrong thing, causing lots of data to be destroyed. For this reason, it's highly recommended that you <e>take appropriate steps to back up all critical files before proceeding</e>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):68 +msgid "Create a filesystem on the new partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):71 +msgid "The first step of this process is to create a new partition that's big enough to hold <path>/var</path> and <path>/tmp</path>, with a little extra space left over. You'll need either an additional drive, or a spare (unused) partition that will house the often-modified files. If you do need to use <c>fdisk</c> or <c>cfdisk</c> to create the partition, you'll need to reboot once. Then, it's time to format the new partition as follows (it's OK to be in multiuser mode while you do this; I'll let you know when to switch to single-user):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):81 +msgid "Creating the filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):81 +#, no-wrap +msgid "\n# <i>mkfs.ext2 /dev/???</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):90 +msgid "Mount it to /mnt/rwstorage" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):94 +msgid "As in my previous tip, <path>???</path> should be replaced with the device name for the new, empty partition that you are creating. Accidentally typing the wrong name will destroy data on an existing partition, so be careful! After typing this command, you'll have a brand-new ext2 filesystem on the new partition. We're almost ready to mount it, but first, let's make a new mount point." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):103 +msgid "Creating the mount point" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):103 +#, no-wrap +msgid "\n# <i>mkdir /mnt/rwstorage</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):107 +msgid "I chose the name <path>rwstorage</path> to remind us that this particular partition is going to be specifically used to house files that are read from and written to frequently. To mount the partition, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):113 +msgid "Mounting the partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):113 +#, no-wrap +msgid "\n# <i>mount /dev/??? /mnt/rwstorage</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):122 +msgid "Creating a new /tmp" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):126 +msgid "The partition is now mounted and we're ready to create our new <path>/tmp</path> directory:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):131 +msgid "Creating the new /tmp" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):131 +#, no-wrap +msgid "\n# <i>cd /mnt/rwstorage</i>\n# <i>mkdir tmp</i>\n# <i>chmod 1777 tmp</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):142 +msgid "Drop to single-user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):146 +msgid "Our new directory at <path>/mnt/rwstorage/tmp</path> has the right permissions for a temporary directory. Now, drop to single-user mode, since we must copy over <path>/var</path>. As usual, we've delayed our drop to single-user mode to the last possible moment. Right now, we don't want any programs reading or writing files in <path>/var</path>, so we have to stop all daemons, disconnect all users, and do some quick maintenance by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):155 +msgid "Entering single-user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):155 +#, no-wrap +msgid "\n# <i>init 1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):159 +msgid "If you're prompted to enter a password to perform system maintenance, do so. You should now have a root shell, and all unnecessary daemons will be stopped. Create a new location for our <path>/var</path> files by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):165 +msgid "Creating the new directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):165 +#, no-wrap +msgid "\n# <i>cd /mnt/rwstorage</i>\n# <i>mkdir var</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):175 +msgid "Copy /var" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):179 +msgid "Default permissions on our new <path>/mnt/newstorage/var</path> directory should be correct, so now we're ready to copy all of our original <path>/var</path> data over to the new partition:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):185 +msgid "Copying the data" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):185 +#, no-wrap +msgid "\n# <i>cd /var </i>\n# <i>cp -ax * /mnt/rwstorage/var</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):195 +msgid "Back up and create symlinks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):199 +msgid "After this command completes, you'll have an exact copy of <path>/var</path> at <path>/mnt/rwstorage/var</path>. Now, you may be asking how exactly we get Linux to use <path>/mnt/rwstorage/var</path> and <path>/mnt/rwstorage/tmp</path> instead of the defaults in the root directory. This is easily done by the use of symbolic links -- we'll create the new symbolic links, <path>/tmp</path> and <path>/var</path>, which point to the correct directories in <path>/mnt/rwstorage</path>. First, let's back up the original directories:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):210 +msgid "Backing up the directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):210 +#, no-wrap +msgid "\n# <i>cd /</i>\n# <i>mv var var.old</i>\n# <i>mv tmp tmp.old</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):216 +msgid "The last line probably isn't necessary, since it's very likely that you don't have anything important in <path>/tmp</path>, but we're playing it safe. Now, let's create the symlinks:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):222 +msgid "Creating the symlinks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):222 +#, no-wrap +msgid "\n# <i>cd /</i>\n# <i>ln -s /mnt/rwstorage/var /var</i>\n# <i>ln -s /mnt/rwstorage/tmp /tmp</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):233 +msgid "Finishing touches to /etc/fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):237 +msgid "Now, when any user or program uses <path>/var</path>, they'll automatically be transported to <path>/mnt/rwstorage/var</path>! Likewise for <path>/tmp</path>. We have one step left; however, it can be safely performed in multiuser mode. It's time to get Apache running again, and to allow all your users to log back in. Exit from runlevel 1 by pressing <c>CTRL-D</c>. The system should start up normally. Log in as root." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):246 +msgid "The final thing we must do is configure <path>/etc/fstab</path> so that <path>/dev/???</path> is mounted at <path>/mnt/rwstorage</path>. You must add a line like the following to your <path>/etc/fstab</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):252 +msgid "Configuring fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):252 +#, no-wrap +msgid "\n/dev/??? /mnt/rwstorage ext2 defaults 1 2\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(impo):256 +msgid "If you are using a kernel version in the 2.3+ range, it's very likely that you have a line in your <path>/etc/fstab</path> that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):261 +msgid "Shared memory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):261 +#, no-wrap +msgid "\nnone /var/shm shm defaults 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):265 +msgid "This line enables shared memory on your system, and by default it gets mounted in <path>/var</path>. In order for this line to work properly, it must appear after the line you just added. That way, when Linux starts up, <path>/mnt/rwstorage</path> will get mounted first (enabling /var). Then, and only then, will the shm device get mounted at <path>/var/shm</path>, which is really <path>/mnt/rwstorage/var/shm</path>. Make sure the lines are in this order:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):275 +msgid "Enabling shared memory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):275 +#, no-wrap +msgid "\n/dev/??? /mnt/rwstorage ext2 defaults 1 2\nnone /var/shm shm defaults 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):280 +msgid "After saving the changes to <path>/etc/fstab</path>, your system has been successfully upgraded! After verifying that everything is working properly, you'll want to remove the <path>/tmp.old</path> and <path>/var.old</path> backup directories. Congratulations -- you've successfully reconfigured your system's partitions for optimum performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):291 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(li):295 +msgid "In <uri link=\"/doc/en/articles/partitioning-p1.xml\">Partitioning in action: Moving /home</uri>, I show you step-by-step how to move <path>/home</path> to a new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(li):300 +msgid "In <uri link=\"/doc/en/articles/maximum-swappage.xml\">Maximum swappage</uri>, I show how to dramatically increase swap performance under Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(li):305 +msgid "In <uri link=\"/doc/en/articles/partition-planning-tips.xml\">Partition planning tips</uri>, I share several ways of effectively organizing your partition layout." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(li):310 +msgid "I always recommend checking out the <uri link=\"http://tldp.org/docs.html#howto\">howtos</uri> at <uri link=\"http://tldp.org/\">The Linux Documentation Project</uri> -- they're a valuable resource." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):321 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):324 +msgid "Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a contributing author of several books published by MacMillan: Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade when he was first exposed to the Logo programming language and a potentially lethal dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife Mary and his new baby daughter, Hadassah. You can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/prompt-magic.xml.pot b/article/gettext/prompt-magic.xml.pot new file mode 100644 index 0000000..6ceac17 --- /dev/null +++ b/article/gettext/prompt-magic.xml.pot @@ -0,0 +1,538 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(guide:link):5 +msgid "/doc/en/articles/prompt-magic.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):7 +msgid "Prompt magic" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(author:title):9 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(mail:link):10 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(mail):10 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(abstract):16 +msgid "Why stick with the standard boring shell prompt when you can easily make it colorful and more informative? In this tip, Daniel Robbins will show you how to get your shell prompt just the way you like it, as well as how to dynamically update your X terminal's title bar." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(version):28 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(date):29 +msgid "2005-10-21" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):32 +msgid "Enhancing the system prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):36 +msgid "As Linux/UNIX people, we spend a lot of time working in the shell, and in many cases, this is what we have staring back at us:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):41 +msgid "The normal user prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):41 +#, no-wrap +msgid "\nbash-2.04$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):45 +msgid "If you happen to be root, you're entitled to the \"prestige\" version of this beautiful prompt:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):50 +msgid "The root prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):50 +#, no-wrap +msgid "\nbash-2.04#\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):54 +msgid "These prompts are not exactly pretty. It's no wonder that several Linux distributions have upgraded their default prompts that add color and additional information to boot. However, even if you happen to have a modern distribution that comes with a nice, colorful prompt, it may not be perfect. Maybe you'd like to add or change some colors, or add (or remove) information from the prompt itself. It isn't hard to design your own colorized, tricked-out prompt from scratch." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):67 +msgid "Prompt basics" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):70 +msgid "Under bash, you can set your prompt by changing the value of the <c>PS1</c> environment variable, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):75 +msgid "Altering the environment variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):75 +#, no-wrap +msgid "\n$ <i>export PS1=\"> \"</i>\n>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):80 +msgid "Changes take effect immediately, and can be made permanent by placing the <c>export</c> definition in your <path>~/.bashrc</path> file. <c>PS1</c> can contain any amount of plain text that you'd like:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):86 +msgid "A custom prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):86 +#, no-wrap +msgid "\n$ <i>export PS1=\"This is my super prompt > \"</i>\nThis is my super prompt >\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):91 +msgid "While this is, um, interesting, it's not exactly useful to have a prompt that contains lots of static text. Most custom prompts contain information like the current username, working directory, or hostname. These tidbits of information can help you to navigate in your shell universe. For example, the following prompt will display your username and hostname:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):99 +msgid "A more useful prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):99 +#, no-wrap +msgid "\n$ <i>export PS1=\"\\u@\\H > \"</i>\ndrobbins@freebox >\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):104 +msgid "This prompt is especially handy for people who log in to various machines under various differently-named accounts, since it acts as a reminder of what machine you're actually on and what privileges you currently have." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):110 +msgid "In the above example, we told bash to insert the username and hostname into the prompt by using special backslash-escaped character sequences that bash replaces with specific values when they appear in the <c>PS1</c> variable. We used the sequences <c>\\u</c> (for username) and <c>\\H</c> (for the first part of the hostname). Here's a complete list of all special sequences that bash recognizes (you can find this list in the bash man page, in the \"PROMPTING\" section):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(th):122 +msgid "Sequence" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(th):123 +msgid "Description" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):126 +msgid "\\a" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):127 +msgid "The ASCII bell character (you can also type <c>\\007</c>)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):130 +msgid "\\d" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):131 +msgid "Date in \"Wed Sep 06\" format" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):134 +msgid "\\e" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):135 +msgid "ASCII escape character (you can also type <c>\\033</c>)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):138 +msgid "\\h" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):139 +msgid "First part of hostname (such as \"mybox\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):142 +msgid "\\H" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):143 +msgid "Full hostname (such as \"mybox.mydomain.com\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):146 +msgid "\\j" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):147 +msgid "The number of processes you've suspended in this shell by hitting <c>^Z</c>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):152 +msgid "\\l" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):153 +msgid "The name of the shell's terminal device (such as \"ttyp4\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):156 +msgid "\\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):157 +msgid "Newline" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):160 +msgid "\\r" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):161 +msgid "Carriage return" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):164 +msgid "\\s" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):165 +msgid "The name of the shell executable (such as \"bash\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):168 +msgid "\\t" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):169 +msgid "Time in 24-hour format (such as \"23:01:01\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):172 +msgid "\\T" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):173 +msgid "Time in 12-hour format (such as \"11:01:01\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):176 +msgid "\\@" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):177 +msgid "Time in 12-hour format with am/pm" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):180 +msgid "\\u" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):181 +msgid "Your username" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):184 +msgid "\\v" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):185 +msgid "Version of bash (such as 2.04)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):188 +msgid "\\V" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):189 +msgid "Bash version, including patchlevel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):192 +msgid "\\w" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):193 +msgid "Current working directory (such as <path>/home/drobbins</path>)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):196 +msgid "\\W" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):197 +msgid "The \"basename\" of the current working directory (such as \"drobbins\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):200 +msgid "\\!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):201 +msgid "Current command's position in the history buffer" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):204 +msgid "\\#" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):205 +msgid "Command number (this will count up at each prompt, as long as you type something)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):211 +msgid "\\\\$" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):212 +msgid "If you are not root, inserts a <c>$</c>; if you are root, you get a <c>#</c>. If you delimit your string with <c>'</c> instead of <c>\"</c>, you should use a single backslash instead." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):219 +msgid "\\xxx" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):220 +msgid "Inserts an ASCII character based on three-digit number xxx (replace unused digits with zeros, such as <c>\\007</c>)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):226 +msgid "\\\\" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):227 +msgid "A backslash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):230 +msgid "\\[" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):231 +msgid "This sequence should appear before a sequence of characters that don't move the cursor (like color escape sequences). This allows bash to calculate word wrapping correctly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):238 +msgid "\\]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):239 +msgid "This sequence should appear after a sequence of non-printing characters." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):245 +msgid "So, there you have all of bash's special backslashed escape sequences. Play around with them for a bit to get a feel for how they work. After you've done a little testing, it's time to add some color." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):254 +msgid "Colorization" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):257 +msgid "Adding color is quite easy; the first step is to design a prompt without color. Then, all we need to do is add special escape sequences that'll be recognized by the terminal (rather than bash) and cause it to display certain parts of the text in color. Standard Linux terminals and X terminals allow you to set the foreground (text) color and the background color, and also enable \"bold\" characters if so desired. We get eight colors to choose from." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):266 +msgid "Colors are selected by adding special sequences to <c>PS1</c> -- basically sandwiching numeric values between an <c>\\e[</c> (escape open-bracket) and an <c>m</c>. If we specify more than one numeric code, we separate each code with a semicolon. Here's an example color code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):273 +msgid "Adding color" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):273 +#, no-wrap +msgid "\n\"\\e[0m\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):277 +msgid "When we specify a zero as a numeric code, it tells the terminal to reset foreground, background, and boldness settings to their default values. You'll want to use this code at the end of your prompt, so that the text that you type in is not colorized. Now, let's take a look at the color codes. Check out this screenshot:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(figure:link):285 +msgid "/images/docs/prompt-magic-colortable.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(figure:caption):285 +msgid "Color chart" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):287 +msgid "To use this chart, find the color you'd like to use, and find the corresponding foreground (30-37) and background (40-47) numbers. For example, if you like green on a normal black background, the numbers are 32 and 40. Then, take your prompt definition and add the appropriate color codes. This:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):294 +msgid "A basic custom prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):294 +#, no-wrap +msgid "\n$ <i>export PS1=\"\\w> \"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):298 +msgid "becomes:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):302 +msgid "The colorized prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):302 +#, no-wrap +msgid "\n$ <i>export PS1=\"\\e[32;40m\\w> \"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):306 +msgid "So far, so good, but it's not perfect yet. After bash prints the working directory, we need to set the color back to normal with an <c>\\e[0m</c> sequence:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):312 +msgid "A better colorized prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):312 +#, no-wrap +msgid "\n$ <i>export PS1=\"\\e[32;40m\\w> \\e[0m\"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):316 +msgid "This definition will give you a nice, green prompt, but we still need to add a few finishing touches. We don't need to include the background color setting of 40, since that sets the background to black which is the default color anyway. Also, the green color is quite dim; we can fix this by adding a <c>1</c> color code, which enables brighter, bold text. In addition to this change, we need to surround all non-printing characters with special bash escape sequences, <c>\\[</c> and <c>\\]</c>. These sequences will tell bash that the enclosed characters don't take up any space on the line, which will allow word-wrapping to continue to work properly. Without them, you'll end up with a nice-looking prompt that will mess up the screen if you happen to type in a command that approaches the extreme right of the terminal. Here's our final prompt:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):330 +msgid "A nice colorful prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):330 +#, no-wrap +msgid "\n$ <i>export PS1=\"\\[\\e[32;1m\\]\\w> \\[\\e[0m\\]\"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):334 +msgid "Don't be afraid to use several colors in the same prompt, like so:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):338 +msgid "Much more colorful" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):338 +#, no-wrap +msgid "\n$ <i>export PS1=\"\\[\\e[36;1m\\]\\u@\\[\\e[32;1m\\]\\H> \\[\\e[0m\\]\"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):345 +msgid "Xterm fun" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):348 +msgid "I've shown you how to add information and color to your prompt, but you can do even more. It's possible to add special codes to your prompt that will cause the title bar of your X terminal (such as rxvt or aterm) to be dynamically updated. All you need to do is add the following sequence to your <c>PS1</c> prompt:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):356 +msgid "Updating the xterm title bar" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):356 +#, no-wrap +msgid "\n\"\\e]2;titlebar\\a\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):360 +msgid "Simply replace the substring <c>titlebar</c> with the text that you'd like to have appear in your xterm's title bar, and you're all set! You don't need to use static text; you can also insert bash escape sequences into your titlebar. Check out this example, which places the username, hostname, and current working directory in the titlebar, as well as defining a short, bright green prompt:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):369 +msgid "An extremely useful xterm" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):369 +#, no-wrap +msgid "\n$ <i>export PS1=\"\\[\\e]2;\\u@\\H \\w\\a\\e[32;1m\\]>\\[\\e[0m\\] \"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):373 +msgid "This is the particular prompt that I'm using in the color chart screenshot, above. I love this prompt, because it puts all the information in the title bar rather than in the terminal where it limits how much can fit on a line. By the way, make sure you surround your titlebar sequence with <c>\\[</c> and <c>\\]</c>, since as far as the terminal is concerned, this sequence is non-printing. The problem with putting lots of information in the title bar is that you will not be able to see info if you are using a non-graphical terminal, such as the system console. To fix this, you may want to add something like this to your <path>~/.bashrc</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):385 +msgid "Adding usefulness to xterms and system consoles" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):385 +#, no-wrap +msgid "\nif [ \"$TERM\" = \"linux\" ]\nthen\n <comment># We're on the system console or maybe telnetting in</comment>\n export PS1=\"\\[\\e[32;1m\\]\\u@\\H > \\[\\e[0m\\]\"\nelse\n <comment># We're not on the console, assume an xterm</comment>\n export PS1=\"\\[\\e]2;\\u@\\H \\w\\a\\e[32;1m\\]>\\[\\e[0m\\] \" \nfi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):396 +msgid "This bash conditional statement will dynamically set your prompt based on your current terminal settings. For consistency, you'll want to configure your <path>~/.bash_profile</path> so that it sources your <path>~/.bashrc</path> on startup. Make sure the following line is in your <path>~/.bash_profile</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):403 +msgid "Editing bash_profile" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):403 +#, no-wrap +msgid "\nsource ~/.bashrc\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):407 +msgid "This way, you'll get the same prompt setting whether you start a login or non-login shell." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):412 +msgid "Well, there you have it. Now, have some fun and whip up some nifty colorized prompts!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):420 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(li):424 +msgid "<uri link=\"http://www.rxvt.org\">rxvt</uri> is a great little xterm that happens to have a good amount of documentation related to escape sequences tucked in the <path>doc</path> directory included in the source tarball." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(li):429 +msgid "<uri link=\"http://aterm.sourceforge.net\">aterm</uri> is another terminal program, based on rxvt. It supports several nice visual features, like transparency and tinting." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(li):434 +msgid "<uri link=\"http://bashish.mine.nu/BashishWiki/index.php/Main_Page\">bashish</uri> is a theme engine for all different kinds of terminals. Check out some <uri link=\"http://bashish.mine.nu/BashishWiki/index.php/Screenshots\">great screenshots</uri> of bashish in action!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):446 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):449 +msgid "Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a contributing author of several books published by MacMillan: Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade when he was first exposed to the Logo programming language and a potentially lethal dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife Mary and his new baby daughter, Hadassah. You can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/ru/afig-ct-ext3-intro.xml.po b/article/gettext/ru/afig-ct-ext3-intro.xml.po new file mode 100644 index 0000000..f6973b8 --- /dev/null +++ b/article/gettext/ru/afig-ct-ext3-intro.xml.po @@ -0,0 +1,424 @@ +# Azamat H. Hackimov <azamat.hackimov@gmail.com>, 2009. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-17 20:20+0600\n" +"Last-Translator: Azamat H. Hackimov <azamat.hackimov@gmail.com>\n" +"Language-Team: Russian <kde-russian@lists.kde.ru>\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Lokalize 1.0\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(guide:link):4 +msgid "/doc/en/articles/afig-ct-ext3-intro.xml" +msgstr "/doc/ru/articles/afig-ct-ext3-intro.xml" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):6 +msgid "Advanced Filesystem Implementor's Guide : Introducing ext3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(author:title):8 +msgid "Author" +msgstr "автор" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "drobbins@gentoo.org" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(abstract):20 +msgid "" +"With the 2.4 release of Linux come a host of new filesystem possibilities, " +"including Reiserfs, XFS, GFS, and others. These filesystems sound cool, but " +"what exactly can they do, what are they good at, and exactly how do you go " +"about safely using them in a production Linux environment? Daniel Robbins " +"answers these questions by showing you how to set up these new advanced " +"filesystems under Linux 2.4. In this installment, Daniel takes a look at " +"ext3, a new improved version of ext2 with journaling capabilities." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(version):30 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(date):31 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):34 +msgid "Introduction" +msgstr "Введение" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):38 +msgid "" +"In the past few installments, we've taken a bit of a detour by looking at " +"non-traditional filesystems such as tmpfs and devfs. Now, it's time to get " +"back to disk-based filesystems, and we do this by taking a look at ext3. The " +"ext3 filesystem, designed by Dr. Stephen Tweedie, is built on the framework " +"of the existing ext2 filesystem; in fact, ext3 is very similar to ext2 " +"except for one small (but important) difference -- it supports journaling. " +"Yet even with this small addition, I think you'll find that that ext3 has " +"several surprising and intriguing capabilities. In this article, I'll give " +"you a good understanding of how ext3 compares to the other journaling " +"filesystems currently available. In my next article, we'll get ext3 up and " +"running." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):56 +msgid "Understanding Ext3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):60 +msgid "" +"So, how does ext3 compare to ReiserFS? In previous articles, I explained how " +"ReiserFS is well suited to handling small files (under 4K), and in certain " +"situations, ReiserFS' small file performance is ten to fifteen times greater " +"than that of ext2 and ext3. However, while ReiserFS has many strengths, it " +"also has weaknesses. In the current implementation of ReiserFS (version " +"3.6), certain file access patterns can actually result in significantly " +"worse performance than ext2 and ext3, particularly when reading large mail " +"directories. Also, ReiserFS doesn't have a good track record of NFS " +"compatibility and has poor sparse file performance. In contrast, ext3 is a " +"very well-rounded filesystem. It's a lot like ext2; it's not going to give " +"you the blazingly fast small-file performance that ReiserFS gives you, but " +"it's not going to give you any unexpected performance or functionality " +"hiccups either." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):75 +msgid "" +"One of the nice things about ext3 is that because it is based on the ext2 " +"code, ext2 and ext3's on-disk format is identical; this means that a cleanly " +"unmounted ext3 filesystem can be remounted as an ext2 filesystem with " +"absolutely no problems. And that's not all. Thanks to the fact that ext2 and " +"ext3 use identical metadata, it's possible to perform in-place ext2 to ext3 " +"filesystem upgrades. Yes, you read that right. By upgrading a few key system " +"utilities, installing a modern 2.4 kernel and typing in a single tune2fs " +"command per filesystem, you can convert your existing ext2 servers into " +"journaling ext3 systems. You can even do this while your ext2 filesystems " +"are mounted. The transition is safe, reversible, and incredibly easy, and " +"unlike a conversion to XFS, JFS, or ReiserFS, you don't need to back up and " +"recreate your filesystems from scratch. Now, for a moment, consider the " +"thousands of production ext2 servers in existence that are just minutes away " +"from an ext3 upgrade; then, you'll have a good grasp of ext3's importance to " +"the Linux community." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):93 +msgid "" +"If I had to describe ext3 in one word, I'd call it \"comfortable\". It's " +"incredibly easy to ext3-enable an existing ext2 system, and after you do, " +"you're not going to run into any unexpected performance quirks. And there's " +"yet another way that ext3 excels in the comfort department; ext3 happens to " +"be one of the most reliable journaled filesystems available for Linux, as I " +"explain below." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):107 +msgid "Ext3 reliability" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):112 +msgid "" +"In addition to being ext2-compatible, ext3 inherits other benefits by " +"sharing ext2's metadata format. For one, ext3 users gain access to a rock-" +"solid fsck tool. You'll recall that one of the points of using a journaling " +"filesystem is to avoid the need for an exhaustive fsck in the first place; " +"however if you do end up getting corrupt metadata, either from a flaky " +"kernel, bad hard drive, or something else, you'll greatly appreciate the " +"fact that ext3 inherits ext2's fsck. In contrast, ReiserFS' fsck is in its " +"infancy, and fixing flaky metadata when it does show up can be a difficult " +"and dangerous process." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):127 +msgid "Metadata-only journaling" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):130 +msgid "" +"Interestingly, ext3 handles journaling very differently than ReiserFS and " +"other journaling filesystems do. With ReiserFS, XFS, and JFS, the filesystem " +"driver journals metadata, but makes no provisions for journaling data. With " +"metadata-only journaling, your filesystem metadata is going to be rock " +"solid, and you will probably never need to perform an exhaustive fsck. " +"However, unexpected reboots and system lock-ups can result in significant " +"corruption of recently-modified data. Ext3 uses a couple of innovative " +"solutions to avoid these problems, which we'll look at in a bit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):141 +msgid "" +"But first, it's important to understand exactly how metadata-only journaling " +"could end up biting you. As an example, let's say that you were modifying a " +"file called /tmp/myfile.txt when the machine unexpectedly locked up, forcing " +"a reboot. If you were using a metadata-only journaling filesystem such as " +"ReiserFS, XFS or JFS, your filesystem metadata would be easily repaired, " +"thanks to the metadata journal, and you wouldn't need to sit through a " +"laborious fsck." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):150 +msgid "" +"However, there's the distinct possibility that when you load /tmp/myfile.txt " +"into a text editor, your file will not simply be missing recent changes, but " +"will contain a good amount of garbage and may even be completely unreadable. " +"This isn't something that will always happen, but it could happen and often " +"does." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):158 +msgid "" +"Here's why. Typical journaled filesystems like ReiserFS, XFS, and JFS take " +"extra special care of metadata, but don't pay too much attention to data. In " +"our above example, the filesystem driver was in the process of modifying " +"several filesystem blocks. The filesystem driver updated the appropriate " +"metadata, but didn't have time to flush the data from its caches to the new " +"blocks on disk. Thus, when you loaded up /tmp/myfile.txt into a text editor, " +"part or all of the file contained garbage -- blocks of data that didn't get " +"initialized in time before the system locked up." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):175 +msgid "The ext3 approach" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):179 +msgid "" +"Now that we have a good general understanding of this problem, let's look " +"how ext3 implements journaling. In ext3, the journaling code uses a special " +"API called the Journaling Block Device layer, or JBD. The JBD has been " +"designed for the express purpose of implementing a journal on any kind of " +"block device. Ext3 implements its journaling by \"hooking in\" to the JBD " +"API. For example, the ext3 filesystem code will inform the JBD of " +"modifications it is performing, and will also request permission from the " +"JBD before modifying certain data on disk. By doing so, the JBD is given the " +"appropriate opportunities to manage the journal on behalf of the ext3 " +"filesystem driver. It's quite a nice arrangement, and because the JBD is " +"being developed as a separate, generic entity, it could be used to add " +"journaling capabilities to other filesystems in the future." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):194 +msgid "" +"Here are a couple of neat things about the JBD-managed ext3 journal. For " +"one, ext3's journal is stored in an inode -- a file, basically. Depending on " +"how you \"ext3-enable\" your filesystem, you may or may not be able to see " +"this file, located at /.journal. Of course, by storing the journal in an " +"inode, ext3 is able to add the needed journal to the filesystem without " +"requiring incompatible extensions to the ext2 metadata. This is one of the " +"key ways that an ext3 filesystem maintains backwards compatibility with ext2 " +"metadata, and in turn, the ext2 filesystem driver." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):210 +msgid "Different journaling approaches" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):214 +msgid "" +"Not surprisingly, it turns out that there are a number of ways to implement " +"a journal. For example, a filesystem developer could design a journal that " +"stores spans of bytes that need to be modified on the host filesystem. The " +"advantage of this approach is that your journal would be able to store lots " +"of tiny little modifications to the filesystem in a very efficient way, " +"since it would only record the individual bytes that need to be modified and " +"nothing more." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):223 +msgid "" +"JBD takes another, and in some ways better, approach. Rather than recording " +"spans of bytes that must be changed, JBD stores the complete modified " +"filesystem blocks themselves. The ext3 filesystem driver also uses this " +"approach and stores complete replicas of the modified blocks (either 1K, 2K, " +"or 4K) in memory to track pending IO operations. At first, this may seem a " +"bit wasteful. After all, complete blocks contain modified data but may also " +"contain unmodified (already on disk) data as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):233 +msgid "" +"The approach that the JBD uses is called physical journaling, which means " +"that the JBD uses complete physical blocks as the underlying currency for " +"implementing the journal. In contrast, the approach of only storing modified " +"spans of bytes rather than complete blocks is called logical journaling, and " +"is the approach used by XFS. Because ext3 uses physical journaling, an ext3 " +"journal will have a larger relative on-disk footprint than, say, an XFS " +"journal. But because ext3 uses complete blocks internally and in the " +"journal, ext3 doesn't deal with as much complexity as it would if it were to " +"implement logical journaling. In addition, the use of full blocks allows " +"ext3 to perform some additional optimizations, such as \"squishing\" " +"multiple pending IO operations within a single block into the same in-memory " +"data structure. This, in turn, allows ext3 to write these multiple changes " +"to disk in a single write operation, rather than many. In addition, because " +"the literal block data is stored in memory, little or no massaging of the in-" +"memory data is required before writing it to disk, greatly reducing CPU " +"overhead." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):256 +msgid "Ext3, protector of data" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):260 +msgid "" +"And now, we finally get to see how the ext3 filesystem effectively provides " +"both metadata and data journaling, avoiding the data corruption problem I " +"described earlier in this article. In fact, ext3 actually has two methods to " +"ensure data and metadata integrity." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):267 +msgid "" +"Originally, ext3 was designed to perform full data and metadata journaling. " +"In this mode (called \"data=journal\" mode), the JBD journals all changes to " +"the filesystem, whether they are made to data or metadata. Because both data " +"and metadata are journaled, JBD can use the journal to bring both metadata " +"and data back to a consistent state. The drawback of full data journaling is " +"that it can be slow, although you can reduce the performance penalty by " +"setting up a relatively large journal." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):277 +msgid "" +"Recently, a new journaling mode has been added to ext3 that provides the " +"benefits of full journaling but without introducing a severe performance " +"penalty. This new mode works by journaling metadata only. However, the ext3 " +"filesystem driver keeps track of the particular data blocks that correspond " +"with each metadata update, grouping them into a single entity called a " +"transaction. When a transaction is applied to the filesystem proper, the " +"data blocks are written to disk first. Once they are written, the metadata " +"changes are then written to the journal. By using this technique (called " +"\"data=ordered\" mode), ext3 can provide data and metadata consistency, even " +"though only metadata changes are recorded in the journal. ext3 uses this " +"mode by default." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):295 +msgid "Conclusion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):299 +msgid "" +"These days, a lot of people are trying to determine which Linux journaling " +"filesystem is \"best\". In truth, there is no one \"right\" filesystem for " +"every application; each one has its own strengths. This is one of the " +"benefits from having so many next-generation Linux filesystems from which to " +"choose. So, instead of picking an arbitrary \"best\" filesystem and using it " +"for every conceivable application, it's far preferable to understand each " +"filesystem's strengths and weaknesses so that you can make an educated " +"decision as to which one to use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):310 +msgid "" +"Ext3 has a number of strengths. It has been designed to be extremely easy to " +"deploy. It's based on the solid ext2 filesystem code and it inherits a great " +"fsck tool. And ext3's journaling capabilities have been specially designed " +"to ensure the integrity of both metadata and data. All in all, ext3 is a " +"truly great filesystem, and a worthy successor to the now-venerable ext2 " +"filesystem. Join me in my next article, when we get ext3 up and running. " +"Until then, you may want to check out the following resources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):325 +msgid "Resources" +msgstr "" + +#. Let's link to parts 1-6 once they've been GuideXMLified +#. <p> +#. Read Daniel's other articles in this series, where he describes: +#. </p> +#. +#. <ul> +#. <li>The benefits of journaling and ReiserFS (Part 1)</li> +#. <li>Setting up a ReiserFS system (Part 2) </li> +#. <li>Using the tmpfs virtual memory filesystem and bind mounts (Part 3)</li> +#. <li>The benefits of devfs, the device management filesystem (Part 4) </li> +#. <li>Beginning the conversion to devfs (Part 5) </li> +#. <li>Completing the conversion to devfs using an init wrapper (Part 6)</li> +#. </ul> +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):344 +msgid "" +"Read a <uri link=\"http://olstrans.sourceforge.net/release/OLS2000-ext3/" +"OLS2000-ext3.html\">complete transcript</uri> of Dr. Stephen Tweedie's Ext3, " +"Journaling Filesystem presentation, which was featured at the Ottawa Linux " +"Symposium in July 2000." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):352 +msgid "" +"Find out more about using ext3 with 2.4 kernels at Andrew Morton's <uri link=" +"\"http://www.zip.com.au/~akpm/linux/ext3/index.html\">ext3 for 2.4</uri> " +"page. Andrew Morton is the man responsible for porting ext3 to the 2.4 " +"kernel, and provided invaluable assistance in writing this article. If you " +"can't wait until my next article, Andrew has a very nice <uri link=\"http://" +"www.zip.com.au/~akpm/linux/ext3/ext3-usage.html\">ext3 and 2.4 usage page</" +"uri> that will show you how to get ext3 up and running on your system in no " +"time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):363 +msgid "" +"To keep abreast of the latest ext3 developments, be sure to visit the <uri " +"link=\"https://listman.redhat.com/archives/ext3-users/\">ext3-users mailing " +"list archive</uri>. Of course, you can also <uri link=\"https://listman." +"redhat.com/mailman/listinfo/ext3-users\">subscribe</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):370 +msgid "" +"Take Daniel Robbins' free <uri link=\"http://www-128.ibm.com/developerworks/" +"edu/os-dw-linuxjfs-i.html\">JFS fundamentals tutorial</uri> on " +"developerWorks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):376 +msgid "" +"Browse <uri link=\"http://www-130.ibm.com/developerworks/linux/?article=lr" +"\">more Linux resources</uri> on developerWorks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):381 +msgid "" +"Browse <uri link=\"http://www-130.ibm.com/developerworks/opensource/?" +"article=osr\">more Open source resources</uri> on developerWorks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(title):392 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(p):396 +msgid "" +"Residing in Albuquerque, New Mexico, Daniel Robbins is the President/CEO of " +"Gentoo Technologies, Inc., the creator of Gentoo Linux, an advanced Linux " +"for the PC, and the Portage system, a next-generation ports system for " +"Linux. He has also served as a contributing author for the Macmillan books " +"Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. " +"Daniel has been involved with computers in some fashion since the second " +"grade, when he was first exposed to the Logo programming language as well as " +"a potentially dangerous dose of Pac Man. This probably explains why he has " +"since served as a Lead Graphic Artist at SONY Electronic Publishing/" +"Psygnosis. Daniel enjoys spending time with his wife, Mary, and their " +"daughter, Hadassah. You can contact Daniel at <mail link=\"drobbins@gentoo." +"org\">drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/afig-ct-ext3-intro.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/autotools-practices.xml.po b/article/gettext/ru/autotools-practices.xml.po new file mode 100644 index 0000000..12ae170 --- /dev/null +++ b/article/gettext/ru/autotools-practices.xml.po @@ -0,0 +1,439 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(guide:link):5 +msgid "/doc/en/articles/autotools-practices.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(title):6 +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(title):25 +msgid "Best practices with autotools" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(mail:link):9 +msgid "flameeyes@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(mail):9 +msgid "Diego Pettenò" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(abstract):12 +msgid "" +"This article covers some of the most common errors people make when using " +"autotools and ways to achieve better results." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(version):21 +msgid "1.0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(date):22 +msgid "2005-12-16" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):29 +msgid "" +"The core of GNU's compile chain -- the set of tools used to build GNU " +"software packages -- is the so-called \"autotools,\" a term that refers to " +"the autoconf and automake programs, as well as libtool, autoheader, pkg-" +"config, and sometimes gettext. These tools let you compile GNU software on a " +"wide variety of platforms and Unix and Unix-like operating systems, " +"providing developers a framework to check for the presence of the libraries, " +"functions, and tools that they want to use. While autotools are great in the " +"hands of an experienced developer, they can be quite a handful for the first-" +"time user, and it's not so rare that packages are shipped with working-but-" +"broken autotools support. This article will cover some of the most common " +"errors people make when using autotools and ways to achieve better results." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):43 +msgid "" +"Regardless of anyone's opinion about them, we currently have no valid " +"alternative for autotools. Projects such as Scons are not as portable as " +"autotools, and they don't embody enough knowledge to be useful yet. We have " +"tons of automatic checks with autotools, and a lot of libraries come with an " +"m4 library with macros to check for their presence." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):51 +msgid "" +"The basic structure of an autotooled project is simple. Autoconf takes help " +"of an <path>aclocal.m4</path> file (created by aclocal using the m4 " +"libraries on its search path and <path>acinclude.m4</path> file) to parse " +"the <path>configure.ac</path> file (formerly <path>configure.in</path>) and " +"transform it into a \"configure\" script. For every directory there should " +"exist an <path>Makefile.am</path>, which automake uses to create Makefile.in " +"templates. The Makefile.in templates are then processed and transformed by " +"the <path>configure</path> script into real Makefiles. You can avoid avoid " +"using automake and just write your own Makefile.in files, but this is quite " +"complex, and you lose a few features of autotools." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):64 +msgid "" +"In a <path>configure.ac</path> file you can use macros you define yourself, " +"the default ones provided by autoconf and aclocal, or external macros " +"provided, for instance, by other packages. In such a case aclocal will " +"create the <path>aclocal.m4</path> file adding the library files it finds on " +"the system's library with the defined macros; this is a critical step to " +"have a working autotooled project, as we'll see in a moment." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):73 +msgid "" +"A <path>Makefile.am</path> is mainly a declaration of intents: you can fill " +"some targets variables with the name of the targets you want to build. These " +"variables are structured in a format like placetoinstall_TYPEOFTARGET. The " +"place is the location in a hierarchical Unix filesystem (bin, lib, " +"include, ...), a non-used keyword that can be defined with an arbitrary path " +"(using the keyworddir variable), or the special keyword noinst that marks " +"the targets that need not to be installed (for example private headers, or " +"static libraries used during build). After naming the target, you can use " +"the name (replacing dots with underscores) as the prefix for the variables " +"that affects its build. In this way you can provide special CFLAGS, LDFLAGS, " +"and LDADD variables used during the build of a single target, instead of " +"changing them for all the targets. You can also use variables collected " +"during configure phase, if you passed them to the AC_SUBST macro in " +"<path>configure.ac</path>, so that they are replaced inside makefiles. Also, " +"though defining CFLAGS and LDFLAGS on a per-target basis seems useful, " +"adding static flags in Makefile.am is a bad thing for portability, as you " +"can't tell if the compiler you're using supports them, or if you really need " +"them (-ldl put in LDFLAGS is a good example of a flag needed on Linux but " +"not on FreeBSD); in such cases you should use <path>configure.ac</path> to " +"add these flags." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):95 +msgid "" +"The most commonly used macros in configure.ac are AC_CHECK_HEADERS, " +"AC_CHECK_FUNCS, and AC_CHECK_LIB, which test for the presence of, " +"respectively, some header files, some library functions, and a given library " +"(with a specific function in it). They are important for portability as they " +"provides a way to check which headers are present and which are not (for " +"example system headers that have different locations in different operating " +"systems), and to check whether a function is present in the system library " +"(asprintf() is missing in OpenBSD for example, while it's present on GNU C " +"library and FreeBSD), and finally to check for the presence of some third-" +"party library or to see if a specific link to a library is needed to get " +"some functions (for example dlopen() function is in libdl library on GNU " +"systems, while it's provided by the system's C library on FreeBSD)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):110 +msgid "" +"Along with testing for the presence or absence of functions or headers (and " +"sometimes libraries) you usually need to change the code's path (for example " +"to avoid the use of missing functions, or to define a drop-in replacement " +"for them). Autoconf is commonly coupled with another tool, autoheader, which " +"creates a <path>config.h.in</path> template, used by configure script to " +"create a <path>config.h</path> header in which are defined a few " +"preprocessor macros in form of HAVE_givenfunction or HAVE_givenheader_H " +"which can be tested with #ifdef/#ifndef directives inside a C or C++ source " +"file to change the code according to the features present." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):122 +msgid "" +"Here are some practices to keep in mind to help you use autotools to create " +"the most portable code possible." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):127 +msgid "" +"<b>The config.h header file should be considered to be an internal header " +"file</b>, so it should be used just by the single package in which it's " +"created. You should avoid editing the <path>config.h.in</path> template to " +"add your own code there, as this requires you to manually update it " +"according to the <path>configure.ac</path> you're writing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):135 +msgid "" +"Unfortunately a few projects, such as Net-SNMP, export this header file with " +"other libraries' headers, which requires any projects that use their " +"libraries to include them (or provide their own copy of the internal Net-" +"SNMP structures). This is a bad thing, as the autotools structure of a " +"library project should be invisible to software using it (which might not " +"use autotools at all). Also, changes in autotools behavior are anything but " +"rare, so you can have two identical checks with different results due to " +"changes in the way they are executed. If you need to define your own " +"wrappers or replacements in case something is not in the environment you're " +"compiling for, you should do that in private headers that do not get " +"installed (declared as noinst_HEADERS in <path>Makefile.am</path> files)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):149 +msgid "" +"<b>Always provide the m4 files you used</b>. As autotools have been in use " +"for years, many packages (for example libraries) that can be reused by other " +"programs provide an m4 library file in <path>/usr/share/aclocal</path> that " +"makes it possible to check for their presence (for example using the -config " +"scripts) with a simple macro call. These files are used by aclocal to create " +"the <path>aclocal.m4</path> file, and they usually are present on the " +"developers' systems where aclocal is executed to create the release, but " +"when they are for optional dependencies, they can be missing on users' " +"systems. While this is usually not a problem, because users rarely executes " +"aclocal, it's a problem for source distributions, such as Gentoo, where " +"sometimes you need to patch a Makefile.am or the <path>configure.ac</path> " +"and then re-run autoconf without having all the optional dependencies " +"installed (or having different versions, which can be incompatible or " +"bugged, of the same m4 file)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):165 +msgid "" +"To avoid this problem, you should create an m4 subdirectory in your " +"package's directory and then put there the m4 library files you are using. " +"You must then call aclocal with aclocal -I m4 options to search in that " +"directory before the system library. You can then choose whether to put that " +"directory under revision control (CVS, SVN, or whatever else you are using) " +"or just create it for the releases. The latter case is the bare minimum " +"requirement for a package. It minimizes the amount of revision-controlled " +"code and ensures that you're always using the latest m4 version, but has the " +"drawback that anyone who checks out your repository won't be able to execute " +"autoconf without having to look on a release tarball to take the m4 from " +"(and that might not work, as you can have updated the configure.ac to suit a " +"newer macro or added more dependencies). On the other hand, putting the m4 " +"directory under revision control sometimes tempts the developers to change " +"the macros to suit their needs. Although this seems logical, as the m4 files " +"are under your revision control, it will upset many package maintainers, as " +"sometimes new versions of m4 files fix bugs or support newer options and " +"installation paths (for example multilib setups), and having the m4 files " +"modified makes it impossible to just replace them with updated versions. It " +"also mean that when you're going to update an m4 file you must redo the " +"modification against the original." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):187 +msgid "" +"m4 files are always a problem to work with. They must replicate almost the " +"same code from library to library (depending on the way you need to provide " +"CFLAGS/LDFLAGS: with tests or with a -config script). To avoid this problem, " +"the GNOME and FreeDesktop projects developed a tool called pkg-config, which " +"provides both an executable binary and an m4 file to include in configure.ac " +"files, and lets developers check for the presence of a given library (and/or " +"package), provided that the package itself installed a pkg-config .pc data " +"file. This approach simplifies the work of maintaining configure.ac scripts, " +"and requires a lot less time to be processed during execution of configure " +"script, as it uses the information provided by the installed package itself " +"instead of just trying if it's present. On the other hand, this approach " +"means that an error the developers make concerning a dependency can break " +"the user program, as they just hardcode the compiler and linker flags in the " +"data file and the configure script doesn't actually check whether the " +"library works. Fortunately, this doesn't happen too often." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):205 +msgid "" +"To create the configure file, you need PKG_CHECK_MODULES, contained in the " +"<path>pkg.m4</path> library. You should add that file to your m4 directory. " +"If pkg-config dependency is mandatory (as the tool is run by the configure " +"script) you can't be sure that the m4 file you are using is the same as one " +"on users' systems, nor you can be sure that it does not include extra bugs, " +"as it can be older than yours." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):214 +msgid "" +"<b>Always check for the libraries you're going to link to</b>, if you have " +"them as mandatory dependencies. Usually autoconf macros or pkg-config data " +"files define prerequisite libraries that you need to successfully link to " +"your library. Also, some functions that are in extra libraries in some " +"systems (like dlopen() in libdl on Linux and Mac OS X) can be in the libc of " +"another system (the same function is in libc on FreeBSD). In these cases you " +"need to check whether the function can be found without linking to anything, " +"or if you need to use a specific library (for example to avoid linking to a " +"non-existent libdl that would fail where it's not needed)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):226 +msgid "" +"<b>Be careful with GNU extensions</b>. One of the things that makes " +"portability a big pain is the use of extension functions, which are provided " +"by GNU libc but aren't present on other C libraries like BSD's or uClibc. " +"When you use such functions, you should always provide a \"drop-in " +"replacement,\" a function that can provide the same functionality as the " +"library function, maybe with less performance or security, which can be used " +"when the extension function is not present on system's C library. Those " +"functions must be protected by a #ifdef HAVE_function ... #endif block, so " +"that they don't get duplicated when they are already present. Make sure that " +"these functions are not exported by the library to the external users; they " +"should be declared inside an internal header, to avoid breaking other " +"libraries that may be doing similar tricks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):240 +msgid "" +"<b>Avoid compiling OS-specific code when not needed</b>. When a program " +"optionally supports specific libraries or specific operating systems, it's " +"not rare to have entire source files that are specific to that code path. To " +"avoid compiling them when they're not needed, use the AM_CONDITIONAL macro " +"inside a configure.ac file. This automake macro (usable only if you're using " +"automake to build the project) allows you to define if .. endif blocks " +"inside a Makefile.am file, inside which you can set special variables. You " +"can, for example, add a \"platformsrcs\" variable that you set to the right " +"source file for the platform to build for, then use in a _SOURCES variable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):252 +msgid "" +"However, there are two common errors developers make when using " +"AM_CONDITIONAL. The first is the use of AM_CONDITIONAL in an already " +"conditional branch (for example under an info or in a case switch), which " +"leads to automake complaining about a conditional defined only conditionally " +"(AM_CONDITIONAL must be called on global scope, out of every if block, so " +"you must define a variable to contain the status of the conditions and then " +"test against when calling the AM_CONDITIONAL). The other one is that you " +"can't change the targets' variables directly, and you must define \"commodity" +"\" variables, whose results empty out of the conditional, to add or remove " +"source files and targets." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):264 +msgid "" +"Many projects, to avoid compiling code for specific code paths, add the " +"entire files in #ifdef ... #endif preprocessor conditionals. While this " +"usually works, it makes the code ugly and error-prone, as a single statement " +"out of the conditional block can be compiled where the source file is not " +"needed. It also misleads users sometimes, as the source files seem to be " +"compiled in situations where they don't make sense." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):273 +msgid "" +"<b>Be smart in looking for operating system or hardware platform</b>. " +"Sometimes you need to search for a specific operating system or hardware " +"platform. The right way to do this depends on where you need to know this. " +"If you must know it to enable extra tests on configure, or you must add " +"extra targets on makefiles, you must do the check in configure.ac. On the " +"other hand, if the difference must be known in a source file, for example to " +"enable an optional asm-coded function, you should rely directly on the " +"compiler/preprocessor, so you should use #ifdef directives with the default " +"macros enabled on the target platform (for example __linux__, __i386__, " +"_ARC_PPC, __sparc__, _FreeBSD_ and __APPLE__)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):286 +msgid "" +"<b>Don't run commands in configure.ac</b>. If you need to check for hardware " +"or operating system in a configure.ac, you should avoid using the uname " +"command, despite this being one of the most common way to do such a test. " +"This is actually an error, as this breaks crosscompilation. Autotools " +"supports crosscompile projects from one machine to another using hosts " +"definitions: strings in the form \"hardware-vendor-os\" (actually, " +"\"hardware-vendor-os-libc\" when GNU libc is used), such as i686-pc-linux-" +"gnu and x86_64-unknown-freebsd5.4. CHOST is the host definition for the " +"system you're compiling the software for, CBUILD is the host definition for " +"the system you're compiling on; when CHOST and CBUILD differ, you're " +"crosscompiling." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):299 +msgid "" +"In the examples above, the first host definition shows an x86-like system, " +"with a pentium2-equivalent (or later) processor, running a Linux kernel with " +"a GNU libc (usually this refers to a GNU/Linux system). The second refers to " +"an AMD64 system with a FreeBSD 5.4 operating system. (For a GNU/kFreeBSD " +"system, which uses FreeBSD kernel and GNU libc, the host definition is hw-" +"unknown-freebsd-gnu, while for a Gentoo/FreeBSD, using FreeBSD's kernel and " +"libc, but with Gentoo framework, the host definition is hw-gentoo-" +"freebsd5.4.) By using $host and $build variables inside a configure.ac " +"script you can enable or disable specific features based on the operating " +"system or on the hardware platform you're compiling to or on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):312 +msgid "" +"<b>Don't abuse \"automagic\" dependencies</b>. One of the most useful " +"features of autotools are the automatic checks for the presence of a " +"library, which are often used to automatically enable support for extra " +"dependencies and such. However, abusing this feature makes the build of a " +"package a bit of a problem. While this is quite useful for first-time users, " +"and although most of the projects having complex dependencies (such as " +"multimedia programs like xine and VLC) use a plugin-based framework that " +"allows them to avoid most of the breakages, \"automagic\" dependencies are a " +"great pain for packagers, especially ones working on source-based " +"distributions such as Gentoo and ports-like frameworks. When you build " +"something with automagical dependencies you enable the functions supported " +"by the libraries found on the system on which the configure script is run. " +"This means that the output binaries might not work on a system that shares " +"the same base packages but misses one extra library, for example. Also, you " +"can't tell the exact dependencies of a package, as some might be optional " +"and not be built when the libraries are not present." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):330 +msgid "" +"To avoid this, autoconf allows you to add --enable/--disable and --with/--" +"without options to configure scripts. With such options you can forcefully " +"enable or disable a specific option (such as the support for an extra " +"library or for a specific feature), and leave the default to automatic tests." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):338 +msgid "" +"Unfortunately, many developers misunderstand the meaning of the two " +"parameters of the functions used to add those options (AC_ARG_ENABLE and " +"AC_ARG_WITH). They represent the code to execute when a parameter is passed " +"and when one is not. Many developers mistakenly think that the two " +"parameters define the code to execute when the feature is enabled and when " +"is disabled. While this usually works when you pass a parameter just to " +"change the default behavior, many source-based distributions pass parameters " +"also to confirm the default behavior, which leads to errors (features " +"explicitly requested missing). Being able to disable optional features if " +"they don't add dependencies (think of OSS audio support on Linux) is always " +"a good thing for users, who can avoid building extra code if they don't plan " +"to use it, and prevents maintainers from doing dirty caching tricks to " +"enable or disable features as their users request." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):354 +msgid "" +"While autotools were a big problem for both developers and maintainers " +"because there are different incompatible versions that do not get along well " +"together (since they install in the same places, with the same names) and " +"which are used in different combinations, the use of autotools saves " +"maintainers from doing all sorts of dirty tricks to compile software. If you " +"look at ebuild from Gentoo's portage, the few that do not use autotools are " +"the more complex ones, as they need to check variables on very different " +"setups (we can or not have NPTL support; we can be on Linux, FreeBSD, or Mac " +"OS X; we can be using GLIBC or another libc; and so on), while autotools " +"usually take care of that on their own. It's also true that many patches " +"applied by maintainers are to fix broken autotools script in upstream " +"sources, but this is just a little problem compared to the chaos of using " +"special build systems that don't work at all with little environmental " +"changes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(p):370 +msgid "" +"Autotools can be quite tricky for newcomers, but when you start using them " +"on a daily basis you find it's a lot easier than having to deal with manual " +"makefiles or other strange build tools such as imake or qmake, or even " +"worse, special autotools-like build scripts that try to recognize the system " +"they are building on. Autotools makes it simple to support new OSes and new " +"hardware platforms, and saves maintainers and porters from having to learn " +"how to custom-build a system to fix compilation. By carefully writing a " +"script, developers can support new platforms without any changes at all." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/bash-by-example-p1.xml.po b/article/gettext/ru/bash-by-example-p1.xml.po new file mode 100644 index 0000000..ad11e65 --- /dev/null +++ b/article/gettext/ru/bash-by-example-p1.xml.po @@ -0,0 +1,904 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(guide:link):5 +msgid "/doc/en/articles/bash-by-example-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):6 +msgid "Bash by example, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(abstract):12 +msgid "" +"By learning how to program in the bash scripting language, your day-to-day " +"interaction with Linux will become more fun and productive, and you'll be " +"able to build upon those standard UNIX constructs (like pipelines and " +"redirection) that you already know and love. In this three-part series, " +"Daniel Robbins will teach you how to program in bash by example. He'll cover " +"the absolute basics (making this an excellent series for beginners) and " +"bring in more advanced features as the series proceeds." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(version):27 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(date):28 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):31 +msgid "Fundamental programming in the Bourne again shell (bash)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):33 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):36 +msgid "" +"You might wonder why you ought to learn Bash programming. Well, here are a " +"couple of compelling reasons:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):44 +msgid "You're already running it" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):47 +msgid "" +"If you check, you'll probably find that you are running bash right now. Even " +"if you changed your default shell, bash is probably still running somewhere " +"on your system, because it's the standard Linux shell and is used for a " +"variety of purposes. Because bash is already running, any additional bash " +"scripts that you run are inherently memory-efficient because they share " +"memory with any already-running bash processes. Why load a 500K interpreter " +"if you already are running something that will do the job, and do it well?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):60 +msgid "You're already using it" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):63 +msgid "" +"Not only are you already running bash, but you're actually interacting with " +"bash on a daily basis. It's always there, so it makes sense to learn how to " +"use it to its fullest potential. Doing so will make your bash experience " +"more fun and productive. But why should you learn bash programming? Easy, " +"because you already think in terms of running commands, CPing files, and " +"piping and redirecting output. Shouldn't you learn a language that allows " +"you to use and build upon these powerful time-saving constructs you already " +"know how to use? Command shells unlock the potential of a UNIX system, and " +"bash is the Linux shell. It's the high-level glue between you and the " +"machine. Grow in your knowledge of bash, and you'll automatically increase " +"your productivity under Linux and UNIX -- it's that simple." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):80 +msgid "Bash confusion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):83 +msgid "" +"Learning bash the wrong way can be a very confusing process. Many newbies " +"type <c>man bash</c> to view the bash man page, only to be confronted with a " +"very terse and technical description of shell functionality. Others type " +"<c>info bash</c> (to view the GNU info documentation), causing either the " +"man page to be redisplayed, or (if they are lucky) only slightly more " +"friendly info documentation to appear." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):92 +msgid "" +"While this may be somewhat disappointing to novices, the standard bash " +"documentation can't be all things to all people, and caters towards those " +"already familiar with shell programming in general. There's definitely a lot " +"of excellent technical information in the man page, but its helpfulness to " +"beginners is limited." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):100 +msgid "" +"That's where this series comes in. In it, I'll show you how to actually use " +"bash programming constructs, so that you will be able to write your own " +"scripts. Instead of technical descriptions, I'll provide you with " +"explanations in plain English, so that you will know not only what something " +"does, but when you should actually use it. By the end of this three-part " +"series, you'll be able to write your own intricate bash scripts, and be at " +"the level where you can comfortably use bash and supplement your knowledge " +"by reading (and understanding!) the standard bash documentation. Let's begin." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):114 +msgid "Environment variables" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):117 +msgid "" +"Under bash and almost all other shells, the user can define environment " +"variables, which are stored internally as ASCII strings. One of the handiest " +"things about environment variables is that they are a standard part of the " +"UNIX process model. This means that environment variables not only are " +"exclusive to shell scripts, but can be used by standard compiled programs as " +"well. When we \"export\" an environment variable under bash, any subsequent " +"program that we run can read our setting, whether it is a shell script or " +"not. A good example is the <c>vipw</c> command, which normally allows root " +"to edit the system password file. By setting the <c>EDITOR</c> environment " +"variable to the name of your favorite text editor, you can configure vipw to " +"use it instead of vi, a handy thing if you are used to xemacs and really " +"dislike vi." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):131 +msgid "The standard way to define an environment variable under bash is:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):135 +msgid "Defining environment variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):135 +#, no-wrap +msgid "" +"\n" +"$ <i>myvar='This is my environment variable!'</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):139 +msgid "" +"The above command defined an environment variable called \"myvar\" and " +"contains the string \"This is my environment variable!\". There are several " +"things to notice above: first, there is no space on either side of the \"=\" " +"sign; any space will result in an error (try it and see). The second thing " +"to notice is that while we could have done away with the quotes if we were " +"defining a single word, they are necessary when the value of the environment " +"variable is more than a single word (contains spaces or tabs)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(note):149 +msgid "" +"For extremely detailed information on how quotes should be used in bash, you " +"may want to look at the \"QUOTING\" section in the bash man page. The " +"existence of special character sequences that get \"expanded\" (replaced) " +"with other values does complicate how strings are handled in bash. We will " +"just cover the most often-used quoting functionality in this series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):157 +msgid "" +"Thirdly, while we can normally use double quotes instead of single quotes, " +"doing so in the above example would have caused an error. Why? Because using " +"single quotes disables a bash feature called expansion, where special " +"characters and sequences of characters are replaced with values. For " +"example, the \"!\" character is the history expansion character, which bash " +"normally replaces with a previously-typed command. (We won't be covering " +"history expansion in this series of articles, because it is not frequently " +"used in bash programming. For more information on it, see the \"HISTORY " +"EXPANSION\" section in the bash man page.) While this macro-like " +"functionality can come in handy, right now we want a literal exclamation " +"point at the end of our environment variable, rather than a macro." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):171 +msgid "" +"Now, let's take a look at how one actually uses environment variables. " +"Here's an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):176 +msgid "Using environment variables" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):176 +#, no-wrap +msgid "" +"\n" +"$ <i>echo $myvar</i>\n" +"This is my environment variable!\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):181 +msgid "" +"By preceding the name of our environment variable with a $, we can cause " +"bash to replace it with the value of myvar. In bash terminology, this is " +"called \"variable expansion\". But, what if we try the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):187 +msgid "First try to use variable expansion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):187 +#, no-wrap +msgid "" +"\n" +"$ <i>echo foo$myvarbar</i>\n" +"foo\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):192 +msgid "" +"We wanted this to echo \"fooThis is my environment variable!bar\", but it " +"didn't work. What went wrong? In a nutshell, bash's variable expansion " +"facility in got confused. It couldn't tell whether we wanted to expand the " +"variable $m, $my, $myvar, $myvarbar, etc. How can we be more explicit and " +"clearly tell bash what variable we are referring to? Try this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):200 +msgid "Proper variable expansion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):200 +#, no-wrap +msgid "" +"\n" +"$ <i>echo foo${myvar}bar</i>\n" +"fooThis is my environment variable!bar\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):205 +msgid "" +"As you can see, we can enclose the environment variable name in curly braces " +"when it is not clearly separated from the surrounding text. While $myvar is " +"faster to type and will work most of the time, ${myvar} can be parsed " +"correctly in almost any situation. Other than that, they both do the same " +"thing, and you will see both forms of variable expansion in the rest of this " +"series. You'll want to remember to use the more explicit curly-brace form " +"when your environment variable is not isolated from the surrounding text by " +"whitespace (spaces or tabs)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):216 +msgid "" +"Recall that we also mentioned that we can \"export\" variables. When we " +"export an environment variable, it's automatically available in the " +"environment of any subsequently-run script or executable. Shell scripts can " +"\"get to\" the environment variable using that shell's built-in environment-" +"variable support, while C programs can use the getenv() function call. " +"Here's some example C code that you should type in and compile -- it'll " +"allow us to understand environment variables from the perspective of C:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):226 +msgid "myvar.c -- a sample environment variable C program" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):226 +#, no-wrap +msgid "" +"\n" +"#include <stdio.h>\n" +"#include <stdlib.h>\n" +"\n" +"int main(void) {\n" +" char *myenvvar=getenv(\"EDITOR\");\n" +" printf(\"The editor environment variable is set to %s\\n\",myenvvar);\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):236 +msgid "" +"Save the above source into a file called <path>myenv.c</path>, and then " +"compile it by issuing the command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):241 +msgid "Compiling the above source" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):241 +#, no-wrap +msgid "" +"\n" +"$ <i>gcc myenv.c -o myenv</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):245 +msgid "" +"Now, there will be an executable program in your directory that, when run, " +"will print the value of the <c>EDITOR</c> environment variable, if any. This " +"is what happens when I run it on my machine:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):251 +msgid "Running the above program" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):251 +#, no-wrap +msgid "" +"\n" +"$ <i>./myenv</i>\n" +"The editor environment variable is set to (null)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):256 +msgid "" +"Hmmm... because the <c>EDITOR</c> environment variable was not set to " +"anything, the C program gets a null string. Let's try setting it to a " +"specific value:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):261 +msgid "Trying it with a specific value" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):261 +#, no-wrap +msgid "" +"\n" +"$ <i>EDITOR=xemacs</i>\n" +"$ <i>./myenv</i>\n" +"The editor environment variable is set to (null)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):267 +msgid "" +"While you might have expected myenv to print the value \"xemacs\", it didn't " +"quite work, because we didn't export the <c>EDITOR</c> environment variable. " +"This time, we'll get it working:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):273 +msgid "Same program after exporting variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):273 +#, no-wrap +msgid "" +"\n" +"$ <i>export EDITOR</i>\n" +"$ <i>./myenv</i>\n" +"The editor environment variable is set to xemacs\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):279 +msgid "" +"So, you have seen with your very own eyes that another process (in this case " +"our example C program) cannot see the environment variable until it is " +"exported. Incidentally, if you want, you can define and export an " +"environment variable using one line, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):286 +msgid "Defining and exporting an environment variable in one command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):286 +#, no-wrap +msgid "" +"\n" +"$ <i>export EDITOR=xemacs</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):290 +msgid "" +"It works identically to the two-line version. This would be a good time to " +"show how to erase an environment variable by using <c>unset</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):295 +msgid "Unsetting the variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):295 +#, no-wrap +msgid "" +"\n" +"$ <i>unset EDITOR</i>\n" +"$ <i>./myenv</i>\n" +"The editor environment variable is set to (null)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):304 +msgid "Chopping strings overview" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):307 +msgid "" +"Chopping strings -- that is, splitting an original string into smaller, " +"separate chunk(s) -- is one of those tasks that is performed daily by your " +"average shell script. Many times, shell scripts need to take a fully-" +"qualified path, and find the terminating file or directory. While it's " +"possible (and fun!) to code this in bash, the standard <c>basename</c> UNIX " +"executable performs this extremely well:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):316 +msgid "Using basename" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):316 +#, no-wrap +msgid "" +"\n" +"$ <i>basename /usr/local/share/doc/foo/foo.txt</i>\n" +"foo.txt\n" +"$ <i>basename /usr/home/drobbins</i>\n" +"drobbins\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):323 +msgid "" +"<c>basename</c> is quite a handy tool for chopping up strings. It's " +"companion, called <c>dirname</c>, returns the \"other\" part of the path " +"that <c>basename</c> throws away:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):329 +msgid "Using dirname" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):329 +#, no-wrap +msgid "" +"\n" +"$ <i>dirname /usr/local/share/doc/foo/foo.txt</i>\n" +"/usr/local/share/doc/foo\n" +"$ <i>dirname /usr/home/drobbins/</i>\n" +"/usr/home\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(note):336 +msgid "" +"Both <c>dirname</c> and <c>basename</c> do not look at any files or " +"directories on disk; they are purely string manipulation commands." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):344 +msgid "Command substitution" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):347 +msgid "" +"One very handy thing to know is how to create an environment variable that " +"contains the result of an executable command. This is very easy to do:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):352 +msgid "Creating an environment variable containing command result" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):352 +#, no-wrap +msgid "" +"\n" +"$ <i>MYDIR=`dirname /usr/local/share/doc/foo/foo.txt`</i>\n" +"$ <i>echo $MYDIR</i>\n" +"/usr/local/share/doc/foo\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):358 +msgid "" +"What we did above is called <e>command substitution</e>. Several things are " +"worth noticing in this example. On the first line, we simply enclosed the " +"command we wanted to execute in back quotes. Those are not standard single " +"quotes, but instead come from the keyboard key that normally sits above the " +"Tab key. We can do exactly the same thing with bash's alternate command " +"substitution syntax:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):366 +msgid "Alternate command substitution syntax" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):366 +#, no-wrap +msgid "" +"\n" +"$ <i>MYDIR=$(dirname /usr/local/share/doc/foo/foo.txt)</i>\n" +"$ <i>echo $MYDIR</i>\n" +"/usr/local/share/doc/foo\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):372 +msgid "" +"As you can see, bash provides multiple ways to perform exactly the same " +"thing. Using command substitution, we can place any command or pipeline of " +"commands in between <e>` `</e> or <e>$( )</e> and assign it to an " +"environment variable. Handy stuff! Here's an example of how to use a " +"pipeline with command substitution:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):380 +msgid "Pipeline command substitution" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):380 +#, no-wrap +msgid "" +"\n" +"$ <i>MYFILES=$(ls /etc | grep pa)</i>\n" +"$ <i>echo $MYFILES</i>\n" +"pam.d passwd\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):389 +msgid "Chopping strings like a pro" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):392 +msgid "" +"While <c>basename</c> and <c>dirname</c> are great tools, there are times " +"where we may need to perform more advanced string \"chopping\" operations " +"than just standard pathname manipulations. When we need more punch, we can " +"take advantage of bash's advanced built-in variable expansion functionality. " +"We've already used the standard kind of variable expansion, which looks like " +"this: ${MYVAR}. But bash can also perform some handy string chopping on its " +"own. Take a look at these examples:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):402 +msgid "Examples of strings chopping" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):402 +#, no-wrap +msgid "" +"\n" +"$ <i>MYVAR=foodforthought.jpg</i>\n" +"$ <i>echo ${MYVAR##*fo}</i>\n" +"rthought.jpg\n" +"$ <i>echo ${MYVAR#*fo}</i>\n" +"odforthought.jpg\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):410 +msgid "" +"In the first example, we typed ${MYVAR##*fo}. What exactly does this mean? " +"Basically, inside the ${ }, we typed the name of the environment variable, " +"two ##s, and a wildcard (\"*fo\"). Then, bash took <c>MYVAR</c>, found the " +"longest substring from the beginning of the string \"foodforthought.jpg\" " +"that matched the wildcard \"*fo\", and chopped it off the beginning of the " +"string. That's a bit hard to grasp at first, so to get a feel for how this " +"special \"##\" option works, let's step through how bash completed this " +"expansion. First, it began searching for substrings at the beginning of " +"\"foodforthought.jpg\" that matched the \"*fo\" wildcard. Here are the " +"substrings that it checked:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):422 +msgid "Substrings being checked" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):422 +#, no-wrap +msgid "" +"\n" +"f \n" +"fo MATCHES *fo\n" +"foo \n" +"food\n" +"foodf \n" +"foodfo MATCHES *fo\n" +"foodfor\n" +"foodfort \n" +"foodforth\n" +"foodfortho \n" +"foodforthou\n" +"foodforthoug\n" +"foodforthought\n" +"foodforthought.j\n" +"foodforthought.jp\n" +"foodforthought.jpg\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):441 +msgid "" +"After searching the string for matches, you can see that bash found two. It " +"selects the longest match, removes it from the beginning of the original " +"string, and returns the result." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):447 +msgid "" +"The second form of variable expansion shown above appears identical to the " +"first, except it uses only one \"#\" -- and bash performs an almost " +"identical process. It checks the same set of substrings as our first example " +"did, except that bash removes the shortest match from our original string, " +"and returns the result. So, as soon as it checks the \"fo\" substring, it " +"removes \"fo\" from our string and returns \"odforthought.jpg\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):456 +msgid "" +"This may seem extremely cryptic, so I'll show you an easy way to remember " +"this functionality. When searching for the longest match, use ## (because ## " +"is longer than #). When searching for the shortest match, use #. See, not " +"that hard to remember at all! Wait, how do you remember that we are supposed " +"to use the '#' character to remove from the *beginning* of a string? Simple! " +"You will notice that on a US keyboard, shift-4 is \"$\", which is the bash " +"variable expansion character. On the keyboard, immediately to the left of \"$" +"\" is \"#\". So, you can see that \"#\" is \"at the beginning\" of \"$\", " +"and thus (according to our mnemonic), \"#\" removes characters from the " +"beginning of the string. You may wonder how we remove characters from the " +"end of the string. If you guessed that we use the character immediately to " +"the right of \"$\" on the US keyboard (\"%\"), you're right! Here are some " +"quick examples of how to chop off trailing portions of strings:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):472 +#, no-wrap +msgid "" +"\n" +"$ <i>MYFOO=\"chickensoup.tar.gz\"</i>\n" +"$ <i>echo ${MYFOO%%.*}</i>\n" +"chickensoup\n" +"$ <i>echo ${MYFOO%.*}</i>\n" +"chickensoup.tar\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):480 +msgid "" +"As you can see, the % and %% variable expansion options work identically to " +"# and ##, except they remove the matching wildcard from the end of the " +"string. Note that you don't have to use the \"*\" character if you wish to " +"remove a specific substring from the end:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):487 +msgid "Removing substrings from the end" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):487 +#, no-wrap +msgid "" +"\n" +"<i>MYFOOD=\"chickensoup\"</i>\n" +"$ <i>echo ${MYFOOD%%soup}</i>\n" +"chicken\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):493 +msgid "" +"In this example, it doesn't matter whether we use \"%%\" or \"%\", since " +"only one match is possible. And remember, if you forget whether to use \"#\" " +"or \"%\", look at the 3, 4, and 5 keys on your keyboard and figure it out." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):499 +msgid "" +"We can use another form of variable expansion to select a specific " +"substring, based on a specific character offset and length. Try typing in " +"the following lines under bash:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):505 +msgid "Selecting a specific substring" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):505 +#, no-wrap +msgid "" +"\n" +"$ <i>EXCLAIM=cowabunga</i>\n" +"$ <i>echo ${EXCLAIM:0:3}</i>\n" +"cow\n" +"$ <i>echo ${EXCLAIM:3:7}</i>\n" +"abunga\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):513 +msgid "" +"This form of string chopping can come in quite handy; simply specify the " +"character to start from and the length of the substring, all separated by " +"colons." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):522 +msgid "Applying string chopping" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):525 +msgid "" +"Now that we've learned all about chopping strings, let's write a simple " +"little shell script. Our script will accept a single file as an argument, " +"and will print out whether it appears to be a tarball. To determine if it is " +"a tarball, it will look for the pattern \".tar\" at the end of the file. " +"Here it is:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):532 +msgid "mytar.sh -- a sample script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):532 +#, no-wrap +msgid "" +"\n" +"#!/bin/bash\n" +"\n" +"if [ \"${1##*.}\" = \"tar\" ]\n" +"then\n" +" echo This appears to be a tarball.\n" +"else\n" +" echo At first glance, this does not appear to be a tarball.\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):543 +msgid "" +"To run this script, enter it into a file called <path>mytar.sh</path>, and " +"type <c>chmod 755 mytar.sh</c> to make it executable. Then, give it a try on " +"a tarball, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):549 +msgid "Trying the script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):549 +#, no-wrap +msgid "" +"\n" +"$ <i>./mytar.sh thisfile.tar</i>\n" +"This appears to be a tarball.\n" +"$ <i>./mytar.sh thatfile.gz</i>\n" +"At first glance, this does not appear to be a tarball.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):556 +msgid "" +"OK, it works, but it's not very functional. Before we make it more useful, " +"let's take a look at the \"if\" statement used above. In it, we have a " +"boolean expression. In bash, the \"=\" comparison operator checks for string " +"equality. In bash, all boolean expressions are enclosed in square brackets. " +"But what does the boolean expression actually test for? Let's take a look at " +"the left side. According to what we've learned about string chopping, " +"\"${1##*.}\" will remove the longest match of \"*.\" from the beginning of " +"the string contained in the environment variable \"1\", returning the " +"result. This will cause everything after the last \".\" in the file to be " +"returned. Obviously, if the file ends in \".tar\", we will get \"tar\" as a " +"result, and the condition will be true." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):569 +msgid "" +"You may be wondering what the \"1\" environment variable is in the first " +"place. Very simple -- $1 is the first command-line argument to the script, " +"$2 is the second, etc. OK, now that we've reviewed the function, we can take " +"our first look at \"if\" statements." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):579 +msgid "If statements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):582 +msgid "" +"Like most languages, bash has its own form of conditional. When using them, " +"stick to the format above; that is, keep the \"if\" and the \"then\" on " +"separate lines, and keep the \"else\" and the terminating and required \"fi" +"\" in horizontal alignment with them. This makes the code easier to read and " +"debug. In addition to the \"if,else\" form, there are several other forms of " +"\"if\" statements:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):590 +msgid "Basic form of if statement" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):590 +#, no-wrap +msgid "" +"\n" +"if [ condition ]\n" +"then\n" +" action\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):597 +msgid "" +"This one performs an action only if condition is true, otherwise it performs " +"no action and continues executing any lines following the \"fi\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre:caption):602 +msgid "Checking condition before continuing with commands following fi" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(pre):602 +#, no-wrap +msgid "" +"\n" +"if [ condition ]\n" +"then \n" +" action\n" +"elif [ condition2 ]\n" +"then\n" +" action2\n" +".\n" +".\n" +".\n" +"elif [ condition3 ]\n" +"then\n" +"\n" +"else\n" +" actionx\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):620 +msgid "" +"The above \"elif\" form will consecutively test each condition and execute " +"the action corresponding to the first true condition. If none of the " +"conditions are true, it will execute the \"else\" action, if one is present, " +"and then continue executing lines following the entire \"if,elif,else\" " +"statement." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):630 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(p):633 +msgid "" +"Now that we've covered the most basic bash functionality, it's time to pick " +"up the pace and get ready to write some real scripts. In the next article, " +"I'll cover looping constructs, functions, namespace, and other essential " +"topics. Then, we'll be ready to write some more complicated scripts. In the " +"third article, we'll focus almost exclusively on very complex scripts and " +"functions, as well as several bash script design options. See you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):647 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(title):649 +msgid "Useful links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(li):653 +msgid "" +"Read <uri link=\"http://www.gentoo.org/doc/en/articles/bash-by-example-p2.xml" +"\">Bash by example: Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(li):658 +msgid "" +"Read <uri link=\"http://www.gentoo.org/doc/en/articles/bash-by-example-p3.xml" +"\">Bash by example: Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(li):663 +msgid "" +"Visit <uri link=\"http://www.gnu.org/software/bash/bash.html\">GNU's bash " +"home page</uri>" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/bash-by-example-p2.xml.po b/article/gettext/ru/bash-by-example-p2.xml.po new file mode 100644 index 0000000..0722a45 --- /dev/null +++ b/article/gettext/ru/bash-by-example-p2.xml.po @@ -0,0 +1,894 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(guide:link):5 +msgid "/doc/en/articles/bash-by-example-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):6 +msgid "Bash by example, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(abstract):12 +msgid "" +"In his introductory article on bash, Daniel Robbins walked you through some " +"of the scripting language's basic elements and reasons for using bash. In " +"this, the second installment, Daniel picks up where he left off and looks at " +"bash's basic constructs like conditional (if-then) statements, looping, and " +"more." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(version):24 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(date):25 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):28 +msgid "More bash programming fundamentals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):30 +msgid "Accepting arguments" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):33 +msgid "" +"Let's start with a brief tip on handling command-line arguments, and then " +"look at bash's basic programming constructs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):38 +msgid "" +"In the sample program in the <uri link=\"/doc/en/articles/bash-by-example-p1." +"xml\">introductory article</uri>, we used the environment variable \"$1\", " +"which referred to the first command-line argument. Similarly, you can use " +"\"$2\", \"$3\", etc. to refer to the second and third arguments passed to " +"your script. Here's an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):46 +msgid "Referring to arguments passed to the script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):46 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env bash\n" +"\n" +"echo name of script is $0\n" +"echo first argument is $1\n" +"echo second argument is $2\n" +"echo seventeenth argument is $17\n" +"echo number of arguments is $#\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):56 +msgid "" +"The example is self explanatory except for two small details. First, \"$0\" " +"will expand to the name of the script, as called from the command line, and " +"\"$#\" will expand to the number of arguments passed to the script. Play " +"around with the above script, passing different kinds of command-line " +"arguments to get the hang of how it works." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):64 +msgid "" +"Sometimes, it's helpful to refer to all command-line arguments at once. For " +"this purpose, bash features the \"$@\" variable, which expands to all " +"command-line parameters separated by spaces. We'll see an example of its use " +"when we take a look at \"for\" loops, a bit later in this article." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):74 +msgid "Bash programming constructs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):77 +msgid "" +"If you've programmed in a procedural language like C, Pascal, Python, or " +"Perl, then you're familiar with standard programming constructs like \"if\" " +"statements, \"for\" loops, and the like. Bash has its own versions of most " +"of these standard constructs. In the next several sections, I will introduce " +"several bash constructs and demonstrate the differences between these " +"constructs and others you are already familiar with from other programming " +"languages. If you haven't programmed much before, don't worry. I include " +"enough information and examples so that you can follow the text." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):91 +msgid "Conditional love" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):94 +msgid "" +"If you've ever programmed any file-related code in C, you know that it " +"requires a significant amount of effort to see if a particular file is newer " +"than another. That's because C doesn't have any built-in syntax for " +"performing such a comparison; instead, two stat() calls and two stat " +"structures must be used to perform the comparison by hand. In contrast, bash " +"has standard file comparison operators built in, so determining if \"<path>/" +"tmp/myfile</path> is readable\" is as easy as checking to see if \"<c>" +"$myvar</c> is greater than 4\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):104 +msgid "" +"The following table lists the most frequently used bash comparison " +"operators. You'll also find an example of how to use every option correctly. " +"The example is meant to be placed immediately after the \"if\". For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):110 +msgid "Bash comparison operator" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):110 +#, no-wrap +msgid "" +"\n" +"if [ -z \"$myvar\" ]\n" +"then\n" +" echo \"myvar is not defined\"\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):117 +msgid "" +"Sometimes, there are several different ways that a particular comparison can " +"be made. For example, the following two snippets of code function " +"identically:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):122 +msgid "Two ways of making comparison" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):122 +#, no-wrap +msgid "" +"\n" +"if [ \"$myvar\" -eq 3 ]\n" +"then \n" +" echo \"myvar equals 3\"\n" +"fi\n" +"\n" +"if [ \"$myvar\" = \"3\" ]\n" +"then\n" +" echo \"myvar equals 3\"\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):134 +msgid "" +"In the above two comparisons do exactly the same thing, but the first uses " +"arithmetic comparison operators, while the second uses string comparison " +"operators." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):143 +msgid "String comparison caveats" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):146 +msgid "" +"Most of the time, while you can omit the use of double quotes surrounding " +"strings and string variables, it's not a good idea. Why? Because your code " +"will work perfectly, unless an environment variable happens to have a space " +"or a tab in it, in which case bash will get confused. Here's an example of a " +"fouled-up comparison:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):154 +msgid "Fouled-up comparison example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):154 +#, no-wrap +msgid "" +"\n" +"if [ $myvar = \"foo bar oni\" ]\n" +"then\n" +" echo \"yes\"\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):161 +msgid "" +"In the above example, if myvar equals \"foo\", the code will work as " +"expected and not print anything. However, if myvar equals \"foo bar oni\", " +"the code will fail with the following error:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):167 +msgid "Error when variable contains spaces" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):167 +#, no-wrap +msgid "" +"\n" +"[: too many arguments\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):171 +msgid "" +"In this case, the spaces in \"$myvar\" (which equals \"foo bar oni\") end up " +"confusing bash. After bash expands \"$myvar\", it ends up with the following " +"comparison:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):177 +msgid "Ending comparison" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):177 +#, no-wrap +msgid "" +"\n" +"[ foo bar oni = \"foo bar oni\" ]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):181 +msgid "" +"Because the environment variable wasn't placed inside double quotes, bash " +"thinks that you stuffed too many arguments in-between the square brackets. " +"You can easily eliminate this problem by surrounding the string arguments " +"with double-quotes. Remember, if you get into the habit of surrounding all " +"string arguments and environment variables with double-quotes, you'll " +"eliminate many similar programming errors. Here's how the \"foo bar oni\" " +"comparison should have been written:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):191 +msgid "Proper way of comparison writing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):191 +#, no-wrap +msgid "" +"\n" +"if [ \"$myvar\" = \"foo bar oni\" ]\n" +"then\n" +" echo \"yes\"\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):198 +msgid "" +"The above code will work as expected and will not create any unpleasant " +"surprises." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(note):203 +msgid "" +"If you want your environment variables to be expanded, you must enclose them " +"in double quotes, rather than single quotes. Single quotes disable variable " +"(as well as history) expansion." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):212 +msgid "Looping constructs: \"for\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):215 +msgid "" +"OK, we've covered conditionals, now it's time to explore bash looping " +"constructs. We'll start with the standard \"for\" loop. Here's a basic " +"example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):220 +msgid "Basic for example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):220 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env bash\n" +"\n" +"for x in one two three four\n" +"do\n" +" echo number $x\n" +"done\n" +"\n" +"<comment>Output:</comment>\n" +"number one\n" +"number two \n" +"number three \n" +"number four\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):235 +msgid "" +"What exactly happened? The \"for x\" part of our \"for\" loop defined a new " +"environment variable (also called a loop control variable) called \"$x\", " +"which was successively set to the values \"one\", \"two\", \"three\", and " +"\"four\". After each assignment, the body of the loop (the code between the " +"\"do\" ... \"done\") was executed once. In the body, we referred to the loop " +"control variable \"$x\" using standard variable expansion syntax, like any " +"other environment variable. Also notice that \"for\" loops always accept " +"some kind of word list after the \"in\" statement. In this case we specified " +"four English words, but the word list can also refer to file(s) on disk or " +"even file wildcards. Look at the following example, which demonstrates how " +"to use standard shell wildcards:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):248 +msgid "Using standard shell wildcards" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):248 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env bash\n" +"\n" +"for myfile in /etc/r*\n" +"do\n" +" if [ -d \"$myfile\" ] \n" +" then\n" +" echo \"$myfile (dir)\"\n" +" else\n" +" echo \"$myfile\"\n" +" fi\n" +"done\n" +"\n" +"output:\n" +"\n" +"/etc/rc.d (dir)\n" +"/etc/resolv.conf\n" +"/etc/resolv.conf~\n" +"/etc/rpc\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):269 +msgid "" +"The above code looped over each file in <path>/etc</path> that began with an " +"\"r\". To do this, bash first took our wildcard /etc/r* and expanded it, " +"replacing it with the string <path>/etc/rc.d</path><path>/etc/resolv.conf</" +"path><path>/etc/resolv.conf~</path><path>/etc/rpc</path> before executing " +"the loop. Once inside the loop, the \"-d\" conditional operator was used to " +"perform two different actions, depending on whether myfile was a directory " +"or not. If it was, a \" (dir)\" was appended to the output line." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):279 +msgid "" +"We can also use multiple wildcards and even environment variables in the " +"word list:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):284 +msgid "Multiple wildcards and environment variables" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):284 +#, no-wrap +msgid "" +"\n" +"for x in /etc/r??? /var/lo* /home/drobbins/mystuff/* /tmp/${MYPATH}/*\n" +"do\n" +" cp $x /mnt/mydira\n" +"done\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):291 +msgid "" +"Bash will perform wildcard and variable expansion in all the right places, " +"and potentially create a very long word list." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):296 +msgid "" +"While all of our wildcard expansion examples have used absolute paths, you " +"can also use relative paths, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):301 +msgid "Using relative paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):301 +#, no-wrap +msgid "" +"\n" +"for x in ../* mystuff/*\n" +"do\n" +" echo $x is a silly file\n" +"done\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):308 +msgid "" +"In the above example, bash performs wildcard expansion relative to the " +"current working directory, just like when you use relative paths on the " +"command line. Play around with wildcard expansion a bit. You'll notice that " +"if you use absolute paths in your wildcard, bash will expand the wildcard to " +"a list of absolute paths. Otherwise, bash will use relative paths in the " +"subsequent word list. If you simply refer to files in the current working " +"directory (for example, if you type <c>for x in *</c>), the resultant list " +"of files will not be prefixed with any path information. Remember that " +"preceding path information can be stripped using the <c>basename</c> " +"executable, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):320 +msgid "Stripping preceding path with basename" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):320 +#, no-wrap +msgid "" +"\n" +"for x in /var/log/*\n" +"do\n" +" echo `basename $x` is a file living in /var/log\n" +"done\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):327 +msgid "" +"Of course, it's often handy to perform loops that operate on a script's " +"command-line arguments. Here's an example of how to use the \"$@\" variable, " +"introduced at the beginning of this article:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):333 +msgid "Example use of $@ variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):333 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env bash\n" +"\n" +"for thing in \"$@\"\n" +"do\n" +" echo you typed ${thing}.\n" +"done\n" +"\n" +"<comment>output:</comment>\n" +"\n" +"$ allargs hello there you silly\n" +"you typed hello.\n" +"you typed there.\n" +"you typed you.\n" +"you typed silly.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):353 +msgid "Shell arithmetic" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):356 +msgid "" +"Before looking at a second type of looping construct, it's a good idea to " +"become familiar with performing shell arithmetic. Yes, it's true: You can " +"perform simple integer math using shell constructs. Simply enclose the " +"particular arithmetic expression between a \"$((\" and a \"))\", and bash " +"will evaluate the expression. Here are some examples:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):364 +msgid "Counting in bash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):364 +#, no-wrap +msgid "" +"\n" +"$ <i>echo $(( 100 / 3 ))</i>\n" +"33\n" +"$ <i>myvar=\"56\"</i>\n" +"$ <i>echo $(( $myvar + 12 ))</i>\n" +"68\n" +"$ <i>echo $(( $myvar - $myvar ))</i>\n" +"0\n" +"$ <i>myvar=$(( $myvar + 1 ))</i>\n" +"$ <i>echo $myvar</i>\n" +"57\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):377 +msgid "" +"Now that you're familiar performing mathematical operations, it's time to " +"introduce two other bash looping constructs, \"while\" and \"until\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):385 +msgid "More looping constructs: \"while\" and \"until\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):388 +msgid "" +"A \"while\" statement will execute as long as a particular condition is " +"true, and has the following format:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):393 +msgid "While statement template" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):393 +#, no-wrap +msgid "" +"\n" +"while [ condition ]\n" +"do\n" +" statements\n" +"done\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):400 +msgid "" +"\"While\" statements are typically used to loop a certain number of times, " +"as in the following example, which will loop exactly 10 times:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):405 +msgid "Looping the statement 10 times" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):405 +#, no-wrap +msgid "" +"\n" +"myvar=0\n" +"while [ $myvar -ne 10 ]\n" +"do\n" +" echo $myvar\n" +" myvar=$(( $myvar + 1 ))\n" +"done\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):414 +msgid "" +"You can see the use of arithmetic expansion to eventually cause the " +"condition to be false, and the loop to terminate." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):419 +msgid "" +"\"Until\" statements provide the inverse functionality of \"while\" " +"statements: They repeat as long as a particular condition is false. Here's " +"an \"until\" loop that functions identically to the previous \"while\" loop:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):425 +msgid "Until loop example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):425 +#, no-wrap +msgid "" +"\n" +"myvar=0\n" +"until [ $myvar -eq 10 ]\n" +"do\n" +" echo $myvar\n" +" myvar=$(( $myvar + 1 ))\n" +"done\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):437 +msgid "Case statements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):440 +msgid "" +"\"Case\" statements are another conditional construct that comes in handy. " +"Here's an example snippet:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):445 +msgid "Example case statement snippet" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):445 +#, no-wrap +msgid "" +"\n" +"case \"${x##*.}\" in\n" +" gz)\n" +" gzunpack ${SROOT}/${x}\n" +" ;;\n" +" bz2)\n" +" bz2unpack ${SROOT}/${x}\n" +" ;;\n" +" *)\n" +" echo \"Archive format not recognized.\"\n" +" exit\n" +" ;;\n" +"esac\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):460 +msgid "" +"Above, bash first expands \"${x##*.}\". In the code, \"$x\" is the name of a " +"file, and \"${x##*.}\" has the effect of stripping all text except that " +"following the last period in the filename. Then, bash compares the resultant " +"string against the values listed to the left of the \")\"s. In this case, " +"\"${x##*.}\" gets compared against \"gz\", then \"bz2\" and finally \"*\". " +"If \"${x##*.}\" matches any of these strings or patterns, the lines " +"immediately following the \")\" are executed, up until the \";;\", at which " +"point bash continues executing lines after the terminating \"esac\". If no " +"patterns or strings are matched, no lines of code are executed; however, in " +"this particular code snippet, at least one block of code will execute, " +"because the \"*\" pattern will catch everything that didn't match \"gz\" or " +"\"bz2\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):477 +msgid "Functions and namespaces" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):480 +msgid "" +"In bash, you can even define functions, similar to those in other procedural " +"languages like Pascal and C. In bash, functions can even accept arguments, " +"using a system very similar to the way scripts accept command-line " +"arguments. Let's take a look at a sample function definition and then " +"proceed from there:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):487 +msgid "Sample function definition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):487 +#, no-wrap +msgid "" +"\n" +"tarview() {\n" +" echo -n \"Displaying contents of $1 \"\n" +" if [ ${1##*.} = tar ]\n" +" then\n" +" echo \"(uncompressed tar)\"\n" +" tar tvf $1\n" +" elif [ ${1##*.} = gz ]\n" +" then\n" +" echo \"(gzip-compressed tar)\"\n" +" tar tzvf $1\n" +" elif [ ${1##*.} = bz2 ]\n" +" then\n" +" echo \"(bzip2-compressed tar)\"\n" +" cat $1 | bzip2 -d | tar tvf -\n" +" fi\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(note):506 +msgid "" +"Another case: The above code could have been written using a \"case\" " +"statement. Can you figure out how?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):511 +msgid "" +"Above, we define a function called \"tarview\" that accepts one argument, a " +"tarball of some kind. When the function is executed, it identifies what type " +"of tarball the argument is (either uncompressed, gzip-compressed, or bzip2-" +"compressed), prints out a one-line informative message, and then displays " +"the contents of the tarball. This is how the above function should be called " +"(whether from a script or from the command line, after it has been typed in, " +"pasted in, or sourced):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):521 +msgid "Calling the above function" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):521 +#, no-wrap +msgid "" +"\n" +"$ <i>tarview shorten.tar.gz</i>\n" +"Displaying contents of shorten.tar.gz (gzip-compressed tar)\n" +"drwxr-xr-x ajr/abbot 0 1999-02-27 16:17 shorten-2.3a/\n" +"-rw-r--r-- ajr/abbot 1143 1997-09-04 04:06 shorten-2.3a/Makefile\n" +"-rw-r--r-- ajr/abbot 1199 1996-02-04 12:24 shorten-2.3a/INSTALL\n" +"-rw-r--r-- ajr/abbot 839 1996-05-29 00:19 shorten-2.3a/LICENSE\n" +"....\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):531 +msgid "" +"As you can see, arguments can be referenced inside the function definition " +"by using the same mechanism used to reference command-line arguments. In " +"addition, the \"$#\" macro will be expanded to contain the number of " +"arguments. The only thing that may not work completely as expected is the " +"variable \"$0\", which will either expand to the string \"bash\" (if you run " +"the function from the shell, interactively) or to the name of the script the " +"function is called from." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(note):540 +msgid "" +"Use'em interactively: Don't forget that functions, like the one above, can " +"be placed in your ~/.bashrc or ~/.bash_profile so that they are available " +"for use whenever you are in bash." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):549 +msgid "Namespace" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):552 +msgid "" +"Often, you'll need to create environment variables inside a function. While " +"possible, there's a technicality you should know about. In most compiled " +"languages (such as C), when you create a variable inside a function, it's " +"placed in a separate local namespace. So, if you define a function in C " +"called myfunction, and in it define a variable called \"x\", any global " +"(outside the function) variable called \"x\" will not be affected by it, " +"eliminating side effects." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):562 +msgid "" +"While true in C, this isn't true in bash. In bash, whenever you create an " +"environment variable inside a function, it's added to the global namespace. " +"This means that it will overwrite any global variable outside the function, " +"and will continue to exist even after the function exits:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):569 +msgid "Variable handling in bash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):569 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env bash\n" +"\n" +"myvar=\"hello\"\n" +"\n" +"myfunc() {\n" +"\n" +" myvar=\"one two three\"\n" +" for x in $myvar\n" +" do\n" +" echo $x\n" +" done\n" +"}\n" +"\n" +"myfunc\n" +"\n" +"echo $myvar $x\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):588 +msgid "" +"When this script is run, it produces the output \"one two three three\", " +"showing how \"$myvar\" defined in the function clobbered the global variable " +"\"$myvar\", and how the loop control variable \"$x\" continued to exist even " +"after the function exited (and also would have clobbered any global \"$x\", " +"if one were defined)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):595 +msgid "" +"In this simple example, the bug is easy to spot and to compensate for by " +"using alternate variable names. However, this isn't the right approach; the " +"best way to solve this problem is to prevent the possibility of clobbering " +"global variables in the first place, by using the \"local\" command. When we " +"use \"local\" to create variables inside a function, they will be kept in " +"the local namespace and not clobber any global variables. Here's how to " +"implement the above code so that no global variables are overwritten:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre:caption):605 +msgid "Assuring no global variables will be overwritten" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(pre):605 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env bash\n" +"\n" +"myvar=\"hello\"\n" +"\n" +"myfunc() {\n" +" local x\n" +" local myvar=\"one two three\"\n" +" for x in $myvar\n" +" do\n" +" echo $x\n" +" done\n" +"}\n" +"\n" +"myfunc\n" +"\n" +"echo $myvar $x\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):624 +msgid "" +"This function will produce the output \"hello\" -- the global \"$myvar\" " +"doesn't get overwritten, and \"$x\" doesn't continue to exist outside of " +"myfunc. In the first line of the function, we create x, a local variable " +"that is used later, while in the second example (local myvar=\"one two three" +"\"\") we create a local myvar and assign it a value. The first form is handy " +"for keeping loop control variables local, since we're not allowed to say " +"\"for local x in $myvar\". This function doesn't clobber any global " +"variables, and you are encouraged to design all your functions this way. The " +"only time you should not use \"local\" is when you explicitly want to modify " +"a global variable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):639 +msgid "Wrapping it up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(p):642 +msgid "" +"Now that we've covered the most essential bash functionality, it's time to " +"look at how to develop an entire application based in bash. In my next " +"installment, we'll do just that. See you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):653 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(title):655 +msgid "Useful links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(li):659 +msgid "" +"Read <uri link=\"/doc/en/articles/bash-by-example-p1.xml\"> Bash by example: " +"Part 1</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(li):663 +msgid "" +"Read <uri link=\"/doc/en/articles/bash-by-example-p3.xml\">Bash by example: " +"Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(li):668 +msgid "" +"Visit <uri link=\"http://www.gnu.org/software/bash/bash.html\">GNU's bash " +"home page</uri>" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/bash-by-example-p3.xml.po b/article/gettext/ru/bash-by-example-p3.xml.po new file mode 100644 index 0000000..3563a31 --- /dev/null +++ b/article/gettext/ru/bash-by-example-p3.xml.po @@ -0,0 +1,1071 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(guide:link):5 +msgid "/doc/en/articles/bash-by-example-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):6 +msgid "Bash by example, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(abstract):12 +msgid "" +"In his final Bash by example article, Daniel Robbins takes a good look at " +"the Gentoo Linux ebuild system, an excellent example of the power of bash. " +"Step by step, he shows you how the ebuild system was implemented, and " +"touches on many handy bash techniques and design strategies. By the end of " +"the article, you'll have a good grasp of what's involved in producing a full-" +"blown bash-based application, as well as a start at coding your own auto-" +"build system." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(version):26 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(date):27 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):30 +msgid "Exploring the ebuild system" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):32 +msgid "Enter the ebuild system" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):35 +msgid "" +"I've really been looking forward to this third and final <e>Bash by example</" +"e> article, because now that we've already covered bash programming " +"fundamentals in <uri link=\"/doc/en/articles/bash-by-example-p1.xml\">Part " +"1</uri> and <uri link=\"/doc/en/articles/bash-by-example-p2.xml\">Part 2</" +"uri>, we can focus on more advanced topics, like bash application " +"development and program design. For this article, I will give you a good " +"dose of practical, real-world bash development experience by presenting a " +"project that I've spent many hours coding and refining: The Gentoo Linux " +"ebuild system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):46 +msgid "" +"I'm the chief architect of Gentoo Linux, a next-generation Linux OS " +"currently in beta. One of my primary responsibilities is to make sure that " +"all of the binary packages (similar to RPM packages) are created properly " +"and work together. As you probably know, a standard Linux system is not " +"composed of a single unified source tree (like BSD), but is actually made up " +"of about 25+ core packages that work together. Some of the packages include:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(th):57 +msgid "Package" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(th):58 +msgid "Description" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):61 +msgid "linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):62 +msgid "The actual kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):65 +msgid "util-linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):66 +msgid "A collection of miscellaneous Linux-related programs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):69 +msgid "e2fsprogs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):70 +msgid "A collection of ext2 filesystem-related utilities" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):73 +msgid "glibc" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(ti):74 +msgid "The GNU C library" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):78 +msgid "" +"Each package is in its own tarball and is maintained by separate independent " +"developers, or teams of developers. To create a distribution, each package " +"has to be separately downloaded, compiled, and packaged. Every time a " +"package must be fixed, upgraded, or improved, the compilation and packaging " +"steps must be repeated (and this gets old really fast). To help eliminate " +"the repetitive steps involved in creating and updating packages, I created " +"the ebuild system, written almost entirely in bash. To enhance your bash " +"knowledge, I'll show you how I implemented the unpack and compile portions " +"of the ebuild system, step by step. As I explain each step, I'll also " +"discuss why certain design decisions were made. By the end of this article, " +"not only will you have an excellent grasp of larger-scale bash programming " +"projects, but you'll also have implemented a good portion of a complete auto-" +"build system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):96 +msgid "Why bash?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):99 +msgid "" +"Bash is an essential component of the Gentoo Linux ebuild system. It was " +"chosen as ebuild's primary language for a number of reasons. First, it has " +"an uncomplicated and familiar syntax that is especially well suited for " +"calling external programs. An auto-build system is \"glue code\" that " +"automates the calling of external programs, and bash is very well suited to " +"this type of application. Second, Bash's support for functions allowed the " +"ebuild system to have modular, easy-to-understand code. Third, the ebuild " +"system takes advantage of bash's support for environment variables, allowing " +"package maintainers and developers to configure it easily, on-the-fly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):114 +msgid "Build process review" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):117 +msgid "" +"Before we look at the ebuild system, let's review what's involved in getting " +"a package compiled and installed. For our example, we will look at the \"sed" +"\" package, a standard GNU text stream editing utility that is part of all " +"Linux distributions. First, download the source tarball (<path>sed-3.02.tar." +"gz</path>) (see <uri link=\"#resources\">Resources</uri>). We will store " +"this archive in <path>/usr/src/distfiles</path>, a directory we will refer " +"to using the environment variable <c>$DISTDIR</c>. <c>$DISTDIR</c> is the " +"directory where all of our original source tarballs live; it's a big vault " +"of source code." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):128 +msgid "" +"Our next step is to create a temporary directory called <path>work</path>, " +"which houses the uncompressed sources. We'll refer to this directory later " +"using the <c>$WORKDIR</c> environment variable. To do this, change to a " +"directory where we have write permission and type the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):135 +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):148 +msgid "Uncompressing sed into a temporary directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):135 +#, no-wrap +msgid "" +"\n" +"$ <i>mkdir work</i>\n" +"$ <i>cd work</i>\n" +"$ <i>tar xzf /usr/src/distfiles/sed-3.02.tar.gz</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):141 +msgid "" +"The tarball is then decompressed, creating a directory called " +"<path>sed-3.02</path> that contains all of the sources. We'll refer to the " +"<path>sed-3.02</path> directory later using the environment variable <c>" +"$SRCDIR</c>. To compile the program, type the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):148 +#, no-wrap +msgid "" +"\n" +"$ <i>cd sed-3.02</i>\n" +"$ <i>./configure --prefix=/usr</i>\n" +"<comment>(autoconf generates appropriate makefiles, this can take a while)</comment>\n" +"\n" +"$ <i>make</i>\n" +"\n" +"<comment>(the package is compiled from sources, also takes a bit of time)</comment>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):158 +msgid "" +"We're going to skip the \"make install\" step, since we are just covering " +"the unpack and compile steps in this article. If we wanted to write a bash " +"script to perform all these steps for us, it could look something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):164 +msgid "Sample bash script to perform the unpack/compile process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):164 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env bash\n" +"\n" +"if [ -d work ]\n" +"then\n" +"<comment># remove old work directory if it exists</comment>\n" +" rm -rf work\n" +"fi\n" +"mkdir work\n" +"cd work\n" +"tar xzf /usr/src/distfiles/sed-3.02.tar.gz\n" +"cd sed-3.02\n" +"./configure --prefix=/usr\n" +"make\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):183 +msgid "Generalizing the code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):186 +msgid "" +"Although this autocompile script works, it's not very flexible. Basically, " +"the bash script just contains the listing of all the commands that were " +"typed at the command line. While this solution works, it would be nice to " +"make a generic script that can be configured quickly to unpack and compile " +"any package just by changing a few lines. That way, it's much less work for " +"the package maintainer to add new packages to the distribution. Let's take a " +"first stab at doing this by using lots of different environment variables, " +"making our build script more generic:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):197 +msgid "A new, more general script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):197 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env bash\n" +"\n" +"<comment># P is the package name</comment>\n" +"\n" +"P=sed-3.02\n" +"\n" +"<comment># A is the archive name</comment>\n" +"\n" +"A=${P}.tar.gz\n" +"\n" +"export ORIGDIR=`pwd`\n" +"export WORKDIR=${ORIGDIR}/work\n" +"export SRCDIR=${WORKDIR}/${P}\n" +"\n" +"if [ -z \"$DISTDIR\" ]\n" +"then\n" +"<comment># set DISTDIR to /usr/src/distfiles if not already set</comment>\n" +" DISTDIR=/usr/src/distfiles\n" +"fi\n" +"export DISTDIR\n" +"\n" +"if [ -d ${WORKDIR} ]\n" +"then \n" +"<comment># remove old work directory if it exists</comment>\n" +" rm -rf ${WORKDIR}\n" +"fi\n" +"\n" +"mkdir ${WORKDIR}\n" +"cd ${WORKDIR}\n" +"tar xzf ${DISTDIR}/${A}\n" +"cd ${SRCDIR}\n" +"./configure --prefix=/usr\n" +"make\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):233 +msgid "" +"We've added a lot of environment variables to the code, but it still does " +"basically the same thing. However, now, to compile any standard GNU autoconf-" +"based source tarball, we can simply copy this file to a new file (with an " +"appropriate name to reflect the name of the new package it compiles), and " +"then change the values of <c>$A</c> and <c>$P</c> to new values. All other " +"environment variables automatically adjust to the correct settings, and the " +"script works as expected. While this is handy, there's a further improvement " +"that can be made to the code. This particular code is much longer than the " +"original \"transcript\" script that we created. Since one of the goals for " +"any programming project should be the reduction of complexity for the user, " +"it would be nice to dramatically shrink the code, or at least organize it " +"better. We can do this by performing a neat trick -- we'll split the code " +"into two separate files. Save this file as <path>sed-3.02.ebuild</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):249 +msgid "sed-3.02.ebuild" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):249 +#, no-wrap +msgid "" +"\n" +"<comment>#the sed ebuild file -- very simple!</comment>\n" +"P=sed-3.02\n" +"A=${P}.tar.gz\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):255 +msgid "" +"Our first file is trivial, and contains only those environment variables " +"that must be configured on a per-package basis. Here's the second file, " +"which contains the brains of the operation. Save this one as \"ebuild\" and " +"make it executable:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):262 +msgid "The ebuild script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):262 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env bash\n" +"\n" +"\n" +"if [ $# -ne 1 ]\n" +"then\n" +" echo \"one argument expected.\"\n" +" exit 1\n" +"fi\n" +"\n" +"if [ -e \"$1\" ]\n" +"then\n" +" source $1\n" +"else\n" +" echo \"ebuild file $1 not found.\"\n" +" exit 1\n" +"fi\n" +"\n" +"export ORIGDIR=`pwd`\n" +"export WORKDIR=${ORIGDIR}/work\n" +"export SRCDIR=${WORKDIR}/${P}\n" +"\n" +"if [ -z \"$DISTDIR\" ]\n" +"then\n" +" <comment># set DISTDIR to /usr/src/distfiles if not already set</comment>\n" +" DISTDIR=/usr/src/distfiles\n" +"fi\n" +"export DISTDIR\n" +"\n" +"if [ -d ${WORKDIR} ]\n" +"then \n" +" # remove old work directory if it exists \n" +" rm -rf ${WORKDIR}\n" +"fi\n" +"\n" +"mkdir ${WORKDIR}\n" +"cd ${WORKDIR}\n" +"tar xzf ${DISTDIR}/${A}\n" +"cd ${SRCDIR}\n" +"./configure --prefix=/usr\n" +"make\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):305 +msgid "" +"Now that we've split our build system into two files, I bet you're wondering " +"how it works. Basically, to compile sed, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):310 +msgid "Testing the above ebuild" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):310 +#, no-wrap +msgid "" +"\n" +"$ <i>./ebuild sed-3.02.ebuild</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):314 +msgid "" +"When \"ebuild\" executes, it first tries to \"source\" variable <c>$1</c>. " +"What does this mean? From my previous article, recall that <c>$1</c> is the " +"first command line argument -- in this case, <path>sed-3.02.ebuild</path>. " +"In bash, the \"source\" command reads in bash statements from a file, and " +"executes them as if they appeared immediately in the file the \"source\" " +"command is in. So, \"source ${1}\" causes the \"ebuild\" script to execute " +"the commands in <path>sed-3.02.ebuild</path>, which cause <c>$P</c> and <c>" +"$A</c> to be defined. This design change is really handy, because if we want " +"to compile another program instead of sed, we can simply create a new <path>." +"ebuild</path> file and pass it as an argument to our \"ebuild\" script. That " +"way, the <path>.ebuild</path> files end up being really simple, while the " +"complicated brains of the ebuild system get stored in one place -- our " +"\"ebuild\" script. This way, we can upgrade or enhance the ebuild system " +"simply by editing the \"ebuild\" script, keeping the implementation details " +"outside of the ebuild files. Here's a sample ebuild file for <c>gzip</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):332 +msgid "gzip-1.2.4a.ebuild" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):332 +#, no-wrap +msgid "" +"\n" +"<comment>#another really simple ebuild script!</comment>\n" +"P=gzip-1.2.4a\n" +"A=${P}.tar.gz\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):341 +msgid "Adding functionality" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):344 +msgid "" +"OK, we're making some progress. But, there is some additional functionality " +"I'd like to add. I'd like the ebuild script to accept a second command-line " +"argument, which will be <c>compile</c>, <c>unpack</c>, or <c>all</c>. This " +"second command-line argument tells the ebuild script which particular step " +"of the build process to perform. That way, I can tell ebuild to unpack the " +"archive, but not compile it (just in case I need to inspect the source " +"archive before compilation begins). To do this, I'll add a case statement " +"that will test variable <c>$2</c>, and do different things based on its " +"value. Here's what the code looks like now:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):356 +msgid "ebuild, revision 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):356 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env bash\n" +"\n" +"if [ $# -ne 2 ]\n" +"then\n" +" echo \"Please specify two args - .ebuild file and unpack, compile or all\"\n" +" exit 1\n" +"fi\n" +"\n" +"\n" +"if [ -z \"$DISTDIR\" ]\n" +"then\n" +"<comment> # set DISTDIR to /usr/src/distfiles if not already set</comment>\n" +" DISTDIR=/usr/src/distfiles\n" +"fi\n" +"export DISTDIR\n" +"\n" +"ebuild_unpack() {\n" +" <comment> #make sure we're in the right directory</comment>\n" +" cd ${ORIGDIR}\n" +" \n" +" if [ -d ${WORKDIR} ]\n" +" then \n" +" rm -rf ${WORKDIR}\n" +" fi\n" +"\n" +" mkdir ${WORKDIR}\n" +" cd ${WORKDIR}\n" +" if [ ! -e ${DISTDIR}/${A} ]\n" +" then\n" +" echo \"${DISTDIR}/${A} does not exist. Please download first.\"\n" +" exit 1\n" +" fi \n" +" tar xzf ${DISTDIR}/${A}\n" +" echo \"Unpacked ${DISTDIR}/${A}.\"\n" +" #source is now correctly unpacked\n" +"}\n" +"\n" +"\n" +"ebuild_compile() {\n" +" \n" +" <comment> #make sure we're in the right directory</comment>\n" +" cd ${SRCDIR}\n" +" if [ ! -d \"${SRCDIR}\" ]\n" +" then\n" +" echo \"${SRCDIR} does not exist -- please unpack first.\"\n" +" exit 1\n" +" fi\n" +" ./configure --prefix=/usr\n" +" make \n" +"}\n" +"\n" +"export ORIGDIR=`pwd`\n" +"export WORKDIR=${ORIGDIR}/work\n" +"\n" +"if [ -e \"$1\" ]\n" +"then\n" +" source $1\n" +"else\n" +" echo \"Ebuild file $1 not found.\"\n" +" exit 1\n" +"fi\n" +"\n" +"export SRCDIR=${WORKDIR}/${P}\n" +"\n" +"case \"${2}\" in\n" +" unpack)\n" +" ebuild_unpack\n" +" ;;\n" +" compile)\n" +" ebuild_compile\n" +" ;;\n" +" all)\n" +" ebuild_unpack\n" +" ebuild_compile\n" +" ;;\n" +" *)\n" +" echo \"Please specify unpack, compile or all as the second arg\"\n" +" exit 1\n" +" ;;\n" +"esac\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):439 +msgid "" +"We've made a lot of changes, so let's review them. First, we placed the " +"compile and unpack steps in their own functions, and called <c>ebuild_compile" +"()</c> and <c>ebuild_unpack()</c>, respectively. This is a good move, since " +"the code is getting more complicated, and the new functions provide some " +"modularity, which helps to keep things organized. On the first line in each " +"function, I explicitly <c>cd</c> into the directory I want to be in because, " +"as our code is becoming more modular rather than linear, it's more likely " +"that we might slip up and execute a function in the wrong current working " +"directory. The <c>cd</c> commands explicitly put us in the right place, and " +"prevent us from making a mistake later -- an important step -- especially if " +"you will be deleting files inside the functions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):453 +msgid "" +"Also, I added a useful check to the beginning of the <c>ebuild_compile()</c> " +"function. Now, it checks to make sure the <c>$SRCDIR</c> exists, and, if " +"not, it prints an error message telling the user to unpack the archive " +"first, and then exits. If you like, you can change this behavior so that if " +"<c>$SRCDIR</c> doesn't exist, our ebuild script will unpack the source " +"archive automatically. You can do this by replacing <c>ebuild_compile()</c> " +"with the following code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):462 +msgid "A new spin on ebuild_compile()" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):462 +#, no-wrap +msgid "" +"\n" +"ebuild_compile() {\n" +" <comment>#make sure we're in the right directory</comment>\n" +" if [ ! -d \"${SRCDIR}\" ]\n" +" then\n" +" ebuild_unpack\n" +" fi\n" +" cd ${SRCDIR}\n" +" ./configure --prefix=/usr\n" +" make \n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):475 +msgid "" +"One of the most obvious changes in our second version of the ebuild script " +"is the new case statement at the end of the code. This case statement simply " +"checks the second command-line argument, and performs the correct action, " +"depending on its value. If we now type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):482 +msgid "Default action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):482 +#, no-wrap +msgid "" +"\n" +"$ <i>ebuild sed-3.02.ebuild</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):486 +msgid "" +"We'll actually get an error message. ebuild now wants to be told what to do, " +"as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):491 +msgid "Unpacking" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):491 +#, no-wrap +msgid "" +"\n" +"$ <i>ebuild sed-3.02.ebuild unpack</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):495 +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):503 +msgid "or:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):499 +msgid "Compiling" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):499 +#, no-wrap +msgid "" +"\n" +"$ <i>ebuild sed-3.02.ebuild compile</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):507 +msgid "Unpacking and compiling" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):507 +#, no-wrap +msgid "" +"\n" +"$ <i>ebuild sed-3.02.ebuild all</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(impo):511 +msgid "" +"If you provide a second command-line argument, other than those listed " +"above, you get an error message (the * clause), and the program exits." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):519 +msgid "Modularizing the code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):522 +msgid "" +"Now that the code is quite advanced and functional, you may be tempted to " +"create several more ebuild scripts to unpack and compile your favorite " +"programs. If you do, sooner or later you'll come across some sources that do " +"not use autoconf (<c>./configure</c>) or possibly others that have non-" +"standard compilation processes. We need to make some more changes to the " +"ebuild system to accommodate these programs. But before we do, it is a good " +"idea to think a bit about how to accomplish this." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):532 +msgid "" +"One of the great things about hard-coding <c>./configure --prefix=/usr; " +"make</c> into our compile stage is that, most of the time, it works. But, we " +"must also have the ebuild system accommodate sources that do not use " +"autoconf or normal Makefiles. To solve this problem, I propose that our " +"ebuild script should, by default, do the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):541 +msgid "" +"If there is a configure script in <c>${SRCDIR}</c>, execute it as follows: " +"<c>./configure --prefix=/usr</c>. Otherwise, skip this step." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):545 +msgid "Execute the following command: make" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):548 +msgid "" +"Since ebuild only runs configure if it actually exists, we can now " +"automatically accommodate those programs that don't use autoconf and have " +"standard makefiles. But what if a simple \"make\" doesn't do the trick for " +"some sources? We need a way to override our reasonable defaults with some " +"specific code to handle these situations. To do this, we'll transform our " +"<c>ebuild_compile()</c> function into two functions. The first function, " +"which can be looked at as a \"parent\" function, will still be called " +"<c>ebuild_compile()</c>. However, we'll have a new function, called " +"<c>user_compile()</c>, which contains only our reasonable default actions:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):560 +msgid "ebuild_compile() split into two functions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):560 +#, no-wrap +msgid "" +"\n" +"user_compile() {\n" +" <comment>#we're already in ${SRCDIR}</comment>\n" +" if [ -e configure ]\n" +" then\n" +" #run configure script if it exists\n" +" ./configure --prefix=/usr\n" +" fi\n" +" #run make\n" +" make\n" +"} \n" +"\n" +"ebuild_compile() {\n" +" if [ ! -d \"${SRCDIR}\" ]\n" +" then\n" +" echo \"${SRCDIR} does not exist -- please unpack first.\"\n" +" exit 1\n" +" fi\n" +" <comment>#make sure we're in the right directory</comment>\n" +" cd ${SRCDIR}\n" +" user_compile\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):584 +msgid "" +"It may not seem obvious why I'm doing this right now, but bear with me. " +"While the code works almost identically to our previous version of ebuild, " +"we can now do something that we couldn't do before -- we can override " +"<c>user_compile()</c> in <path>sed-3.02.ebuild</path>. So, if the default " +"<c>user_compile()</c> function doesn't meet our needs, we can define a new " +"one in our <path>.ebuild</path> file that contains the commands required to " +"compile the package. For example, here's an ebuild file for " +"<c>e2fsprogs-1.18</c>, which requires a slightly different <c>./configure</" +"c> line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):595 +msgid "e2fsprogs-1.18.ebuild" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):595 +#, no-wrap +msgid "" +"\n" +"<comment>#this ebuild file overrides the default user_compile()</comment>\n" +"P=e2fsprogs-1.18\n" +"A=${P}.tar.gz\n" +" \n" +"user_compile() {\n" +" ./configure --enable-elf-shlibs\n" +" make\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):606 +msgid "" +"Now, <c>e2fsprogs</c> will be compiled exactly the way we want it to be. " +"But, for most packages, we can omit any custom <c>user_compile()</c> " +"function in the <path>.ebuild</path> file, and the default <c>user_compile()" +"</c> function is used instead." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):613 +msgid "" +"How exactly does the ebuild script know which <c>user_compile()</c> function " +"to use? This is actually quite simple. In the ebuild script, the default " +"<c>user_compile()</c> function is defined before the <path>e2fsprogs-1.18." +"ebuild</path> file is sourced. If there is a <c>user_compile()</c> in " +"<path>e2fsprogs-1.18.ebuild</path>, it overwrites the default version " +"defined previously. If not, the default <c>user_compile()</c> function is " +"used." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):623 +msgid "" +"This is great stuff; we've added a lot of flexibility without requiring any " +"complex code if it's not needed. We won't cover it here, but you could also " +"make similar modifications to <c>ebuild_unpack()</c> so that users can " +"override the default unpacking process. This could come in handy if any " +"patching has to be done, or if the files are contained in multiple archives. " +"It is also a good idea to modify our unpacking code so that it recognizes " +"bzip2-compressed tarballs by default." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):636 +msgid "Configuration files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):639 +msgid "" +"We've covered a lot of sneaky bash techniques so far, and now it's time to " +"cover one more. Often, it's handy for a program to have a global " +"configuration file that resides in <path>/etc</path>. Fortunately, this is " +"easy to do using bash. Simply create the following file and save it as " +"<path>/etc/ebuild.conf</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):646 +msgid "/ect/ebuild.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):646 +#, no-wrap +msgid "" +"\n" +"<comment># /etc/ebuild.conf: set system-wide ebuild options in this file</comment>\n" +"\n" +"<comment># MAKEOPTS are options passed to make</comment>\n" +"MAKEOPTS=\"-j2\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):653 +msgid "" +"In this example, I've included just one configuration option, but you could " +"include many more. One of the beautiful things about bash is that this file " +"can be parsed by simply sourcing it. This is a design trick that works with " +"most interpreted languages. After <path>/etc/ebuild.conf</path> is sourced, " +"<c>$MAKEOPTS</c> is defined inside our ebuild script. We'll use it to allow " +"the user to pass options to make. Normally, this option would be used to " +"allow the user to tell ebuild to do a parallel make. This is explained below." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(note):663 +msgid "" +"<b>What is a parallel make?</b> To speed compilation on multiprocessor " +"systems, make supports compiling a program in parallel. This means that " +"instead of compiling just one source file at a time, make compiles a user-" +"specified number of source files simultaneously (so those extra processors " +"in a multiprocessor system are used). Parallel makes are enabled by passing " +"the <c>-j #</c> option to make, as follows: <c>make -j4 MAKE=\"make -j4\"</" +"c>. This code instructs make to compile four programs simultaneously. The " +"<c>MAKE=\"make -j4\"</c> argument tells make to pass the <c>-j4</c> option " +"to any child make processes it launches." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):675 +msgid "Here's the final version of our ebuild program:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre:caption):679 +msgid "ebuild, the final version" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(pre):679 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env bash\n" +"\n" +"if [ $# -ne 2 ]\n" +"then\n" +" echo \"Please specify ebuild file and unpack, compile or all\"\n" +" exit 1\n" +"fi\n" +"\n" +"source /etc/ebuild.conf\n" +"\n" +"if [ -z \"$DISTDIR\" ]\n" +"then\n" +" <comment># set DISTDIR to /usr/src/distfiles if not already set</comment>\n" +" DISTDIR=/usr/src/distfiles\n" +"fi\n" +"export DISTDIR\n" +"\n" +"ebuild_unpack() {\n" +" <comment>#make sure we're in the right directory</comment>\n" +" cd ${ORIGDIR}\n" +" \n" +" if [ -d ${WORKDIR} ]\n" +" then \n" +" rm -rf ${WORKDIR}\n" +" fi\n" +"\n" +" mkdir ${WORKDIR}\n" +" cd ${WORKDIR}\n" +" if [ ! -e ${DISTDIR}/${A} ]\n" +" then\n" +" echo \"${DISTDIR}/${A} does not exist. Please download first.\"\n" +" exit 1\n" +" fi\n" +" tar xzf ${DISTDIR}/${A}\n" +" echo \"Unpacked ${DISTDIR}/${A}.\"\n" +" <comment>#source is now correctly unpacked</comment>\n" +"}\n" +"\n" +"user_compile() {\n" +" <comment>#we're already in ${SRCDIR}</comment>\n" +" if [ -e configure ]\n" +" then\n" +" <comment>#run configure script if it exists</comment>\n" +" ./configure --prefix=/usr\n" +" fi\n" +" <comment>#run make</comment>\n" +" make $MAKEOPTS MAKE=\"make $MAKEOPTS\" \n" +"} \n" +"\n" +"ebuild_compile() {\n" +" if [ ! -d \"${SRCDIR}\" ]\n" +" then\n" +" echo \"${SRCDIR} does not exist -- please unpack first.\"\n" +" exit 1\n" +" fi\n" +" <comment>#make sure we're in the right directory</comment>\n" +" cd ${SRCDIR}\n" +" user_compile\n" +"}\n" +"\n" +"export ORIGDIR=`pwd`\n" +"export WORKDIR=${ORIGDIR}/work\n" +"\n" +"if [ -e \"$1\" ]\n" +"then\n" +" source $1\n" +"else\n" +" echo \"Ebuild file $1 not found.\"\n" +" exit 1\n" +"fi\n" +"\n" +"export SRCDIR=${WORKDIR}/${P}\n" +"\n" +"case \"${2}\" in\n" +" unpack)\n" +" ebuild_unpack\n" +" ;;\n" +" compile)\n" +" ebuild_compile\n" +" ;;\n" +" all)\n" +" ebuild_unpack\n" +" ebuild_compile\n" +" ;;\n" +" *)\n" +" echo \"Please specify unpack, compile or all as the second arg\"\n" +" exit 1\n" +" ;;\n" +"esac\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):771 +msgid "" +"Notice <path>/etc/ebuild.conf</path> is sourced near the beginning of the " +"file. Also, notice that we use <c>$MAKEOPTS</c> in our default " +"<c>user_compile()</c> function. You may be wondering how this will work -- " +"after all, we refer to <c>$MAKEOPTS</c> before we source <path>/etc/ebuild." +"conf</path>, which actually defines <c>$MAKEOPTS</c> in the first place. " +"Fortunately for us, this is OK because variable expansion only happens when " +"<c>user_compile()</c> is executed. By the time <c>user_compile()</c> is " +"executed, <path>/etc/ebuild.conf</path> has already been sourced, and <c>" +"$MAKEOPTS</c> is set to the correct value." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):785 +msgid "Wrapping it up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):788 +msgid "" +"We've covered a lot of bash programming techniques in this article, but " +"we've only touched the surface of the power of bash. For example, the " +"production Gentoo Linux ebuild system not only automatically unpacks and " +"compiles each package, but it can also:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):796 +msgid "" +"Automatically download the sources if they are not found in <c>$DISTDIR</c>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):799 +msgid "Verify that the sources are not corrupted by using MD5 message digests" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):802 +msgid "" +"If requested, install the compiled application into the live filesystem, " +"recording all installed files so that the package can be easily uninstalled " +"at a later date." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):807 +msgid "" +"If requested, package the compiled application in a tarball (compressed the " +"way you like it) so that it can be installed later, on another computer, or " +"during the CD-based installation process (if you are building a distribution " +"CD)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):815 +msgid "" +"In addition, the production ebuild system has several other global " +"configuration options, allowing the user to specify options such as what " +"optimization flags to use during compilation, and whether optional support " +"for packages like GNOME and slang should be enabled by default in those " +"packages that support it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(p):822 +msgid "" +"It's clear that bash can accomplish much more than what I've touched on in " +"this series of articles. I hope you've learned a lot about this incredible " +"tool, and are excited about using bash to speed up and enhance your " +"development projects." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):833 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(title):835 +msgid "Useful links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):839 +msgid "" +"Download the source tarball (<path>sed-3.02.tar.gz</path>) from <uri>ftp://" +"ftp.gnu.org/pub/gnu/sed</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):843 +msgid "" +"Read <uri link=\"/doc/en/articles/bash-by-example-p1.xml\">Bash by example: " +"Part 1</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):847 +msgid "" +"Read <uri link=\"/doc/en/articles/bash-by-example-p2.xml\">Bash by example: " +"Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):851 +msgid "" +"Visit the home page of the <uri link=\"http://gentoo.org\">Gentoo Project</" +"uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(li):855 +msgid "" +"Check out the <uri link=\"http://www.gnu.org/software/bash/manual/bash.html" +"\">bash online reference manual</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/bash-by-example-p3.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/dynamic-iptables-firewalls.xml.po b/article/gettext/ru/dynamic-iptables-firewalls.xml.po new file mode 100644 index 0000000..7dd4a03 --- /dev/null +++ b/article/gettext/ru/dynamic-iptables-firewalls.xml.po @@ -0,0 +1,579 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(guide:link):5 +msgid "/doc/en/articles/dynamic-iptables-firewalls.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):6 +msgid "Dynamic iptables firewalls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(abstract):12 +msgid "" +"Firewalls are good and fun, but what do you do when you need to make rapid, " +"complex changes to your firewall rules? Easy. Use Daniel Robbins' dynamic " +"firewall scripts that are demonstrated in this article. You can use these " +"scripts to increase your network security and responsiveness, and to inspire " +"your own creative designs." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(version):25 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(date):26 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):29 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):31 +msgid "Flexible (and fun) network security" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):34 +msgid "" +"The best way to see the benefits of dynamic firewall scripts is to see them " +"in action. To do this, let's imagine that I'm a sysadmin at an ISP, and I've " +"recently set up a Linux-based firewall to protect my customers and internal " +"systems from malicious users on the Internet. To do this, my firewall uses " +"the new Linux 2.4 iptables stateful functionality to allow new outgoing " +"connections to be established by my customers and servers, and of course to " +"allow new incoming connections, but only to \"public\" services, such as " +"web, ftp, ssh, and SMTP. Since I used a deny-by-default design, any from-" +"Internet connections to non-public services, such as the squid proxy cache " +"or Samba server, are automatically rejected. So far, I have a pretty decent " +"firewall that offers a good level of protection for everyone at my ISP." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):48 +msgid "" +"For the first week or so, the firewall works great, but then something ugly " +"happens: Bob, my arch-nemesis (who works at a competing ISP) decides that he " +"wants to flood my network with packets in an attempt to deny service to my " +"customers. Unfortunately, Bob has carefully studied my firewall and knows " +"that while I'm protecting many internal services, port 25 and 80 must be " +"publicly accessible so that I can receive mail and serve HTTP requests. Bob " +"decides to take advantage of this fact by launching a bandwidth-sucking " +"attack against my web and mail server." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):59 +msgid "" +"About a minute or so after Bob begins his attack, I notice that my uplinks " +"start becoming saturated with packets. After taking a look at the situation " +"with <c>tcpdump</c> I determine that this is yet another Bob attack, and I " +"figure out what IP addresses he's using to launch it. Now that I have this " +"information, all that I need to do is block these IP addresses, and that " +"should solve the problem -- a simple solution, or so I think." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):72 +msgid "Responding to an attack" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):75 +msgid "" +"I quickly load my firewall setup script into vi and begin hacking away at my " +"iptables rules, modifying my firewall so that it'll block those evil " +"incoming Bob packets. After a minute or so, I find the exact place to make " +"the appropriate DROP rule additions, and I add them. Then, I start and stop " +"the firewall...ooops, made a bit of a mistake when I added the rules. I load " +"up the firewall scripts again, fix the problem, and thirty seconds later the " +"firewall has been tweaked to block Bob's attack of the month. At first, it " +"seems like I successfully thwarted the attack...until the helpdesk phones " +"begin ringing. Apparently, Bob was able to disrupt my network for about 10 " +"minutes, and now my customers are calling to find out what's going on. Even " +"worse, after a few minutes pass, I notice that our uplinks again start to " +"become saturated. This time, Bob appears to be using a brand-new set of IP " +"addresses for his attacks. In response, I begin feverishly hacking away at " +"our firewall scripts, except this time, I'm a bit panicky -- maybe my " +"solution isn't so good after all." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):92 +msgid "" +"Here's what went wrong in the above scenario. Although I had a decent " +"firewall in place and also quickly identified the cause of the network " +"problem, I was unable to modify the behavior of my firewall to respond to " +"the threat in time. Of course, when your network is under attack, you want " +"to be able to respond immediately, and being forced to hack away at your " +"master firewall setup script in a panicked state is not only stressful, but " +"also very inefficient." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):106 +msgid "Scripts" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):108 +msgid "ipdrop" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):111 +msgid "" +"It would be far better if I had a special <c>ipdrop</c> script that's " +"specifically designed to insert just the rules you need to block the IP " +"address that I specify. With such a script, blocking a firewall is no longer " +"a two-minute ordeal; instead, it takes five seconds. And since the script " +"shields me from the task of editing firewall rules by hand, it eliminates a " +"major source of errors. All that's left for me to do is to determine the IP " +"address that I'd like to block, and then type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):121 +msgid "Dropping IP" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):121 +#, no-wrap +msgid "" +"\n" +"# <i>ipdrop 129.24.8.1 on</i>\n" +"IP 129.24.8.1 drop on.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):126 +msgid "" +"Immediately, the ipdrop script would block 129.24.8.1, Bob's current evil IP " +"address of the week. This script dramatically improves your defenses, " +"because now an IP block is a no-brainer. Now, let's take a look at my " +"implementation of the ipdrop script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):133 +msgid "ipdrop script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):133 +#, no-wrap +msgid "" +"\n" +"#!/bin/bash\n" +"\n" +"source /usr/local/share/.sh\n" +"\n" +"args 2 $# \"${0} IPADDR {on/off}\" \n" +"\n" +"<comment># Drops packets to/from IPADDR. Good for obnoxious\n" +"networks/hosts/DoS\"</comment>\n" +"\n" +"if [ \"$2\" == \"on\" ] \n" +"then\n" +"<comment># Rules will be appended or inserted as normal</comment>\n" +" APPEND=\"-A\"\n" +" INSERT=\"-I\"\n" +" rec_check ipdrop $1 \"$1 already blocked\" on\n" +" record ipdrop $1\n" +"elif [ \"$2\" == \"off\" ]\n" +"then\n" +"<comment># Rules will be deleted instead</comment>\n" +" APPEND=\"-D\"\n" +" INSERT=\"-D\"\n" +" rec_check ipdrop $1 \"$1 not currently blocked\" off \n" +" unrecord ipdrop $1\n" +"else\n" +" echo \"Error: \\\"off\\\" or \\\"on\\\" expected as second argument\"\n" +" exit 1\n" +"fi \n" +"\n" +"<comment># Block outside IP address that's causing problems</comment>\n" +"<comment># Attacker's incoming TCP connections will take a minute or so to time\n" +"out, reducing DoS effectiveness</comment>\n" +"\n" +"iptables $INSERT INPUT -s $1 -j DROP\n" +"iptables $INSERT OUTPUT -d $1 -j DROP\n" +"iptables $INSERT FORWARD -d $1 -j DROP\n" +"iptables $INSERT FORWARD -s $1 -j DROP\n" +"\n" +"echo \"IP ${1} drop ${2}.\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):178 +msgid "ipdrop: the explanation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):181 +msgid "" +"If you take a look at the last four highlighted lines, you'll see the actual " +"commands that insert the appropriate rules into the firewall tables. As you " +"can see, the definition of the $INSERT environment variable varies, " +"depending on whether we're running in \"on\" or \"off\" mode. When the " +"iptables lines execute, the particular rules will be inserted or deleted " +"appropriately." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):189 +msgid "" +"Now, let's look at the function of the rules themselves, which should work " +"perfectly with any type of existing firewall, or even on a system with no " +"firewall; all you need is iptables support built-in to your 2.4 kernel. We " +"block incoming packets arriving from the evil IP (first iptables line), " +"block outgoing packets headed for the evil IP (next iptables line), and then " +"turn off forwarding in either direction for this particular IP (last two " +"iptables lines.) Once these rules are in place, your system will simply " +"discard any packets that fall into one of these categories." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):200 +msgid "" +"Another quick note: you'll also notice calls to \"rec_check\", \"unrecord\", " +"\"record\", and \"args\". These are special helper bash functions defined in " +"<path>dynfw.sh</path>. The \"record\" function records the blocked ip in the " +"<path>/root/.dynfw-ipdrop</path> file, while the \"unrecord\" removes the " +"entry from <path>/root/.dynfw-ipdrop</path>. The \"rec_check\" function is " +"used to abort the script with an error message if you attempt to re-block an " +"already-blocked IP, or unblock an IP that isn't currently being blocked. The " +"\"args\" function takes care of making sure that we receive the correct " +"number of command-line arguments, and also handles printing helpful usage " +"information. I've created a <uri link=\"http://www-128.ibm.com/" +"developerworks/library/l-fw/dynfw-1.0.tar.gz\">dynfw-1.0.tar.gz</uri> that " +"contains all these tools; see the <uri link=\"#resources\">Resources</uri> " +"section at the end of this article for more information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):220 +msgid "tcplimit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):223 +msgid "" +"This next dynamic firewall script is useful if you need to limit the usage " +"of a particular TCP-based network service, possibly something that generates " +"a heavy CPU load on your end. Called \"tcplimit\", this script takes a TCP " +"port, a rate, a scale, and \"on\" or \"off\" as an argument:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):230 +msgid "Limiting of particular TCP-based network service usage" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):230 +#, no-wrap +msgid "" +"\n" +"# <i>tcplimit 873 5 minute on</i>\n" +"Port 873 new connection limit (5/minute, burst=5) on.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):235 +msgid "" +"<c>tcplimit</c> uses the new iptables \"state\" module (make sure you've " +"enabled this in your kernel or loaded the module) to allow only a certain " +"number of new, incoming connections in a specific period of time. In this " +"example, the firewall will allow only five new connections to my rsync " +"server (port 873) per minute -- and it's possible to specify the desired " +"number of connections you'd like per second/minute/hour or day, as needed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):244 +msgid "" +"<c>tcplimit</c> offers a good way of limiting non-essential services -- so " +"that a flood of traffic to a non-essential service doesn't disrupt your " +"network or server. In my case, I use <c>tcplimit</c> to set a maximum upper " +"bound for rsync usage to prevent my DSL line from becoming saturated by too " +"many rsync connections. Connection-limited services are recorded in <path>/" +"root/.dynfw-tcplimit</path>, and if I ever want to turn the new connection " +"limiting off, I can simply type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):254 +msgid "Turning off the connection limiting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):254 +#, no-wrap +msgid "" +"\n" +"# <i>tcplimit 873 5 minute off</i>\n" +"Port 873 new connection limit off.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):259 +msgid "" +"<c>tcplimit</c> works by creating a completely new chain in the \"filter\" " +"table. This new chain will reject all packets that exceed our specified " +"limit. Then, a single rule is inserted into the INPUT chain that redirects " +"all incoming NEW connection packets headed to the target port (873 in this " +"case) to this special chain, effectively placing a limit on new, incoming " +"connections while not affecting packets that are part of an established " +"connection." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):268 +msgid "" +"When <c>tcplimit</c> is turned off, the INPUT rule and special chain are " +"deleted. This is the kind of fancy stuff that really highlights the " +"importance of having a well-tested, reliable script manage the firewall " +"rules for you. As with <c>ipblock</c>, the <c>tcplimit</c> script should be " +"compatible with any type of firewall, or even no firewall, as long as you " +"have the proper iptables functionality enabled in your kernel." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):281 +msgid "host-tcplimit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):284 +msgid "" +"<c>host-tcplimit</c> is a lot like <c>tcplimit</c>, but it limits new TCP " +"connections coming in from a particular IP address and heading for a " +"particular TCP port on your server(s). <c>host-tcplimit</c> is particularly " +"useful for preventing a particular person from abusing your network " +"resources. For example, let's say you're running a CVS server, and you " +"discover that a particular new developer appears to have set up a script " +"that updates his sources with the repository every 10 minutes, using up a " +"huge amount of unnecessary network resources over the course of a day. " +"However, while you're in the process of composing an e-mail to him " +"explaining the error of his ways, you receive an incoming message that reads " +"as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):297 +msgid "Incoming message" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):297 +#, no-wrap +msgid "" +"\n" +"Hi guys!\n" +"\n" +"I'm really excited to be part of your development project. I just set up a\n" +"script to update my local copy of the code every ten minutes. I'm about to\n" +"leave on a two-week cruise, but when I get back, my sources will be totally\n" +"up-to-date and I'll be ready to help out! I'm heading out the door now...see\n" +"you in two weeks!\n" +"\n" +"Sincerely,\n" +"\n" +"Mr. Newbie\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):311 +msgid "" +"For such situations, a simple <c>host-tcplimit</c> command will solve the " +"problem:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):316 +msgid "host-tcplimit command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):316 +#, no-wrap +msgid "" +"\n" +"# <i>host-tcplimit 1.1.1.1 2401 1 day on</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):320 +msgid "" +"Now, Mr. Newbie (IP address 1.1.1.1) is limited to one CVS connection (port " +"2401) per day, saving oodles of network bandwidth." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):329 +msgid "user-outblock" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):332 +msgid "" +"The last and possibly most intriguing of all my dynamic firewall scripts is " +"<c>user-outblock</c>. This script provides an ideal way to allow a " +"particular user to telnet or ssh into your system, yet not allow this user " +"to establish any new outgoing connections from the command-line. Here's an " +"example of a situation where user-outblock would come in handy. Let's say " +"that a particular family has an account at my ISP. Mom and Dad use a " +"graphical e-mail client to read their mail and occasionally surf the Web, " +"but their son happens to be an aspiring hacker, and generally uses his shell " +"access to do naughty things to other people's computers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):344 +msgid "" +"One day, you find that he's established ssh connections with several systems " +"that appear to belong to the Pakistani military -- ouch. You'd like to help " +"direct this youth towards more beneficial activities, so you do the " +"following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):350 +msgid "" +"First, you do an audit of your system and make sure that you remove the suid " +"bit from all your network binaries, like ssh:U" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):355 +msgid "Removing suid bit from all the network binaries" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):355 +#, no-wrap +msgid "" +"\n" +"# <i>chmod u-s /usr/bin/ssh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):359 +msgid "" +"Now, any processes that he tries to use to interact with the network will be " +"owned by his UID. You can now use user-outblock to block all outgoing TCP " +"connections initiated by this UID (which happens to be 2049):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):365 +msgid "Blocking all outgoing TCP connections initiated by some UID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):365 +#, no-wrap +msgid "" +"\n" +"# <i>user-outblock 2049 on</i>\n" +"UID 2049 block on.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):370 +msgid "" +"Now, he can log in and read his mail, but he's not going to be using your " +"servers to establish ssh connections and the like. Now, he could install an " +"ssh client on his home PC. However, it's not too hard to whip up another " +"dynamic firewall script that limits his home PC to Web, mail, and outgoing " +"ssh connections (to your servers only)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):383 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(title):385 +msgid "Tarballs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):388 +msgid "" +"Because I've found these dynamic firewall scripts so helpful, I've put " +"together a neat little tarball (<uri link=\"/doc/en/articles/files/" +"dynfw-1.0.1.tar.bz2\">dynfw-1.0.1.tar.bz2</uri>) that you can download and " +"install on your machine." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):395 +msgid "" +"To install, extract the tarball and run the included <c>install.sh</c> " +"script. This script will install a shared bash script to <path>/usr/local/" +"share/dynfw.sh</path>, and install the dynamic firewall scripts themselves " +"to <path>/usr/local/sbin</path>. If you'd like them to end up in <path>/usr/" +"share</path> and <path>/usr/sbin</path> instead, simply type this before " +"running <c>install.sh</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre:caption):404 +msgid "Exporting location of install directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(pre):404 +#, no-wrap +msgid "" +"\n" +"# <i>export PREFIX=/usr</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):408 +msgid "" +"I've also added a <uri link=\"/proj/en/dynfw.xml\">dynamic firewall scripts</" +"uri> page to the Gentoo Linux Web site that you can visit to get the latest " +"version of the tarball. I'd like to continue improving and adding to the " +"collection, making a truly useful resource for sysadmins planetwide. Now " +"that we have iptables in the kernel, it's time to start taking advantage of " +"it!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):416 +msgid "" +"If all this iptables firewall stuff is new to you, I highly recommend my " +"Linux <uri link=\"http://www-128.ibm.com/developerworks/edu/l-dw-linuxfw-i." +"html\">2.4 stateful firewall tutorial</uri> (registration required), " +"containing complete instructions on how to design your own iptables-based " +"stateful firewall." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):423 +msgid "" +"<uri link=\"http://www.tcpdump.org/\">tcpdump</uri> is an essential tool for " +"exploring low-level packet exchanges and verifying that your firewall is " +"working correctly. If you don't have it, get it. If you've got it, start " +"using it. If you're using it... good for you. :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):430 +msgid "" +"Visit the <uri link=\"http://netfilter.samba.org\">home page for the " +"netfilter team</uri> to find lots of excellent resources, including the " +"iptables sources, and Rusty's excellent <uri link=\"http://netfilter.samba." +"org/unreliable-guides/index.html\">unreliable guides</uri>. These include a " +"basic networking concepts HOWTO, a netfilter (iptables) HOWTO, a NAT HOWTO, " +"and a netfilter hacking HOWTO for developers. There's also a <uri link=" +"\"http://netfilter.org/documentation/index.html#documentation-faq" +"\">netfilter FAQ</uri> available, as well as other things." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):442 +msgid "" +"Thankfully, there are a lot of good online netfilter resources; however, " +"don't forget the basics. The iptables man page is very detailed and is a " +"shining example of what a man page should be." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):448 +msgid "" +"There's now an <uri link=\"http://www.ds9a.nl/2.4Routing/\">Advanced Linux " +"Routing and Traffic Control HOWTO</uri> available. There's a good section " +"that shows how to use iptables to mark packets, and then use Linux routing " +"functionality to route the packets based on these marks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(p):455 +msgid "" +"There's a <uri link=\"http://netfilter.org/mailinglists.html#ml-user" +"\">netfilter (iptables) mailing list</uri> available, as well as one for " +"<uri link=\"http://netfilter.org/mailinglists.html#ml-devel\">netfilter " +"developers</uri>. You can also access the mailing list archives at these " +"URLs." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/dynamic-iptables-firewalls.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/hardware-stability-p1.xml.po b/article/gettext/ru/hardware-stability-p1.xml.po new file mode 100644 index 0000000..dccff59 --- /dev/null +++ b/article/gettext/ru/hardware-stability-p1.xml.po @@ -0,0 +1,602 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(guide:link):5 +msgid "/doc/en/articles/hardware-stability-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):6 +msgid "Linux hardware stability guide, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by Joshua Saddler, nightmorph@gentoo.org +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(abstract):13 +msgid "" +"In this article, Daniel Robbins shows you how to diagnose and fix CPU " +"flakiness, as well as how to test your RAM for defects. By the end of this " +"article, you'll have the skills to ensure that your Linux system is as " +"stable as it possibly can be." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(version):25 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(date):26 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):29 +msgid "CPU troubleshooting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):33 +msgid "" +"Many of us in the Linux world have been bitten by nasty hardware problems. " +"How many of us have set up a Linux box, installed our favorite distribution, " +"compiled and installed some additional apps, and gotten everything working " +"perfectly only to find that our new system has an (argh!) fatal hardware " +"bug? Whether the symptoms are random segmentation faults, data corruption, " +"hard locks, or lost data is irrelevant -- the hardware glitch effectively " +"makes our normally reliable Linux operating system barely able to stay " +"afloat. In this article, we'll take an in-depth look at how to detect flaky " +"CPUs and RAM -- allowing you to replace the defective parts before they do " +"some serious damage." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):46 +msgid "" +"If you're experiencing instability problems and suspect they are hardware " +"related, I encourage you to test both your CPU and memory to ensure that " +"they're working OK. However, even if you haven't experienced these problems, " +"it's still a good idea to perform these CPU and memory tests. In doing so, " +"you may detect a hardware problem that could have bitten you at an " +"inopportune time, something that could have caused data loss or hours of " +"frustration in a frantic search for the source of the problem. The proper, " +"proactive application of these techniques can help you to avoid a lot of " +"headaches, and if your system passes the tests, you'll have the peace of " +"mind that your system is up to spec." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):62 +msgid "CPU issues" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):65 +msgid "" +"If you have a horribly defective CPU, your machine may be unable to boot " +"Linux or may only run for a few minutes before locking up. CPUs in this " +"ragged state are easy to diagnose as defective because the symptoms are so " +"obvious. But there are more subtle CPU defects that aren't so easy to " +"detect; generally, the less obvious errors are the ones that cause machines " +"to either lock up every now and then for no apparent reason, or cause " +"certain processes to die unexpectedly. Most CPU instabilities can be " +"triggered by \"exercising\" the CPU -- giving it a bunch of work to do, " +"causing it to heat up and possibly flake out. Let's look at some ways to " +"stress-test the CPU." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):77 +msgid "" +"You may be surprised to hear that one of the best tests of CPU stability is " +"built in to Linux -- the kernel compile. The gcc compiler is a great tool " +"for testing general CPU stability, and a kernel build uses gcc a whole lot. " +"By creating and running the following script from your <path>/usr/src/linux</" +"path> directory, you can give your machine an industrial-strength kernel " +"compile stress test:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre:caption):86 +msgid "The cpubuild script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre):86 +#, no-wrap +msgid "" +"\n" +"#!/bin/bash\n" +"make dep\n" +"while [ \"foo\" = \"foo\" ]\n" +"do\n" +" make clean\n" +" make -j2 bzImage\n" +" if [ $? -ne 0 ]\n" +" then\n" +" echo OUCH OUCH OUCH OUCH\n" +" exit 1\n" +" fi\n" +"done\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):101 +msgid "" +"You'll notice that this script <e>repeatedly</e> compiles the kernel. The " +"reason for this is simple -- some CPUs have intermittent glitches, allowing " +"them to compile the kernel perfectly 95% of the time, but causing the kernel " +"compile to bomb out every now and then. Normally, this is because it may " +"take five or more kernel compiles before the processor heats up to the point " +"where it becomes unstable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):110 +msgid "" +"In the above script, make sure to adjust the <c>-j</c> option so that the " +"number following it is one greater than the number of CPUs in your system; " +"in other words, use \"2\" for uniprocessors, \"3\" for dual-processors, etc. " +"The <c>-j</c> option tells <c>make</c> to build the kernel in parallel, " +"ensuring that there's always at least one gcc process on deck after each " +"source file is compiled -- ensuring that the stress on your CPU is " +"maximized. If your Linux box is going to be unused for the afternoon, go " +"ahead and run this script, and let the machine recompile the kernel for a " +"few hours." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):124 +msgid "Possible CPU problems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):127 +msgid "" +"If the script runs perfectly for several hours, congratulations! Your CPU " +"has passed the first test. However, it's possible that the above script dies " +"unexpectedly. How do you know you're having a CPU problem as opposed to " +"something else? Well, if gcc spat out an error like this, then there's a " +"very good possibility that your CPU is defective:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre:caption):135 +msgid "GCC error" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre):135 +#, no-wrap +msgid "" +"\n" +"gcc: Internal compiler error: program cc1 got fatal signal 11\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):139 +msgid "" +"At this point, you have about three possibilities as to the state of your " +"CPU:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):144 +msgid "" +"If you type <c>make bzImage</c> to resume the kernel compilation, and the " +"compiler dies on the exact same file, keep typing <c>make bzImage</c> over " +"and over again. If after about ten tries the build process continues to die " +"on this particular file, then the problem is most likely caused by a (rare) " +"gcc compiler bug that's being triggered by this particular source file, " +"rather than a flaky CPU. However, these days, gcc is quite stable, so this " +"isn't likely to happen." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):153 +msgid "" +"If you type <c>make bzImage</c> to resume kernel compilation, and you get " +"another signal 11 a little bit later, then your CPU is most likely on its " +"last legs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):158 +msgid "" +"If you type <c>make bzImage</c> to resume kernel compilation and the kernel " +"compiles successfully, this doesn't mean that your CPU is OK. Normally, this " +"means that your CPU glitch only shows up every now and then, normally only " +"when the CPU rises above a certain temperature (a CPU will get hotter when " +"it is being used for an extended period of time, and may take several kernel " +"compiles to get to that critical point)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):171 +msgid "Rescuing your CPU" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):174 +msgid "" +"If your CPU is experiencing random intermittent errors when placed under " +"heavy load, it's possible that your CPU isn't defective at all -- maybe it " +"simply isn't being cooled properly. Here are some things that you can check:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):181 +msgid "Is your CPU fan plugged in?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):182 +msgid "Is it relatively dust-free?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):183 +msgid "" +"Does the fan actually spin (and spin at the proper speed) when the power is " +"on?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):187 +msgid "Is the heat sink seated properly on the CPU?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):188 +msgid "Is there thermal grease between the CPU and the heat sink?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):189 +msgid "Does your case have adequate ventilation?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):192 +msgid "" +"If everything seems fine, then you may want to rerun the kernel compile " +"tests with an open case. Let the kernel compile go for about five minutes " +"and then put your hand inside the running machine and touch the outside " +"metal casing of the power supply to ground yourself. Then, carefully test " +"the temperature of the heat sink with the tip of your finger. If it's " +"unusually hot, then it's very possible that your heatsink/fan combo just " +"isn't adequate for your particular CPU. In that case, upgrade your system's " +"cooling hardware -- hopefully, your CPU hasn't sustained any permanent " +"damage and is still functional." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):207 +msgid "The ultimate CPU test" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):210 +msgid "" +"The kernel compile test is a great way to test for CPU stability, but " +"there's an even more extreme CPU test available that you might want to use. " +"I saved this one for last, because if your CPU is grossly undercooled, this " +"particular test could really overheat it and could <e>theoretically</e> " +"cause permanent damage to your CPU. This test is intended for systems that " +"pass the kernel compile test with no problem -- systems that you want to " +"ensure can handle even the most challenging CPU loads with ease. If your CPU " +"is properly cooled, it will pass this test, and if it doesn't pass, you need " +"more cooling." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):221 +msgid "" +"To perform my \"ultimate\" CPU test, the first thing I do is head over to " +"the lm_sensors page (see <uri link=\"#resources\">Resources</uri>) and " +"download the lm_sensors package. This source tarball contains various kernel " +"modules that interface with the health monitoring features that are built in " +"to nearly all modern motherboards. Once this package is properly installed " +"and the proper modules are loaded (use the prog/detect/sensors-detect script " +"to figure out which ones), you'll see some new files and directories appear " +"at <path>/proc/sys/dev/sensors</path>. These files contain handy information " +"like the speed of your CPU fans, CPU and mainboard temperature readings, and " +"motherboard voltage readings, all updated in real time. I recommend you " +"configure this package to compile as modules and use the sensors-detect " +"script to figure out what modules to load at boot time, since I've had " +"better results with this configuration." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):237 +msgid "" +"Once you have the lm_sensors modules loaded, I recommend that you install a " +"graphical CPU/sensors monitor, which will allow you to watch your CPU load " +"and temperatures in real time without having to repeatedly <c>cat</c> files " +"in /proc/sys/dev/sensors. For this purpose, I use a great little program " +"called gkrellm (see <uri link=\"#resources\">Resources</uri>). Here's a " +"snapshot of my gkrellm app, monitoring my CPU usage, motherboard temperature " +"settings and a bunch of other things:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(figure:link):248 +msgid "/images/docs/hardware-stability-gkrellm.jpg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(figure:caption):248 +msgid "gkrellm is up and running" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):250 +msgid "" +"There are other graphical monitoring packages available that are compatible " +"with lm_sensors; you'll find a bunch of them listed over at the lm_sensors " +"home page, under the \"links\" section." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):256 +msgid "" +"The last preparatory step is to download the cpuburn program (see <uri link=" +"\"#resources\">Resources</uri>). This handy little program uses hand-crafted " +"combinations of machine instructions to put maximum stress on your " +"particular CPU -- even a little bit more than a repetitive kernel compile. " +"Included in the archive are various little programs customized to set P5- " +"and P6-class processors, as well as a special version for the AMD K6. Once " +"you've unpacked the cpuburn tarball, read the README file; it explains how " +"to compile the included assembly source files. After you've done this, " +"you'll have your own little cpuburn program." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):268 +msgid "" +"Now, for the test. I normally fire up my graphical sensors monitor, and then " +"start the cpuburn program as root. Then, I watch the CPU temperature reading " +"rise and stabilize, and then I leave cpuburn running for an hour or so. If " +"you repeat these steps and your CPU temperature continues to rise to an " +"unusually high temperature (160 degrees Farenheit or so would be considered " +"\"unusually high\"), then your CPU cooling system needs major work. And, if " +"your machine crashes or locks up, or the cpuburn process dies, your CPU " +"cooling needs improvement -- or maybe your particular CPU simply isn't up to " +"\"spec\". You can use the CPU temperature readings to make that judgment. " +"But if all goes well, then your system should be able to tackle any " +"challenge thrown at it. After an hour or so, you can go ahead and kill the " +"cpuburn program and resume normal operations." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):288 +msgid "Memory troubleshooting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):290 +msgid "Memory testing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):293 +msgid "" +"It's really important to have a completely reliable CPU, and it's just as " +"important to have rock-solid RAM chips. Some people think that SIMMS and " +"DIMMS never fail and never need to be tested. Unfortunately, this isn't true " +"-- bad memory is very common, and is something that all of us need to watch " +"out for. Other people believe that while there may be bad RAM out there, any " +"RAM errors will be detected by the boot-time BIOS memory check. This is also " +"false; the BIOS memory check won't detect the vast majority of bad RAM, so " +"don't let the BIOS check give you a false sense of security." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):307 +msgid "Bad memory symptoms" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):310 +msgid "" +"OK, so there's bad RAM out there, and some may be sitting in your machine " +"right now. Here are some warning signs that may indicate that your computer " +"contains bad RAM:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):317 +msgid "" +"When you load a bunch of programs at once, every now and then a particular " +"program will die for no apparent reason." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):321 +msgid "" +"Every now and then, when you open a file, it appears corrupted. If you open " +"it later, it looks fine." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):325 +msgid "" +"When you extract tarballs (<c>tar -xzvf</c>), tar frequently reports that " +"the tarball is corrupted. You try extracting the tarball again at a later " +"date and tar doesn't report any errors. Similar problems can occur with gzip " +"and bzip2." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):331 +msgid "" +"If you're experiencing problems like these, it's likely that your system RAM " +"is defective. You'll definitely want to test your RAM using the following " +"method. And even if you haven't experienced any of these problems, it's a " +"good idea to give the RAM in your system a good workout to help ensure that " +"you won't be bitten by unexpected RAM quirks in the future. Here's how." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):344 +msgid "memtest86" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):347 +msgid "" +"Fortunately for us, there's an excellent Linux-based memory testing program " +"that installs onto a bootable floppy disk. It's called memtest86 (see <uri " +"link=\"#resources\">Resources</uri> to get it). Creating a memtest floppy is " +"simple. First, download the tarball. Then, unpack the archive and build the " +"binary disk image:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre:caption):355 +msgid "Building memtest86" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre):355 +#, no-wrap +msgid "" +"\n" +"# <i>tar -xzvf memtest86-2.5.tar.gz</i>\n" +"# <i>cd memtest86-2.5</i>\n" +"# <i>make</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):361 +msgid "Then, insert a blank 3.5\" disk into your floppy drive, and type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre:caption):365 +msgid "Installing memtest86" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(pre):365 +#, no-wrap +msgid "" +"\n" +"# <i>make install</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):369 +msgid "" +"After just a few seconds, your 3.5\" disk will have a wonderful little " +"memory tester sitting on it, ready to be booted. The best way to perform " +"this test is to find some time when your machine can sit idle for at least " +"six hours -- starting the test right before you go to bed (or leave work) is " +"a good idea. To start the test, reboot your machine with the 3.5\" disk in " +"the drive. When your system boots, the memtest86 program will immediately " +"start:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(figure:link):379 +msgid "/images/docs/hardware-stability-memtest86.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(figure:caption):379 +msgid "memtest86 testing the RAM on my development machine" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):381 +msgid "" +"Major memory quirks (such as \"dead\" bits) will be detected within seconds. " +"Failures triggered by specific bit patterns (which are unfortunately quite " +"common) may not be detected for several hours, but should eventually be " +"detected. As soon as memtest86 detects a defective bit, a message will " +"appear at the bottom of the screen -- and the tests will continue. When you " +"turn on your monitor in the morning, find that the tests have completed, and " +"see no warnings on the screen, then in all probability your RAM is fine. " +"However, if you continue to experience the problems listed in the <uri link=" +"\"#badmem\">Bad memory symptoms</uri> section, then it <e>is</e> possible " +"that your RAM has an infrequently occurring quirk and may still need to be " +"replaced." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):397 +msgid "Solving RAM problems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):400 +msgid "" +"I hope that all your RAM is working just fine. However, if you're one of the " +"unfortunate ones, all may not be lost -- there are still some things you can " +"do to \"fix\" your bad RAM. The first thing I suggest doing is to visit your " +"BIOS setup program and look at your memory settings. Some BIOS setup " +"programs have a memory option called \"Turbo Mode\" -- obviously, if you " +"have something like this enabled, then you should disable it. It's also " +"possible that your BIOS memory timings are set incorrectly -- you can try " +"adjusting them (increasing the refresh rate, lowering the CAS setting) and " +"rerunning memtest86 to see if the problem goes away." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):412 +msgid "" +"If memtest still finds errors, then it's time to locate the faulty SIMM or " +"DIMM and remove it from your machine. If you have more than one memory " +"module installed, then you'll want to install only a single module (or two " +"modules if you have SIMMS), and run memtest86. Cycle through all your " +"modules and you'll be able to determine which ones are defective -- there's " +"no need to throw a good memory module in the trash." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):421 +msgid "" +"That's all for now; in the second and final installment in this series, " +"we'll take a look at how to fix problems related to hardware configuration, " +"including IRQ and PCI latency issues. In the mean time, you may want to " +"check out the following resources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):431 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):435 +msgid "" +"Download the <uri link=\"http://www.netroedge.com/~lm78\">lm_sensors " +"package</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):439 +msgid "Pick up a copy of <uri link=\"http://gkrellm.net/\">gkrellm</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):440 +msgid "" +"Get the <uri link=\"http://users.ev1.net/~redelm/\">cpuburn program</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):443 +msgid "" +"Grab your own copy of <uri link=\"http://www.memtest86.com/\">memtest86</" +"uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):446 +msgid "" +"For more information on the \"signal 11 problem\", check out the <uri link=" +"\"http://www.bitwizard.nl/sig11/\">Sig 11 FAQ</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):450 +msgid "" +"You can find a bunch of Window-maker dockapps (some of which graph CPU and " +"sensors data) at <uri link=\"http://www.windowmaker.org/links-general.html" +"\">Linuxpowered.com's Window-maker links page</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):456 +msgid "" +"If you're trying to diagnose a hardware problem related to your nVidia " +"graphics card, be sure to check out the <uri link=\"http://www." +"technologyvault.co.uk/geforce/faq.php?list=categories&prog=gef&" +"lang=en\">GeForce FAQ</uri>. There's lots of great Linux and Windows-related " +"information there." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(li):462 +msgid "" +"For additional nVidia troubleshooting information, check out Sven " +"Vermeulen's <uri link=\"/doc/en/nvidia-guide.xml\">nVidia Guide</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(title):471 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(p):474 +msgid "" +"Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of " +"Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a " +"contributing author of several books published by MacMillan: Caldera " +"OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has " +"been involved with computers in some fashion since the second grade when he " +"was first exposed to the Logo programming language and a potentially lethal " +"dose of Pac Man. This probably explains why he has since served as a Lead " +"Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys " +"spending time with his wife Mary and his new baby daughter, Hadassah. You " +"can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/hardware-stability-p2.xml.po b/article/gettext/ru/hardware-stability-p2.xml.po new file mode 100644 index 0000000..1e00c9f --- /dev/null +++ b/article/gettext/ru/hardware-stability-p2.xml.po @@ -0,0 +1,609 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(guide:link):5 +msgid "/doc/en/articles/hardware-stability-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):6 +msgid "Linux hardware stability guide, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by Joshua Saddler, nightmorph@gentoo.org +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(abstract):13 +msgid "" +"In this article, Daniel Robbins shares his experiences in getting his NVIDIA " +"TNT graphics card working under Linux using NVIDIA's accelerated drivers. As " +"he does, he'll show you how to diagnose and fix IRQ and PCI latency timer " +"issues -- techniques you can use to ensure that your systems don't " +"experience lock-ups, inconsistent behavior, or data loss." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(version):26 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(date):27 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):30 +msgid "Drivers" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):32 +msgid "The many causes of instability" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):35 +msgid "" +"A stability problem is often not caused by defective hardware, but by " +"improper hardware configuration or flaky drivers. My experience in this area " +"began when I tried to get Linux working on my Diamond Viper V550, an NVIDIA " +"TNT-based AGP card, using NVIDIA's own accelerated drivers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):42 +msgid "" +"NVIDIA has their own display drivers for Linux, a collaboration between " +"NVIDIA, SGI, and VA Linux. These drivers have a lot of advantages over the " +"standard 2d-only NVIDIA drivers included with Xfree86 4.0. For one, they " +"have full accelerated 3D support. Even better, they feature an official " +"OpenGL 1.2 implementation, rather than just an enhanced version of Mesa. So, " +"all in all, these accelerated drivers are the ones you want to be using if " +"you own an NVIDIA-based graphics card, at least in theory. My attempt to get " +"them working properly turned out to be an excellent learning experience, to " +"say the least." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):53 +msgid "" +"After I installed the accelerated Linux NVIDIA drivers (see <uri link=" +"\"#resources\">Resources</uri> later in this article), I started up Xfree86 " +"and began playing around with all my 3D applications, now wonderfully " +"accelerated as they should be. Up until that point, I had had to reboot into " +"Windows NT in order to take advantage of 3D acceleration. Now, while I don't " +"mind NT, having to reboot to use 3D apps was somewhat annoying, and I was " +"glad to have one less reason to leave Linux and reboot my machine. However, " +"after playing around for an hour or so, I experienced a fatal setback to my " +"Linux 3D aspirations -- my machine locked up. My mouse simply stopped moving " +"and the screen froze, and I had to reboot my system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):66 +msgid "" +"Yes, I was having some kind of stability problem. But I didn't know exactly " +"what was causing the problem. Did I have flaky hardware, or was the card " +"misconfigured? Or maybe it was a problem with the driver -- did it not like " +"my VIA KT133-based Athlon motherboard? Whatever the problem, I wanted to " +"resolve it quickly. In this article, I'm going to share with you the " +"procedure that I went through to fix my hardware stability problem. Although " +"you may not be struggling with exactly the same issue, the steps that I used " +"to diagnose and (mostly) fix the problem are general in nature and " +"applicable to many different types of Linux hardware problems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):81 +msgid "First, the hardware" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):84 +msgid "" +"The first thing that crossed my mind was that I might have flaky or under-" +"cooled hardware. On the one hand, my Diamond Viper V550 seemed to have no " +"problems under Windows NT. On the other hand, maybe Linux was somehow " +"pushing the chip harder and triggering heat-related lock-ups. My V550 did " +"get <e>extremely</e> hot, and its OEM heatsink seemed at best barely " +"adequate. The combination of the lock-ups and the fact that this card was " +"being marginally cooled convinced me to head over to PC Power and Cooling " +"(see <uri link=\"#resources\">Resources</uri>) to purchase a mini integrated " +"heatsink/fan for my V550." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):96 +msgid "" +"So, I received my Video Cool, popped off the OEM heatsink on the video card " +"(voiding the warranty), cleaned off the TNT chip and affixed the Video Cool " +"to the top of the chip. Verdict? My video card didn't get extremely hot " +"anymore, but the lockups continued. The lesson I learned from this " +"particular experience is this -- if you ensure that your system is " +"adequately cooled to begin with, you'll never need to worry about components " +"malfunctioning due to inadequate cooling. This in itself is a good reason to " +"invest some time and effort in making sure that your workstations and " +"servers run coolly. Now that I had taken care of the heat issue, I knew that " +"the lock-ups were most likely not due to flaky hardware, and I began to look " +"elsewhere." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):112 +msgid "New drivers -- and a possible solution?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):115 +msgid "" +"I partly suspected that NVIDIA's drivers were themselves the cause of the " +"problem. Fortunately , a new version of the drivers had just been released, " +"so I immediately upgraded in the hope that this would solve my stability " +"problem. Unfortunately, it didn't, and after checking with others on the " +"#nvidia channel on openprojects.net, I found out that while not everyone was " +"able to get the driver to operate stably, it was working for a lot of people." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):124 +msgid "" +"On #nvidia, someone suggested that I make sure that the V550 wasn't sharing " +"an IRQ with another card. Unlike the standard XFree86 driver, the " +"accelerated NVIDIA driver requires an IRQ for proper operation. To see if it " +"had its own dedicated IRQ, I typed <c>cat /proc/interrupts</c>, and lo and " +"behold, my V550 was sharing an interrupt with my IDE controller. Before I " +"explain how I solved this particular problem, I'd like to give you a brief " +"background on IRQs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):133 +msgid "" +"PCs use IRQs, and hardware interrupts in general, to allow peripheral " +"devices, such as the video card and the disk controllers, to signal the CPU " +"that they have data that's ready to be processed. In the old days before the " +"PCI bus existed, it was critical that each device in the machine had its " +"own, dedicated IRQ. In case you are still using ISA peripherals in your " +"machine, this is still true -- all non-PCI devices should have their own " +"dedicated IRQ." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):147 +msgid "IRQs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):149 +msgid "IRQs and PCI" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):152 +msgid "" +"However, things are a little different with the PCI bus. PCI allocates four " +"IRQs that can be used by the PCI/AGP cards in your system. In general, these " +"IRQs <e>can</e> be shared among multiple devices. (If you do this, make sure " +"that all the devices doing the sharing are PCI and AGP devices.) IRQ sharing " +"is important, especially for modern machines that may have five PCIs and one " +"AGP slot. Without IRQ sharing, you would be unable to have more than four " +"IRQ-using cards in your system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):162 +msgid "" +"There are, however, some limitations to PCI IRQ sharing. While modern " +"motherboards' BIOS and Linux kernels generally support PCI IRQ sharing, " +"certain PCI cards may simply refuse to work properly when sharing an IRQ " +"with another device. If you're experiencing random system lockups, " +"especially lockups that appear to be correlated with the use of a specific " +"hardware device, you may want to try and get all your PCI devices to use " +"their own IRQs, just to be on the safe side. The first step is to see if any " +"devices in your system are sharing IRQs to begin with. To do this, follow " +"these steps:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):174 +msgid "" +"Use the various hardware devices in your system, such as disk, sound, video, " +"SCSI, etc. This ensures that Linux will handle interrupts for these various " +"devices." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):179 +msgid "" +"<c>cat /proc/interrupts</c>, which will display a list and count of all " +"interrupts which the Linux kernel has handled so far. Look in the far right " +"column in this list. If two or more devices are listed in a single row, then " +"they're sharing that particular IRQ." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):187 +msgid "" +"If one of the devices in question is a non-PCI device (ISA or other legacy " +"cards) then you've found yourself an IRQ conflict, which you can attempt to " +"fix with your BIOS, the isapnptools package, or the physical jumpers on your " +"peripheral cards. Note that if a device is built in to your motherboard, it " +"is most likely a PCI device even though it doesn't occupy a physical PCI " +"slot." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):195 +msgid "" +"If all the devices in question are PCI or AGP devices, then whether or not " +"you have a problem depends on your hardware. Here are some steps you can " +"take to attempt to get all your PCI/AGP devices on their own IRQs:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):202 +msgid "" +"Enter your system BIOS and disable any unused peripherals (USB, parallel " +"port, etc.) This can free up several IRQs, giving each piece of hardware in " +"use a greater chance of being assigned its own unique IRQs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):207 +msgid "" +"Enter the PnP section of your BIOS and make sure that your BIOS is " +"configured for a \"non-PnP\" operating system. Then select the \"Reset ESCD " +"data\" option. This will force your BIOS to reassign IRQs to all of your " +"hardware devices the next time you reboot." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):213 +msgid "" +"Boot Linux, use your hardware, <c>cat /proc/interrupts</c> and look at the " +"result. Hopefully, all your devices are now on their own IRQs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):219 +msgid "" +"If your two suspect PCI devices are still sharing IRQs, you have two " +"additional options. Some BIOS setup programs allow you to assign certain " +"IRQs to specific PCI slots. If you have one of these rare BIOS setup " +"programs, you can use this functionality to eliminate the conflict. If you " +"don't have this option in your BIOS (most of us don't), there is one other " +"sure fix for this problem -- shut down your machine, turn off the power, " +"unplug your PC from the wall, and wait a few minutes. Then, open your system " +"case and physically move your PCI cards to different slots. This option may " +"seem a bit odd, but it will definitely work and is especially effective if " +"you have a few free PCI slots in your system (but it may take you some time " +"to find the correct slot for each of your cards.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):233 +msgid "" +"I performed the \"PCI card-shuffling trick\" and was able to get all the " +"devices in my system to use a unique IRQ. Well, almost. As you can see, two " +"of my IDE devices still shared an IRQ:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(pre:caption):239 +msgid "IRQ sharing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(pre):239 +#, no-wrap +msgid "" +"\n" +"# <i>cat /proc/interrupts</i>\n" +" CPU0\n" +" 0: 52063600 XT-PIC timer\n" +" 1: 616810 XT-PIC keyboard\n" +" 2: 0 XT-PIC cascade\n" +" 5: 89084 XT-PIC ide2, ide3\n" +" 7: 1515741 XT-PIC eth0\n" +" 8: 155928 XT-PIC rtc\n" +" 9: 1139761505 XT-PIC nvidia\n" +" 10: 164000 XT-PIC Ensoniq AudioPCI\n" +" 12: 4458823 XT-PIC PS/2 Mouse\n" +" 14: 664176 XT-PIC ide0\n" +" 15: 38661 XT-PIC ide1\n" +"NMI: 0\n" +"ERR: 0 \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):257 +msgid "" +"However, this was normal because the ide2 and ide3 devices were integrated " +"onto the same chip on my Promise FastTrak IDE card." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):262 +msgid "" +"So, now that (almost) all my devices had a unique IRQ, I tried my " +"accelerated drivers and ... still experienced a lock-up in less than an " +"hour. Apparently, the shared PCI IRQ was not the problem at all. Oh, " +"well ... time to look elsewhere (yet again)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):272 +msgid "Fix one problem, find another" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):275 +msgid "" +"After some time, I found something else that I could do to get the NVIDIA " +"drivers to run perfectly, albeit somewhat slower -- disable AGP. As much as " +"I didn't want to do this, the current version of the drivers permitted AGP " +"to be turned off entirely simply by adding a single line to the XF86Config. " +"With AGP turned off, I would reduce my video to memory bandwidth by 4x, but " +"significantly slower 3D would still be much faster than no hardware 3D " +"acceleration at all. After disabling AGP, I <e>finally</e> had a stable " +"system! However, this temporary solution created another problem. Whenever " +"3D OpenGL animation was going on, audio playback became extremely garbled " +"and choppy. Eek!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):288 +msgid "" +"Fortunately, I was able to find a solution to my audio problem. I used the " +"<c>setpci</c> utility to set more appropriate PCI bus latency timer settings " +"for my PCI devices. I'll show you the specific solution in a minute -- but " +"first, some background." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):295 +msgid "" +"As you probably know, the PCI bus is a shared resource -- all your PCI cards " +"take turns communicating over the bus, and normally, all is well. However, " +"because the PCI bus is a shared resource with a limited (although normally " +"adequate) bandwidth, it's possible for one PCI card to negatively affect the " +"performance of other PCI cards in the system. For example, what happens if " +"PCI card A is in the process of sending data across the bus and at the same " +"moment PCI card B attempts to send data? Does card A gracefully concede use " +"of the bus, or does it continue with its data transfer -- and if so, for how " +"long?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):311 +msgid "PCI latency" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):313 +msgid "The PCI latency timer" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):316 +msgid "" +"The answer to this question has everything to do with a configurable setting " +"that each PCI device has, the PCI bus latency timer. It's normally the role " +"of the Linux driver to set the proper PCI bus latency timer value for each " +"PCI device in your system, and most of the time the default settings are " +"adequate (if not optimal), all the devices get along fine and the system " +"works properly. The PCI bus latency timer can range from zero to 248. If a " +"device has a setting of zero, then it will immediately give up the bus if " +"another device needs to transmit. If a device has a setting of 248, it will " +"continue to use the bus for a longer period of time before stopping, while " +"the other device waits for its turn." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):329 +msgid "" +"If all of your devices have relatively high PCI bus latency timer settings " +"and a lot of data is being sent over the bus, then your PCI cards are " +"generally going to have to wait <e>longer</e> before they gain control of " +"the bus and can begin sending data. However, once they gain control of the " +"bus they will be able to burst a lot of data across it before giving up the " +"bus to another device. This is why high PCI bus latency timer settings " +"<e>increase latency</e> (the delay in sending data across the bus), but also " +"<e>increase effective bandwidth</e>. Because each device gets to burst large " +"amounts of data across the bus without interruption, the PCI bus is used " +"more efficiently and your PCI devices can transmit more data." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):342 +msgid "" +"On the other hand, if all your PCI devices have low PCI bus latency " +"settings, then they're going to gladly give up the bus if another card needs " +"to transmit data. This results in a much lower data transmit latency, since " +"no device is going to hold on to the bus for an extended period of time, " +"causing other devices to wait. The dark side to all this is that low PCI bus " +"latency timer settings <e>reduce</e> the effective PCI bus bandwidth when " +"two or more PCI devices are operating simultaneously. This happens because " +"large data bursts become much less frequent and control of the bus changes " +"rapidly, increasing overhead." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):354 +msgid "" +"Most Linux distributions include a suite of tools called pci-utils that " +"allow you to view and change the latency timer settings for your PCI " +"devices. To view your current PCI latency settings, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(pre:caption):360 +msgid "Viewing latency settings" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(pre):360 +#, no-wrap +msgid "" +"\n" +"# <i>lspci -v</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):364 +msgid "" +"Typing this command will display very detailed information about all of your " +"PCI devices. The PCI latency setting for each device is listed on the third " +"line, right before the IRQ setting." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):373 +msgid "PCI latency approaches" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):376 +msgid "" +"How does this relate to my garbled sound problem? Well, I was experiencing " +"garbled sound because with my default PCI latency settings the way they " +"were, the V550 dominated the PCI bus when performing 3D acceleration. Here " +"is why. My V550 is an AGP 2X card, so when I turned off AGP (to increase " +"stability), I reduced the card's bandwidth to main memory by 75%! Because my " +"V550 now was trying to pump the same amount of data across the slower PCI " +"bus, the PCI bus was nearing 100% utilization, and this was causing problems " +"for my sound hardware. Audio devices are especially susceptible to PCI " +"latency issues because they generally have small data buffers and need their " +"audio data delivered to them on time to avoid buffer underruns. With my " +"current settings, the V550 was using so much PCI bandwidth that there wasn't " +"enough left to get data to my sound card, so I experienced audio distortion " +"caused by buffer underruns." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):392 +msgid "" +"There are two possible solutions to this problem. The first and most obvious " +"solution would be to use the <c>setpci</c> command to reduce my V550's PCI " +"latency timer. This would cause it to share the PCI bus more readily, " +"allowing my other devices to transmit their data with less latency. I tried " +"this solution using the <c>setpci</c> command and it worked. However, I " +"decided not to go this route because I wanted to <e>maximize</e> my already " +"crippled 3D graphics performance, not additionally hinder it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):402 +msgid "" +"I decided to try out a second higher-performance option. Instead of reducing " +"my V550 PCI bus latency, I increased the PCI latency of all my devices to " +"the relatively high value of 176 (devices normally default to somewhere " +"around 32, except for my V550 which defaulted to above 200). Then I set the " +"PCI bus latency of my latency-sensitive devices to the maximum setting, 248. " +"This solved the problem, as I had hoped, by allowing my sound card to burst " +"relatively huge chunks of data across the bus in one go, allowing it to " +"maximize its use of the bus and avoid buffer-underrun conditions. At the " +"same time, my other devices could also transmit data in chunks that were " +"small enough not to hog the bus, but large enough to use the bus " +"efficiently. I was particularly pleased with this solution because I was " +"able to solve my audio problem while at the same time increasing the " +"effective bandwidth of my development machine's PCI bus. Here's the excerpt " +"from my system startup scripts that did the trick:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(pre:caption):419 +msgid "Latency adjustment" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(pre):419 +#, no-wrap +msgid "" +"\n" +"<comment># \"open up\" the PCI bus by allowing fairly long bursts\n" +"# for all devices, increasing performance</comment>\n" +"setpci -v -d *:* latency_timer=b0\n" +"\n" +"<comment># maximize latency timers for network and audio,\n" +"# allowing them to transmit more data per burst,\n" +"# preventing buffer over/underrun conditions</comment>\n" +"\n" +"setpci -v -s 00:0f.0 latency_timer=ff\n" +"setpci -v -s 00:0e.0 latency_timer=ff\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):432 +msgid "" +"On the first line, the <c>-d *:*</c> option tells setpci to apply this " +"setting to all PCI devices. The <c>latency_timer=b0</c> option sets the " +"timer to 176 (<c>b0</c> is hexadecimal for 176). The <c>-s</c> options on " +"the last two lines specify the PCI device that will be affected by PCI bus/" +"slot and function, rather than by vendor and device ID. These are the first " +"numbers listed for each device when you type lspci. The <c>ff</c> value " +"specifies a latency timer setting of 256, which is rounded down to 248 by " +"<c>setpci</c>. If you're experiencing a PCI latency timer-related issue, " +"you'll need to experiment with <c>lspci</c> and <c>setpci</c> to find the " +"optimal values for your system. If your hardware can handle it, larger " +"latency timer values are best." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):448 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):451 +msgid "" +"I hope you've found my hardware troubleshooting as good a learning " +"experience as I did. I'm now patiently waiting for the next release of the " +"NVIDIA drivers. Hopefully, these will solve my AGP-related instability " +"issues. Below are several excellent NVIDIA-related resources that may " +"interest you." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):459 +msgid "" +"Read Daniel's previous article in this series, <uri link=\"/doc/en/articles/" +"hardware-stability-p1.xml\">Linux hardware stability guide, Part 1</uri>, " +"where he shows you how to diagnose and fix CPU flakiness, as well as how to " +"test your RAM for defects." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):465 +msgid "" +"Check out <uri link=\"http://www.nvidia.com/Products/Drivers.nsf/Linux.html" +"\">NVIDIA's accelerated Linux drivers</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):470 +msgid "" +"If you're trying to diagnose a hardware problem related to your NVIDIA " +"graphics card, be sure to check out the <uri link=\"http://www." +"technologyvault.co.uk/geforce/faq.php?list=categories&prog=gef&" +"lang=en\">GeForce FAQ</uri>. It has lots of great Linux and Windows-related " +"information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):476 +msgid "" +"For additional NVIDIA troubleshooting information, check out Sven " +"Vermeulen's <uri link=\"/doc/en/nvidia-guide.xml\">NVIDIA Guide</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):480 +msgid "" +"You may want to check out the <uri link=\"http://powertweak.sourceforge.net/" +"\">Linux Powertweak project</uri>. Powertweak allows you to configure PCI " +"latency timer settings (among other things) using a GTK and console-based " +"interface." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):486 +msgid "" +"Visit <uri link=\"http://www.pcpowercooling.com/\">PC Power and Cooling</" +"uri> to purchase things like mini integrated heatsink/fans and Video Cool." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(li):490 +msgid "" +"Check out <uri link=\"http://www.tennmax.com/\">Tennmax</uri>'s Lasagna " +"series of coolers, which from my experience have a more cooling capacity " +"than Video Cool but run a little bit louder." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(title):500 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(p):503 +msgid "" +"Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of " +"Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a " +"contributing author of several books published by MacMillan: Caldera " +"OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has " +"been involved with computers in some fashion since the second grade when he " +"was first exposed to the Logo programming language and a potentially lethal " +"dose of Pac Man. This probably explains why he has since served as a Lead " +"Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys " +"spending time with his wife Mary and his new baby daughter, Hadassah. You " +"can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/hardware-stability-p2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/index.xml.po b/article/gettext/ru/index.xml.po new file mode 100644 index 0000000..34037dc --- /dev/null +++ b/article/gettext/ru/index.xml.po @@ -0,0 +1,32 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/index.xml(title):10 +msgid "Articles" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/index.xml(p):17 +msgid "" +"A number of our developers have written articles for the Linux community. We " +"have republished them here for your convenience." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/index.xml(catid):27 +msgid "articles" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/index.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-afig-p8.xml.po b/article/gettext/ru/l-afig-p8.xml.po new file mode 100644 index 0000000..038335d --- /dev/null +++ b/article/gettext/ru/l-afig-p8.xml.po @@ -0,0 +1,471 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(guide:link):5 +msgid "/doc/en/articles/l-afig-p8.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):7 +msgid "Advanced filesystem implementor's guide, Part 8" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(author:title):9 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(mail:link):10 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(mail):10 +msgid "Daniel Robbins" +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(abstract):19 +msgid "" +"With the 2.4 release of Linux come many new filesystem possibilities, " +"including Reiserfs, XFS, GFS, and others. These filesystems sound cool, but " +"what exactly can they do, what are they good at, and exactly how do you go " +"about safely using them in a production Linux environment? Daniel Robbins " +"answers these questions by showing you how to set up these new advanced " +"filesystems under Linux 2.4. In this installment, Daniel continues his look " +"at ext3, a new improved version of ext2 with journaling capabilities. He " +"reveals all the inside information on ext3, and demonstrates some shockingly " +"good ext3 data=journal interactive performance numbers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(version):31 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(date):32 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):35 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):39 +msgid "" +"I'm going to be honest. For this article, I was planning to show you how to " +"get ext3 up and running on your system. Although that's what I said I'd do, " +"I'm not going to do it. Andrew Morton's excellent \"Using the ext3 " +"filesystem in 2.4 kernels\" page (see <uri link=\"#resources\">Resources</" +"uri> later in this article) already does a great job of explaining how to " +"ext3-enable your system, so there's no need for me to repeat all the basics " +"here. Instead, I'm going to delve into some meatier ext3 topics, ones that I " +"think you'll find very useful. After you read this article, when you're " +"ready to get ext3 up and running, head over to Andrew's page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):56 +msgid "2.4 kernel update" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):60 +msgid "" +"First, let's start with a 2.4 kernel update. I last discussed 2.4 kernel " +"stability when I was covering ReiserFS. Way back then, finding a stable 2.4 " +"kernel was a challenge, and I recommended sticking with the known and at " +"that time bleeding-edge 2.4.4-ac9 kernel -- especially for anyone planning " +"to use the ReiserFS filesystem in a production environment. As you might " +"guess, a lot has happened since 2.4.4-ac9, and it's definitely time to start " +"looking at newer kernels." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):70 +msgid "" +"With kernel 2.4.10, the 2.4 series reached a new level of performance and " +"scalability (something that we've been anticipating for a long time). So, " +"what happened to allow Linux 2.4 to finally grow up? In an acronym, VM. " +"Linus, recognizing that the 2.4 series wasn't performing spectacularly, " +"ripped out Linux's problematic VM code and replaced it with a lean and mean " +"VM implementation from Andrea Archangeli. Andrea's new VM implementation " +"(which first appeared in 2.4.10) was really great; it really sped up the " +"kernel and made the entire system more responsive. 2.4.10 was definitely a " +"major turning point in 2.4 Linux kernel development; up until then, things " +"weren't looking very good, and many of us were wondering why we weren't " +"FreeBSD developers. We all should thank Linus for his heroism in making such " +"a major (but sorely needed) change in the 2.4 stable kernel series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):85 +msgid "" +"Since Andrea's new VM code needed a bit of time to be integrated seamlessly " +"with the rest of the kernel, use 2.4.13+. Even better, use 2.4.16+, since " +"the rock-solid ext3 filesystem code was finally integrated into the official " +"Linus kernel starting with the 2.4.15-pre2 release. There's no reason to " +"avoid using 2.4.16+ kernel, and it'll make your job of getting ext3 up and " +"running that much easier. If you do use a 2.4.16+ kernel, just remember that " +"it's no longer necessary to apply the ext3 patch as described on Andrew's " +"page (see <uri link=\"#resources\">Resources</uri>). Linus already added it " +"for you. :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):96 +msgid "" +"You'll notice that I recommend using 2.4.16+ rather than 2.4.15+, and with " +"good reason. With the release of kernel 2.4.15-pre9, a really ugly " +"filesystem corruption bug was introduced to the kernel. It took until 2.4.16-" +"pre1 for the problem to be identified and fixed, resulting in a span of " +"kernels (including 2.4.15) that should be avoided at all costs. Choosing a " +"2.4.16+ kernel allows you to avoid this bad batch entirely." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):110 +msgid "Laptops...beware?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):114 +msgid "" +"Ext3 has a stellar reputation for being a rock-solid filesystem, so I was " +"surprised to learn that quite a few laptop users were having filesystem " +"corruption problems when they switched to ext3. In general, it's tempting to " +"react to these kinds of reports by avoiding ext3 entirely; however, after " +"asking around, I discovered that the disk corruption problems that people " +"were experiencing had nothing to do with ext3 itself, but were being caused " +"by certain laptop hard drives." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):127 +msgid "The write cache" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):130 +msgid "" +"You may not know this, but most modern hard drives have something called a " +"\"write cache\", used by the hard drive to collect pending write operations. " +"By putting pending writes into a cache, the hard drive firmware can then " +"reorder and group them so that they're written to disk in the fastest " +"possible way. The write cache is generally considered to be a very good " +"thing (read Linus' explanation and opinion of write caching in <uri link=" +"\"#resources\">Resources</uri>)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):140 +msgid "" +"Unfortunately, certain laptop hard drives now on the market have the dubious " +"feature of ignoring any official ATA request to flush their write cache to " +"disk. This isn't a wonderful design feature, although it has been allowed by " +"the ATA spec up until recently. With these types of drives, there's no way " +"for the kernel to guarantee that a particular block has actually been " +"recorded to the disk platters. Although this sounds like a thorny problem, " +"this particular issue by itself is probably not the cause of the data " +"corruption problems that people have been experiencing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):151 +msgid "" +"However, it gets worse. Some modern laptop hard drives have an even nastier " +"habit of throwing away their write cache whenever the system is rebooted or " +"suspended. Obviously, if a hard drive has both of these problems, it's going " +"to regularly corrupt data, and there's nothing that Linux can do to prevent " +"it from doing so." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):159 +msgid "" +"So, what's the solution? If you have a laptop, tread carefully. Back up all " +"your important files before making any major change to your filesystems. If " +"you experience data corruption problems that seem to fit the pattern of what " +"I described above, particularly with ext3, then remember that it may be your " +"laptop hard drive that's at fault. In that case, you may want to contact " +"your laptop manufacturer and inquire about getting a replacement drive. " +"Hopefully, in a few months time, these flaky hard drives will be pulled from " +"the market and we'll never need to worry about this issue again." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):170 +msgid "" +"Now that I've scared you out of your minds, let's take a look at ext3's " +"various data journaling options." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):180 +msgid "Journaling options and write latency" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):184 +msgid "" +"Ext3 allows you to choose from one of three data journaling modes at " +"filesystem mount time: data=writeback, data=ordered, and data=journal." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):189 +msgid "" +"To specify a journal mode, you can add the appropriate string (data=journal, " +"for example) to the options section of your /etc/fstab, or specify the -o " +"data=journal command-line option when calling mount directly. If you'd like " +"to specify the data journaling method used for your root filesystem " +"(data=ordered is the default), you can to use a special kernel boot option " +"called rootflags. So, if you'd like to put your root filesystem into full " +"data journaling mode, add rootflags=data=journal to your kernel boot options." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):202 +msgid "data=writeback mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):205 +msgid "" +"In data=writeback mode, ext3 doesn't do any form of data journaling at all, " +"providing you with similar journaling found in the XFS, JFS, and ReiserFS " +"filesystems (metadata only). As I explained in my <uri link=\"http://www-128." +"ibm.com/developerworks/linux/library/l-fs7.html\"> previous article</uri>, " +"this could allow recently modified files to become corrupted in the event of " +"an unexpected reboot. Despite this drawback, data=writeback mode should give " +"you the best ext3 performance under most conditions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):219 +msgid "data=ordered mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):222 +msgid "" +"In data=ordered mode, ext3 only officially journals metadata, but it " +"logically groups metadata and data blocks into a single unit called a " +"transaction. When it's time to write the new metadata out to disk, the " +"associated data blocks are written first. data=ordered mode effectively " +"solves the corruption problem found in data=writeback mode and most other " +"journaled filesystems, and it does so without requiring full data " +"journaling. In general, data=ordered ext3 filesystems perform slightly " +"slower than data=writeback filesystems, but significantly faster than their " +"full data journaling counterparts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):233 +msgid "" +"When appending data to files, data=ordered mode provides all of the " +"integrity guarantees offered by ext3's full data journaling mode. However, " +"if part of a file is being overwritten and the system crashes, it's possible " +"that the region being written will contain a combination of original blocks " +"interspersed with updated blocks. This is because data=ordered provides no " +"guarantees as to which blocks are overwritten first, so you can't assume " +"that just because overwritten block x was updated, that overwritten block " +"x-1 was updated as well. Instead, data=ordered leaves the write ordering up " +"to the hard drive's write cache. In general, this limitation doesn't end up " +"negatively impacting people very often, since file appends are generally " +"much more common than file overwrites. For this reason, data=ordered mode is " +"a good higher-performance replacement for full data journaling." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):251 +msgid "data=journal mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):254 +msgid "" +"data=journal mode provides full data and metadata journaling. All new data " +"is written to the journal first, and then to its final location. In the " +"event of a crash, the journal can be replayed, bringing both data and " +"metadata into a consistent state." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):261 +msgid "" +"Theoretically, data=journal mode is the slowest journaling mode of all, " +"since data gets written to disk twice rather than once. However, it turns " +"out that in certain situations, data=journal mode can be blazingly fast. " +"Andrew Morton, after hearing reports on LKML that ext3 data=journal " +"filesystems were giving people unbelievably great interactive filesystem " +"performance, decided to put together a little test. First, he created simple " +"shell script designed to write data to a test filesystem as quickly as " +"possible:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(pre:caption):271 +msgid "Rapid writing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(pre):271 +#, no-wrap +msgid "" +"\n" +"while true\n" +"do\n" +" dd if=/dev/zero of=largefile bs=16384 count=131072\n" +"done\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):278 +msgid "" +"While data was being written to the test filesystem, he attempted to read " +"16MB of data from another ext2 filesystem on the same disk, timing the " +"results:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(pre:caption):284 +msgid "Reading a 16MB file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):288 +msgid "" +"The results were astounding. data=journal mode allowed the 16-meg-file to be " +"read from 9 to over 13 times faster than other ext3 modes, ReiserFS, and " +"even ext2 (which has no journaling overhead):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):296 +msgid "Written-to-filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):297 +msgid "16-meg-read-time (seconds)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):300 +msgid "ext2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):301 +msgid "78" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):304 +msgid "ReiserFS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):305 +msgid "67" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):308 +msgid "ext3 data=ordered" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):309 +msgid "93" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):312 +msgid "ext3 data=writeback" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):313 +msgid "74" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(ti):316 +msgid "ext3 data=journal" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):321 +msgid "" +"Andrew repeated this test, but tried to read a 16MB file from the test " +"filesystem (rather than a different filesystem), and he got identical " +"results. So, what does this mean? Somehow, ext3's data=journal mode is " +"incredibly well-suited to situations where data needs to be read from and " +"written to disk at the same time. Therefore, ext3's data=journal mode, which " +"was assumed to be the slowest of all ext3 modes in nearly all conditions, " +"actually turns out to have a major performance advantage in busy " +"environments where interactive IO performance needs to be maximized. Maybe " +"data=journal mode isn't so sluggish after all!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):333 +msgid "" +"Andrew is still trying to figure out exactly why data=journal mode is doing " +"so much better than everything else. When he does, he may be able to add the " +"necessary tweaks to the rest of ext3 so that data=writeback and data=ordered " +"modes see some benefit as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):345 +msgid "data=journal tweaks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):349 +msgid "" +"Some people have had a particular performance problem when using ext3's " +"data=journal mode on busy servers -- busy NFS servers, in particular. Every " +"thirty seconds, the server experiences a huge storm of disk-writing " +"activity, causing the system to nearly grind to a halt. If you experience " +"this problem, it's easy to fix. Simply type the following command as root to " +"tweak Linux's dirty buffer-flushing algorithm:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(pre:caption):358 +msgid "Tweaking bdflush" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):362 +msgid "" +"These new bdflush settings will cause kupdate to run every 0.6 seconds " +"rather than every 5 seconds. In addition, they tell the kernel to flush a " +"dirty buffer after 3 seconds rather than 30, the default. By flushing " +"recently-modified data to disk more regularly, these write storms can be " +"avoided. It's slightly less efficient to do things this way, since the " +"kernel will have fewer opportunities to combine writes. But for a busy " +"server, writes will happen more consistently, and interactive performance " +"will be greatly improved." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):377 +msgid "Conclusion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(p):381 +msgid "" +"We've now concluded our coverage of ext3. Join me in my next article as we " +"explore the many wonders of... XFS!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(title):391 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(li):410 +msgid "" +"Visit Andrew Morton's <uri link=\"http://www.zip.com.au/~akpm/linux/ext3/" +"ext3-usage.html\">ext3 and 2.4 usage page</uri> to complete your ext3 setup." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(li):415 +msgid "" +"Find out more about using ext3 with 2.4 kernels at Andrew Morton's <uri link=" +"\"http://www.zip.com.au/~akpm/linux/ext3/\">ext3 for 2.4</uri> page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(li):419 +msgid "" +"Learn more about the strange laptop hard drive corruption problems by " +"reading <uri link=\"http://www.kerneltraffic.org/kernel-traffic/" +"kt20011015_137.html\"> Kernel Traffic's summary</uri>." +msgstr "" + +#. <li> +#. Read a <uri link="http://olstrans.sourceforge.net/release +#. /OLS2000-ext3/OLS2000-ext3.html">complete transcript</uri> of Dr. Stephen +#. Tweedie's Ext3, Journaling Filesystem presentation, which was featured at +#. the <uri link="http://www.ottawalinuxsymposium.org">Ottawa Linux +#. Symposium</uri> in July 2000. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(li):436 +msgid "" +"To keep abreast of the latest ext3 developments, be sure to visit the <uri " +"link=\"https://listman.redhat.com/pipermail/ext3-users/\">ext3-users mailing " +"list archive</uri>. Of course, you can also <uri link=\"https://listman." +"redhat.com/mailman/listinfo/ext3-users\"> subscribe</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-afig-p8.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-awk1.xml.po b/article/gettext/ru/l-awk1.xml.po new file mode 100644 index 0000000..a45d6e0 --- /dev/null +++ b/article/gettext/ru/l-awk1.xml.po @@ -0,0 +1,606 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(guide:link):5 +msgid "/doc/en/articles/l-awk1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):6 +msgid "Awk by example, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(abstract):12 +msgid "" +"Awk is a very nice language with a very strange name. In this first article " +"of a three-part series, Daniel Robbins will quickly get your awk programming " +"skills up to speed. As the series progresses, more advanced topics will be " +"covered, culminating with an advanced real-world awk application demo." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(version):24 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(date):25 +msgid "2008-01-08" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):28 +msgid "An intro to the great language with the strange name" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):30 +msgid "In defense of awk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):33 +msgid "" +"In this series of articles, I'm going to turn you into a proficient awk " +"coder. I'll admit, awk doesn't have a very pretty or particularly \"hip\" " +"name, and the GNU version of awk, called gawk, sounds downright weird. Those " +"unfamiliar with the language may hear \"awk\" and think of a mess of code so " +"backwards and antiquated that it's capable of driving even the most " +"knowledgeable UNIX guru to the brink of insanity (causing him to repeatedly " +"yelp \"kill -9!\" as he runs for coffee machine)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):43 +msgid "" +"Sure, awk doesn't have a great name. But it is a great language. Awk is " +"geared toward text processing and report generation, yet features many well-" +"designed features that allow for serious programming. And, unlike some " +"languages, awk's syntax is familiar, and borrows some of the best parts of " +"languages like C, python, and bash (although, technically, awk was created " +"before both python and bash). Awk is one of those languages that, once " +"learned, will become a key part of your strategic coding arsenal." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):56 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):59 +msgid "The first awk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):59 +#, no-wrap +msgid "" +"\n" +"$ <i>awk '{ print }' /etc/passwd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):63 +msgid "" +"You should see the contents of your <path>/etc/passwd</path> file appear " +"before your eyes. Now, for an explanation of what awk did. When we called " +"awk, we specified <path>/etc/passwd</path> as our input file. When we " +"executed awk, it evaluated the print command for each line in <path>/etc/" +"passwd</path>, in order. All output is sent to stdout, and we get a result " +"identical to <c>cat</c>ting <path>/etc/passwd</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):72 +msgid "" +"Now, for an explanation of the { print } code block. In awk, curly braces " +"are used to group blocks of code together, similar to C. Inside our block of " +"code, we have a single print command. In awk, when a print command appears " +"by itself, the full contents of the current line are printed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):79 +msgid "Printing the current line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):79 +#, no-wrap +msgid "" +"\n" +"$ <i>awk '{ print $0 }' /etc/passwd</i>\n" +"$ <i>awk '{ print \"\" }' /etc/passwd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):84 +msgid "" +"In awk, the $0 variable represents the entire current line, so print and " +"print $0 do exactly the same thing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):89 +msgid "Filling the screen with some text" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):89 +#, no-wrap +msgid "" +"\n" +"$ <i>awk '{ print \"hiya\" }' /etc/passwd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):96 +msgid "Multiple fields" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):99 +msgid "print $1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):99 +#, no-wrap +msgid "" +"\n" +"$ <i>awk -F\":\" '{ print $1 $3 }' /etc/passwd</i>\n" +"halt7\n" +"operator11\n" +"root0\n" +"shutdown6\n" +"sync5\n" +"bin1\n" +"<comment>....etc.</comment>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):110 +msgid "print $1 $3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):110 +#, no-wrap +msgid "" +"\n" +"$ <i>awk -F\":\" '{ print $1 \" \" $3 }' /etc/passwd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):114 +msgid "$1$3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):114 +#, no-wrap +msgid "" +"\n" +"$ <i>awk -F\":\" '{ print \"username: \" $1 \"\\t\\tuid:\" $3 }' /etc/passwd</i>\n" +"username: halt uid:7\n" +"username: operator uid:11\n" +"username: root uid:0\n" +"username: shutdown uid:6\n" +"username: sync uid:5\n" +"username: bin uid:1\n" +"<comment>....etc.</comment>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):128 +msgid "External scripts" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):131 +msgid "Sample script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):131 +#, no-wrap +msgid "" +"\n" +"BEGIN { FS=\":\" }\n" +"{ print $1 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):136 +msgid "" +"The difference between these two methods has to do with how we set the field " +"separator. In this script, the field separator is specified within the code " +"itself (by setting the FS variable), while our previous example set FS by " +"passing the -F\":\" option to awk on the command line. It's generally best " +"to set the field separator inside the script itself, simply because it means " +"you have one less command line argument to remember to type. We'll cover the " +"FS variable in more detail later in this article." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):149 +msgid "The BEGIN and END blocks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):152 +msgid "" +"Normally, awk executes each block of your script's code once for each input " +"line. However, there are many programming situations where you may need to " +"execute initialization code before awk begins processing the text from the " +"input file. For such situations, awk allows you to define a BEGIN block. We " +"used a BEGIN block in the previous example. Because the BEGIN block is " +"evaluated before awk starts processing the input file, it's an excellent " +"place to initialize the FS (field separator) variable, print a heading, or " +"initialize other global variables that you'll reference later in the program." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):163 +msgid "" +"Awk also provides another special block, called the END block. Awk executes " +"this block after all lines in the input file have been processed. Typically, " +"the END block is used to perform final calculations or print summaries that " +"should appear at the end of the output stream." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):173 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):176 +msgid "Regular expressions and blocks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):176 +#, no-wrap +msgid "" +"\n" +"/foo/ { print }\n" +"/[0-9]+\\.[0-9]*/ { print }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):184 +msgid "Expressions and blocks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):187 +msgid "fredprint" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):187 +#, no-wrap +msgid "" +"\n" +"$1 == \"fred\" { print $3 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):191 +msgid "root" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):191 +#, no-wrap +msgid "" +"\n" +"$5 ~ /root/ { print $3 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):198 +msgid "Conditional statements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):201 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):233 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):237 +msgid "if" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):201 +#, no-wrap +msgid "" +"\n" +"{ \n" +" if ( $5 ~ /root/ ) { \n" +" print $3 \n" +" }\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):209 +msgid "" +"Both scripts function identically. In the first example, the boolean " +"expression is placed outside the block, while in the second example, the " +"block is executed for every input line, and we selectively perform the print " +"command by using an if statement. Both methods are available, and you can " +"choose the one that best meshes with the other parts of your script." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):217 +msgid "if if" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):217 +#, no-wrap +msgid "" +"\n" +"{\n" +" if ( $1 == \"foo\" ) {\n" +" if ( $2 == \"foo\" ) {\n" +" print \"uno\"\n" +" } else {\n" +" print \"one\"\n" +" }\n" +" } else if ($1 == \"bar\" ) {\n" +" print \"two\"\n" +" } else {\n" +" print \"three\"\n" +" }\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):233 +#, no-wrap +msgid "" +"\n" +"! /matchme/ { print $1 $3 $4 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):237 +#, no-wrap +msgid "" +"\n" +"{\n" +" if ( $0 !~ /matchme/ ) {\n" +" print $1 $3 $4\n" +" }\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):245 +msgid "" +"Both scripts will output only those lines that don't contain a matchme " +"character sequence. Again, you can choose the method that works best for " +"your code. They both do the same thing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):251 +msgid "Printing the fields equal to foo and bar" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):251 +#, no-wrap +msgid "" +"\n" +"( $1 == \"foo\" ) && ( $2 == \"bar\" ) { print } \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):255 +msgid "" +"This example will print only those lines where field one equals foo and " +"field two equals bar." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):263 +msgid "Numeric variables!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):266 +msgid "" +"In the BEGIN block, we initialize our integer variable x to zero. Then, each " +"time awk encounters a blank line, awk will execute the x=x+1 statement, " +"incrementing x. After all the lines have been processed, the END block will " +"execute, and awk will print out a final summary, specifying the number of " +"blank lines it found." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):277 +msgid "Stringy variables" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):280 +msgid "Sample field" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):280 +#, no-wrap +msgid "" +"\n" +"2.01\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):284 +msgid "1.01x$( )1.01" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):284 +#, no-wrap +msgid "" +"\n" +"{ print ($1^2)+1 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):288 +msgid "" +"If you do a little experimenting, you'll find that if a particular variable " +"doesn't contain a valid number, awk will treat that variable as a numerical " +"zero when it evaluates your mathematical expression." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):297 +msgid "Lots of operators" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):300 +msgid "" +"Another nice thing about awk is its full complement of mathematical " +"operators. In addition to standard addition, subtraction, multiplication, " +"and division, awk allows us to use the previously demonstrated exponent " +"operator \"^\", the modulo (remainder) operator \"%\", and a bunch of other " +"handy assignment operators borrowed from C." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):308 +msgid "" +"These include pre- and post-increment/decrement ( i++, --foo ), add/sub/mult/" +"div assign operators ( a+=3, b*=2, c/=2.2, d-=6.2 ). But that's not all -- " +"we also get handy modulo/exponent assign ops as well ( a^=2, b%=4 )." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):317 +msgid "Field separators" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):320 +msgid "" +"Awk has its own complement of special variables. Some of them allow you to " +"fine-tune how awk functions, while others can be read to glean valuable " +"information about the input. We've already touched on one of these special " +"variables, FS. As mentioned earlier, this variable allows you to set the " +"character sequence that awk expects to find between fields. When we were " +"using <path>/etc/passwd</path> as input, FS was set to \":\". While this did " +"the trick, FS allows us even more flexibility." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):330 +msgid "Another field separator" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):330 +#, no-wrap +msgid "" +"\n" +"FS=\"\\t+\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):334 +msgid "" +"Above, we use the special \"+\" regular expression character, which means " +"\"one or more of the previous character\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):339 +msgid "Setting FS to space" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):339 +#, no-wrap +msgid "" +"\n" +"FS=\"[[:space:]+]\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):343 +msgid "" +"While this assignment will do the trick, it's not necessary. Why? Because by " +"default, FS is set to a single space character, which awk interprets to mean " +"\"one or more spaces or tabs.\" In this particular example, the default FS " +"setting was exactly what you wanted in the first place!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):350 +msgid "Field separator sample" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):350 +#, no-wrap +msgid "" +"\n" +"FS=\"foo[0-9][0-9][0-9]\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):357 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):360 +msgid "Number of fields" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):360 +#, no-wrap +msgid "" +"\n" +"{\n" +" if ( NF > 2 ) {\n" +" print $1 \" \" $2 \":\" $3 \n" +" }\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):371 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre:caption):374 +msgid "Record number" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(pre):374 +#, no-wrap +msgid "" +"\n" +"{\n" +" <comment>#skip header</comment>\n" +" if ( NR > 10 ) {\n" +" print \"ok, now for the real information!\"\n" +" }\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):383 +msgid "" +"Awk provides additional variables that can be used for a variety of " +"purposes. We'll cover more of these variables in later articles." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(p):388 +msgid "" +"We've come to the end of our initial exploration of awk. As the series " +"continues, I'll demonstrate more advanced awk functionality, and we'll end " +"the series with a real-world awk application. In the meantime, if you're " +"eager to learn more, check out the resources listed below." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):400 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(title):402 +msgid "Useful links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(li):406 +msgid "" +"Read Daniel's other awk articles on developerWorks: Common threads: Awk by " +"example, <uri link=\"l-awk2.xml\">Part 2</uri> and <uri link=\"l-awk3.xml" +"\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(li):411 +msgid "" +"If you'd like a good old-fashioned book, O'Reilly's <uri link=\"http://www." +"oreilly.com/catalog/sed2/\">sed & awk, 2nd Edition</uri> is a wonderful " +"choice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(li):416 +msgid "" +"Be sure to check out the <uri link=\"http://www.faqs.org/faqs/computer-lang/" +"awk/faq/\">comp.lang.awk FAQ</uri>. It also contains lots of additional awk " +"links." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(li):422 +msgid "" +"Patrick Hartigan's <uri link=\"http://sparky.rice.edu/~hartigan/awk.html" +"\">awk tutorial</uri> is packed with handy awk scripts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(li):426 +msgid "" +"<uri link=\"http://www.tasoft.com/tawk.html\">Thompson's TAWK Compiler</uri> " +"compiles awk scripts into fast binary executables. Versions are available " +"for Windows, OS/2, DOS, and UNIX." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(li):431 +msgid "" +"<uri link=\"http://www.gnu.org/software/gawk/manual/gawk.html\">The GNU Awk " +"User's Guide</uri> is available for online reference." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-awk2.xml.po b/article/gettext/ru/l-awk2.xml.po new file mode 100644 index 0000000..46ef024 --- /dev/null +++ b/article/gettext/ru/l-awk2.xml.po @@ -0,0 +1,876 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(guide:link):5 +msgid "/doc/en/articles/l-awk2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):6 +msgid "Awk by example, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(abstract):12 +msgid "" +"In this sequel to his previous intro to awk, Daniel Robbins continues to " +"explore awk, a great language with a strange name. Daniel will show you how " +"to handle multi-line records, use looping constructs, and create and use awk " +"arrays. By the end of this article, you'll be well versed in a wide range of " +"awk features, and you'll be ready to write your own powerful awk scripts." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(version):25 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(date):26 +msgid "2005-10-31" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):29 +msgid "Records, loops, and arrays" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):31 +msgid "Multi-line records" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):34 +msgid "" +"Awk is an excellent tool for reading in and processing structured data, such " +"as the system's <path>/etc/passwd</path> file. <path>/etc/passwd</path> is " +"the UNIX user database, and is a colon-delimited text file, containing a lot " +"of important information, including all existing user accounts and user IDs, " +"among other things. In <uri link=\"/doc/en/articles/l-awk1.xml\">my previous " +"article</uri>, I showed you how awk could easily parse this file. All we had " +"to do was to set the FS (field separator) variable to \":\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):44 +msgid "" +"By setting the FS variable correctly, awk can be configured to parse almost " +"any kind of structured data, as long as there is one record per line. " +"However, just setting FS won't do us any good if we want to parse a record " +"that exists over multiple lines. In these situations, we also need to modify " +"the RS record separator variable. The RS variable tells awk when the current " +"record ends and a new record begins." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):53 +msgid "" +"As an example, let's look at how we'd handle the task of processing an " +"address list of Federal Witness Protection Program participants:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):58 +msgid "Sample entry from Federal Witness Protection Program participants list" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):58 +#, no-wrap +msgid "" +"\n" +"Jimmy the Weasel\n" +"100 Pleasant Drive\n" +"San Francisco, CA 12345\n" +"\n" +"Big Tony\n" +"200 Incognito Ave.\n" +"Suburbia, WA 67890\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):68 +msgid "" +"Ideally, we'd like awk to recognize each 3-line address as an individual " +"record, rather than as three separate records. It would make our code a lot " +"simpler if awk would recognize the first line of the address as the first " +"field ($1), the street address as the second field ($2), and the city, " +"state, and zip code as field $3. The following code will do just what we " +"want:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):76 +msgid "Making one field from the address" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):76 +#, no-wrap +msgid "" +"\n" +"BEGIN {\n" +" FS=\"\\n\"\n" +" RS=\"\"\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):83 +msgid "" +"Above, setting FS to \"\\n\" tells awk that each field appears on its own " +"line. By setting RS to \"\", we also tell awk that each address record is " +"separated by a blank line. Once awk knows how the input is formatted, it can " +"do all the parsing work for us, and the rest of the script is simple. Let's " +"look at a complete script that will parse this address list and print out " +"each address record on a single line, separating each field with a comma." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):92 +msgid "Complete script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):92 +#, no-wrap +msgid "" +"\n" +"BEGIN {\n" +" FS=\"\\n\"\n" +" RS=\"\"\n" +"}\n" +"{ print $1 \", \" $2 \", \" $3 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):101 +msgid "" +"If this script is saved as <path>address.awk</path>, and the address data is " +"stored in a file called <path>address.txt</path>, you can execute this " +"script by typing <c>awk -f address.awk address.txt</c>. This code produces " +"the following output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):108 +msgid "The script's output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):108 +#, no-wrap +msgid "" +"\n" +"Jimmy the Weasel, 100 Pleasant Drive, San Francisco, CA 12345\n" +"Big Tony, 200 Incognito Ave., Suburbia, WA 67890\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):116 +msgid "OFS and ORS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):119 +msgid "" +"In address.awk's print statement, you can see that awk concatenates (joins) " +"strings that are placed next to each other on a line. We used this feature " +"to insert a comma and a space (\", \") between the three address fields that " +"appeared on the line. While this method works, it's a bit ugly looking. " +"Rather than inserting literal \", \" strings between our fields, we can have " +"awk do it for us by setting a special awk variable called OFS. Take a look " +"at this code snippet." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):128 +msgid "Sample code snippet" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):128 +#, no-wrap +msgid "" +"\n" +"print \"Hello\", \"there\", \"Jim!\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):132 +msgid "" +"The commas on this line are not part of the actual literal strings. Instead, " +"they tell awk that \"Hello\", \"there\", and \"Jim!\" are separate fields, " +"and that the OFS variable should be printed between each string. By default, " +"awk produces the following output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):139 +msgid "Output produced by awk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):139 +#, no-wrap +msgid "" +"\n" +"Hello there Jim!\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):143 +msgid "" +"This shows us that by default, OFS is set to \" \", a single space. However, " +"we can easily redefine OFS so that awk will insert our favorite field " +"separator. Here's a revised version of our original <path>address.awk</path> " +"program that uses OFS to output those intermediate \", \" strings:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):150 +msgid "Redefining OFS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):150 +#, no-wrap +msgid "" +"\n" +"BEGIN {\n" +" FS=\"\\n\"\n" +" RS=\"\"\n" +" OFS=\", \"\n" +"}\n" +"{ print $1, $2, $3 }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):159 +msgid "" +"Awk also has a special variable called ORS, called the \"output record " +"separator\". By setting ORS, which defaults to a newline (\"\\n\"), we can " +"control the character that's automatically printed at the end of a print " +"statement. The default ORS value causes awk to output each new print " +"statement on a new line. If we wanted to make the output double-spaced, we " +"would set ORS to \"\\n\\n\". Or, if we wanted records to be separated by a " +"single space (and no newline), we would set ORS to \" \"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):172 +msgid "Multi-line to tabbed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):175 +msgid "" +"Let's say that we wrote a script that converted our address list to a single-" +"line per record, tab-delimited format for import into a spreadsheet. After " +"using a slightly modified version of <path>address.awk</path>, it would " +"become clear that our program only works for three-line addresses. If awk " +"encountered the following address, the fourth line would be thrown away and " +"not printed:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):184 +msgid "Sample entry" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):184 +#, no-wrap +msgid "" +"\n" +"Cousin Vinnie\n" +"Vinnie's Auto Shop\n" +"300 City Alley\n" +"Sosueme, OR 76543\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):191 +msgid "" +"To handle situations like this, it would be good if our code took the number " +"of records per field into account, printing each one in order. Right now, " +"the code only prints the first three fields of the address. Here's some code " +"that does what we want:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):198 +msgid "Improved code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):198 +#, no-wrap +msgid "" +"\n" +"BEGIN { \n" +" FS=\"\\n\" \n" +" RS=\"\" \n" +" ORS=\"\" \n" +"} \n" +" \n" +"{ \n" +" x=1 \n" +" while ( x<NF ) { \n" +" print $x \"\\t\" \n" +" x++ \n" +" } \n" +" print $NF \"\\n\" \n" +"} \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):215 +msgid "" +"First, we set the field separator FS to \"\\n\" and the record separator RS " +"to \"\" so that awk parses the multi-line addresses correctly, as before. " +"Then, we set the output record separator ORS to \"\", which will cause the " +"print statement to not output a newline at the end of each call. This means " +"that if we want any text to start on a new line, we need to explicitly write " +"print \"\\n\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):223 +msgid "" +"In the main code block, we create a variable called x that holds the number " +"of current field that we're processing. Initially, it's set to 1. Then, we " +"use a while loop (an awk looping construct identical to that found in the C " +"language) to iterate through all but the last record, printing the record " +"and a tab character. Finally, we print the last record and a literal " +"newline; again, since ORS is set to \"\", print won't output newlines for " +"us. Program output looks like this, which is exactly what we wanted:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):233 +msgid "" +"Our intended output. Not pretty, but tab delimited for easy import into a " +"spreadsheet" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):233 +#, no-wrap +msgid "" +"\n" +"Jimmy the Weasel 100 Pleasant Drive San Francisco, CA 12345 \n" +"Big Tony 200 Incognito Ave. Suburbia, WA 67890\n" +"Cousin Vinnie Vinnie's Auto Shop 300 City Alley Sosueme, OR 76543\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):242 +msgid "Looping constructs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):245 +msgid "" +"We've already seen awk's while loop construct, which is identical to its C " +"counterpart. Awk also has a \"do...while\" loop that evaluates the condition " +"at the end of the code block, rather than at the beginning like a standard " +"while loop. It's similar to \"repeat...until\" loops that can be found in " +"other languages. Here's an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):253 +msgid "do...while example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):253 +#, no-wrap +msgid "" +"\n" +"{\n" +" count=1\n" +" do {\n" +" print \"I get printed at least once no matter what\" \n" +" } while ( count != 1 )\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):262 +msgid "" +"Because the condition is evaluated after the code block, a \"do...while\" " +"loop, unlike a normal while loop, will always execute at least once. On the " +"other hand, a normal while loop will never execute if its condition is false " +"when the loop is first encountered." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):272 +msgid "for loops" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):275 +msgid "" +"Awk allows you to create for loops, which like while loops are identical to " +"their C counterpart:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):280 +msgid "Example loop" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):280 +#, no-wrap +msgid "" +"\n" +"for ( initial assignment; comparison; increment ) {\n" +" code block\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):286 +msgid "Here's a quick example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):290 +msgid "Quick example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):290 +#, no-wrap +msgid "" +"\n" +"for ( x = 1; x <= 4; x++ ) {\n" +" print \"iteration\",x\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):296 +msgid "This snippet will print:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):300 +msgid "Output of the above snippet" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):300 +#, no-wrap +msgid "" +"\n" +"iteration 1\n" +"iteration 2\n" +"iteration 3\n" +"iteration 4\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):310 +msgid "Break and continue" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):313 +msgid "" +"Again, just like C, awk provides break and continue statements. These " +"statements provide better control over awk's various looping constructs. " +"Here's a code snippet that desperately needs a break statement:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):319 +msgid "Code snippet needing a break statement" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):319 +#, no-wrap +msgid "" +"\n" +"while (1) {\n" +" print \"forever and ever...\"\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):325 +msgid "" +"Because 1 is always true, this while loop runs forever. Here's a loop that " +"only executes ten times:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):330 +msgid "Loop that executes only 10 times" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):330 +#, no-wrap +msgid "" +"\n" +"x=1\n" +"while(1) {\n" +" print \"iteration\",x\n" +" if ( x == 10 ) {\n" +" break\n" +" }\n" +" x++\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):341 +msgid "" +"Here, the break statement is used to \"break out\" of the innermost loop. " +"\"break\" causes the loop to immediately terminate and execution to continue " +"at the line after the loop's code block." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):347 +msgid "The continue statement complements break, and works like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):351 +msgid "The continues statement complementing break" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):351 +#, no-wrap +msgid "" +"\n" +"x=1\n" +"while (1) {\n" +" if ( x == 4 ) {\n" +" x++\n" +" continue\n" +" }\n" +" print \"iteration\",x\n" +" if ( x > 20 ) {\n" +" break\n" +" }\n" +" x++\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):366 +msgid "" +"This code will print \"iteration 1\" through \"iteration 21\", except for " +"\"iteration 4\". If iteration equals 4, x is incremented and the continue " +"statement is called, which immediately causes awk to start to the next loop " +"iteration without executing the rest of the code block. The continue " +"statement works for every kind of awk iterative loop, just as break does. " +"When used in the body of a for loop, continue will cause the loop control " +"variable to be automatically incremented. Here's an equivalent for loop:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):376 +msgid "Equivalent for loop" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):376 +#, no-wrap +msgid "" +"\n" +"for ( x=1; x<=21; x++ ) {\n" +" if ( x == 4 ) {\n" +" continue\n" +" }\n" +" print \"iteration\",x\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):385 +msgid "" +"It wasn't necessary to increment x just before calling continue as it was in " +"our while loop, since the for loop increments x automatically." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):393 +msgid "Arrays" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):396 +msgid "" +"You'll be pleased to know that awk has arrays. However, under awk, it's " +"customary to start array indices at 1, rather than 0:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):401 +msgid "Sample awk arrays" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):401 +#, no-wrap +msgid "" +"\n" +"myarray[1]=\"jim\"\n" +"myarray[2]=456\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):406 +msgid "" +"When awk encounters the first assignment, myarray is created and the element " +"myarray[1] is set to \"jim\". After the second assignment is evaluated, the " +"array has two elements." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):412 +msgid "" +"Once defined, awk has a handy mechanism to iterate over the elements of an " +"array, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):417 +msgid "Iterating over arrays" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):417 +#, no-wrap +msgid "" +"\n" +"for ( x in myarray ) {\n" +" print myarray[x]\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):423 +msgid "" +"This code will print out every element in the array myarray. When you use " +"this special \"in\" form of a for loop, awk will assign every existing index " +"of myarray to x (the loop control variable) in turn, executing the loop's " +"code block once after each assignment. While this is a very handy awk " +"feature, it does have one drawback -- when awk cycles through the array " +"indices, it doesn't follow any particular order. That means that there's no " +"way for us to know whether the output of above code will be:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):433 +msgid "Output of above code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):433 +#, no-wrap +msgid "" +"\n" +"jim\n" +"456\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):438 +msgid "or" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):442 +msgid "Other output of above code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):442 +#, no-wrap +msgid "" +"\n" +"456\n" +"jim\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):447 +msgid "" +"To loosely paraphrase Forrest Gump, iterating over the contents of an array " +"is like a box of chocolates -- you never know what you're going to get. This " +"has something to do with the \"stringiness\" of awk arrays, which we'll now " +"take a look at." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):457 +msgid "Array index stringiness" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):460 +msgid "" +"<uri link=\"/doc/en/articles/l-awk1.xml\">In my previous article</uri>, I " +"showed you that awk actually stores numeric values in a string format. While " +"awk performs the necessary conversions to make this work, it does open the " +"door for some odd-looking code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):467 +msgid "Odd looking code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):467 +#, no-wrap +msgid "" +"\n" +"a=\"1\"\n" +"b=\"2\"\n" +"c=a+b+3\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):473 +msgid "" +"After this code executes, c is equal to 6. Since awk is \"stringy\", adding " +"strings \"1\" and \"2\" is functionally no different than adding the numbers " +"1 and 2. In both cases, awk will successfully perform the math. Awk's " +"\"stringy\" nature is pretty intriguing -- you may wonder what happens if we " +"use string indexes for arrays. For instance, take the following code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):481 +msgid "Sample code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):481 +#, no-wrap +msgid "" +"\n" +"myarr[\"1\"]=\"Mr. Whipple\"\n" +"print myarr[\"1\"]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):486 +msgid "" +"As you might expect, this code will print \"Mr. Whipple\". But how about if " +"we drop the quotes around the second \"1\" index?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):491 +msgid "Dropping the qoutes code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):491 +#, no-wrap +msgid "" +"\n" +"myarr[\"1\"]=\"Mr. Whipple\"\n" +"print myarr[1]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):497 +msgid "" +"Guessing the result of this code snippet is a bit more difficult. Does awk " +"consider myarr[\"1\"] and myarr[1] to be two separate elements of the array, " +"or do they refer to the same element? The answer is that they refer to the " +"same element, and awk will print \"Mr. Whipple\", just as in the first code " +"snippet. Although it may seem strange, behind the scenes awk has been using " +"string indexes for its arrays all this time!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):506 +msgid "" +"After learning this strange fact, some of us may be tempted to execute some " +"wacky code that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):511 +msgid "Wacky code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):511 +#, no-wrap +msgid "" +"\n" +"myarr[\"name\"]=\"Mr. Whipple\"\n" +"print myarr[\"name\"]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):516 +msgid "" +"Not only does this code not raise an error, but it's functionally identical " +"to our previous examples, and will print \"Mr. Whipple\" just as before! As " +"you can see, awk doesn't limit us to using pure integer indexes; we can use " +"string indexes if we want to, without creating any problems. Whenever we use " +"non-integer array indices like myarr[\"name\"], we're using associative " +"arrays. Technically, awk isn't doing anything different behind the scenes " +"than when we use a string index (since even if you use an \"integer\" index, " +"awk still treats it as a string). However, you should still call 'em " +"associative arrays -- it sounds cool and will impress your boss. The stringy " +"index thing will be our little secret. ;)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):532 +msgid "Array tools" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):535 +msgid "" +"When it comes to arrays, awk gives us a lot of flexibility. We can use " +"string indexes, and we aren't required to have a continuous numeric sequence " +"of indices (for example, we can define myarr[1] and myarr[1000], but leave " +"all other elements undefined). While all this can be very helpful, in some " +"circumstances it can create confusion. Fortunately, awk offers a couple of " +"handy features to help make arrays more manageable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):544 +msgid "" +"First, we can delete array elements. If you want to delete element 1 of your " +"array fooarray, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):549 +msgid "Deleting array elements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):549 +#, no-wrap +msgid "" +"\n" +"delete fooarray[1]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):553 +msgid "" +"And, if you want to see if a particular array element exists, you can use " +"the special \"in\" boolean operator as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre:caption):558 +msgid "Checking if a particular array element exists" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(pre):558 +#, no-wrap +msgid "" +"\n" +"if ( 1 in fooarray ) {\n" +" print \"Ayep! It's there.\"\n" +"} else {\n" +" print \"Nope! Can't find it.\"\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):569 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(p):572 +msgid "" +"We've covered a lot of ground in this article. Next time, I'll round out " +"your awk knowledge by showing you how to use awk's math and string functions " +"and how to create your own functions. I'll also walk you through the " +"creation of a checkbook balancing program. Until then, I encourage you to " +"write some of your own awk programs, and to check out the following " +"resources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(title):585 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(li):590 +msgid "" +"Read Daniel's other awk articles on developerWorks: Common threads: Awk by " +"example, <uri link=\"l-awk1.xml\">Part 1</uri> and <uri link=\"l-awk3.xml" +"\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(li):595 +msgid "" +"If you'd like a good old-fashioned book, O'Reilly's <uri link=\"http://www." +"oreilly.com/catalog/sed2/\">sed & awk, 2nd Edition</uri> is a wonderful " +"choice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(li):600 +msgid "" +"Be sure to check out the <uri link=\"http://www.faqs.org/faqs/computer-lang/" +"awk/faq/\">comp.lang.awk FAQ</uri>. It also contains lots of additional awk " +"links." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(li):605 +msgid "" +"Patrick Hartigan's <uri link=\"http://sparky.rice.edu/~hartigan/awk.html" +"\">awk tutorial</uri> is packed with handy awk scripts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(li):609 +msgid "" +"<uri link=\"http://www.tasoft.com/tawk.html\">Thompson's TAWK Compiler</uri> " +"compiles awk scripts into fast binary executables. Versions are available " +"for Windows, OS/2, DOS, and UNIX." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(li):614 +msgid "" +"<uri link=\"http://www.gnu.org/software/gawk/manual/gawk.html\">The GNU Awk " +"User's Guide</uri> is available for online reference." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-awk3.xml.po b/article/gettext/ru/l-awk3.xml.po new file mode 100644 index 0000000..2db90b5 --- /dev/null +++ b/article/gettext/ru/l-awk3.xml.po @@ -0,0 +1,968 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(guide:link):5 +msgid "/doc/en/articles/l-awk3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):6 +msgid "Awk by example, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(abstract):12 +msgid "" +"In this conclusion to the awk series, Daniel introduces you to awk's " +"important string functions, and then shows you how to write a complete " +"checkbook-balancing program from scratch. Along the way, you'll learn how to " +"write your own functions and use awk's multidimensional arrays. By the end " +"of this article, you'll have even more awk experience, allowing you to " +"create more powerful scripts." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(version):26 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(date):27 +msgid "2005-10-31" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):30 +msgid "String functions and ... checkbooks?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):32 +msgid "Formatting output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):35 +msgid "" +"While awk's print statement does do the job most of the time, sometimes more " +"is needed. For those times, awk offers two good old friends called printf() " +"and sprintf(). Yes, these functions, like so many other awk parts, are " +"identical to their C counterparts. printf() will print a formatted string to " +"stdout, while sprintf() returns a formatted string that can be assigned to a " +"variable. If you're not familiar with printf() and sprintf(), an " +"introductory C text will quickly get you up to speed on these two essential " +"printing functions. You can view the printf() man page by typing \"man 3 " +"printf\" on your Linux system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):46 +msgid "" +"Here's some sample awk sprintf() and printf() code. As you can see, " +"everything looks almost identical to C." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):51 +msgid "Sample awk sprintf() and printf() code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):51 +#, no-wrap +msgid "" +"\n" +"x=1\n" +"b=\"foo\"\n" +"printf(\"%s got a %d on the last test\\n\",\"Jim\",83)\n" +"myout=(\"%s-%d\",b,x)\n" +"print myout\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):59 +msgid "This code will print:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):63 +msgid "Code output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):63 +#, no-wrap +msgid "" +"\n" +"Jim got a 83 on the last test\n" +"foo-1\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):71 +msgid "String functions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):74 +msgid "" +"Awk has a plethora of string functions, and that's a good thing. In awk, you " +"really need string functions, since you can't treat a string as an array of " +"characters as you can in other languages like C, C++, and Python. For " +"example, if you execute the following code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):81 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):287 +msgid "Example code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):81 +#, no-wrap +msgid "" +"\n" +"mystring=\"How are you doing today?\"\n" +"print mystring[3]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):86 +msgid "You'll receive an error that looks something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):90 +msgid "Example code error" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):90 +#, no-wrap +msgid "" +"\n" +"awk: string.gawk:59: fatal: attempt to use scalar as array\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):94 +msgid "" +"Oh, well. While not as convenient as Python's sequence types, awk's string " +"functions get the job done. Let's take a look at them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):99 +msgid "" +"First, we have the basic length() function, which returns the length of a " +"string. Here's how to use it:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):104 +msgid "length() function example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):104 +#, no-wrap +msgid "" +"\n" +"print length(mystring)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):108 +msgid "This code will print the value:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):112 +msgid "Printed value" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):112 +#, no-wrap +msgid "" +"\n" +"24\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):116 +msgid "" +"OK, let's keep going. The next string function is called index, and will " +"return the position of the occurrence of a substring in another string, or " +"it will return 0 if the string isn't found. Using mystring, we can call it " +"this way:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):122 +msgid "index() funtion example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):122 +#, no-wrap +msgid "" +"\n" +"print index(mystring,\"you\")\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):126 +msgid "Awk prints:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):130 +msgid "Function output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):130 +#, no-wrap +msgid "" +"\n" +"9\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):134 +msgid "" +"We move on to two more easy functions, tolower() and toupper(). As you might " +"guess, these functions will return the string with all characters converted " +"to lowercase or uppercase respectively. Notice that tolower() and toupper() " +"return the new string, and don't modify the original. This code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):141 +msgid "Converting strings to lower or uppercase" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):141 +#, no-wrap +msgid "" +"\n" +"print tolower(mystring)\n" +"print toupper(mystring)\n" +"print mystring\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):147 +msgid "....will produce this output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):151 +msgid "Output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):151 +#, no-wrap +msgid "" +"\n" +"how are you doing today?\n" +"HOW ARE YOU DOING TODAY?\n" +"How are you doing today?\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):157 +msgid "" +"So far so good, but how exactly do we select a substring or even a single " +"character from a string? That's where substr() comes in. Here's how to call " +"substr():" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):163 +msgid "substr() function example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):163 +#, no-wrap +msgid "" +"\n" +"mysub=substr(mystring,startpos,maxlen)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):167 +msgid "" +"mystring should be either a string variable or a literal string from which " +"you'd like to extract a substring. startpos should be set to the starting " +"character position, and maxlen should contain the maximum length of the " +"string you'd like to extract. Notice that I said maximum length; if length" +"(mystring) is shorter than startpos+maxlen, your result will be truncated. " +"substr() won't modify the original string, but returns the substring " +"instead. Here's an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):176 +msgid "Another example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):176 +#, no-wrap +msgid "" +"\n" +"print substr(mystring,9,3)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):180 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):211 +msgid "Awk will print:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):184 +msgid "What awk prints" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):184 +#, no-wrap +msgid "" +"\n" +"you\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):188 +msgid "" +"If you regularly program in a language that uses array indices to access " +"parts of a string (and who doesn't), make a mental note that substr() is " +"your awk substitute. You'll need to use it to extract single characters and " +"substrings; because awk is a string-based language, you'll be using it often." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):195 +msgid "" +"Now, we move on to some meatier functions, the first of which is called match" +"(). match() is a lot like index(), except instead of searching for a " +"substring like index() does, it searches for a regular expression. The match" +"() function will return the starting position of the match, or zero if no " +"match is found. In addition, match() will set two variables called RSTART " +"and RLENGTH. RSTART contains the return value (the location of the first " +"match), and RLENGTH specifies its span in characters (or -1 if no match was " +"found). Using RSTART, RLENGTH, substr(), and a small loop, you can easily " +"iterate through every match in your string. Here's an example match() call:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):207 +msgid "Example match() call" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):207 +#, no-wrap +msgid "" +"\n" +"print match(mystring,/you/), RSTART, RLENGTH\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):215 +msgid "Above function output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):215 +#, no-wrap +msgid "" +"\n" +"9 9 3\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):222 +msgid "String substitution" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):225 +msgid "" +"Now, we're going to look at a couple of string substitution functions, sub() " +"and gsub(). These guys differ slightly from the functions we've looked at so " +"far in that they actually modify the original string. Here's a template that " +"shows how to call sub():" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):232 +msgid "sub() function template" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):232 +#, no-wrap +msgid "" +"\n" +"sub(regexp,replstring,mystring)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):236 +msgid "" +"When you call sub(), it'll find the first sequence of characters in mystring " +"that matches regexp, and it'll replace that sequence with replstring. sub() " +"and gsub() have identical arguments; the only way they differ is that sub() " +"will replace the first regexp match (if any), and gsub() will perform a " +"global replace, swapping out all matches in the string. Here's an example sub" +"() and gsub() call:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):245 +msgid "Sample both sub() and gsub() function call" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):245 +#, no-wrap +msgid "" +"\n" +"sub(/o/,\"O\",mystring)\n" +"print mystring\n" +"mystring=\"How are you doing today?\"\n" +"gsub(/o/,\"O\",mystring)\n" +"print mystring\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):253 +msgid "" +"We had to reset mystring to its original value because the first sub() call " +"modified mystring directly. When executed, this code will cause awk to " +"output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):258 +msgid "awk output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):258 +#, no-wrap +msgid "" +"\n" +"HOw are you doing today?\n" +"HOw are yOu dOing tOday?\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):263 +msgid "" +"Of course, more complex regular expressions are possible. I'll leave it up " +"to you to test out some complicated regexps." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):268 +msgid "" +"We wrap up our string function coverage by introducing you to a function " +"called split(). split()'s job is to \"chop up\" a string and place the " +"various parts into an integer-indexed array. Here's an example split() call:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):274 +msgid "Example split() call" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):274 +#, no-wrap +msgid "" +"\n" +"numelements=split(\"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec\",mymonths,\",\")\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):278 +msgid "" +"When calling split(), the first argument contains the literal string or " +"string variable to be chopped. In the second argument, you should specify " +"the name of the array that split() will stuff the chopped parts into. In the " +"third element, specify the separator that will be used to chop the strings " +"up. When split() returns, it'll return the number of string elements that " +"were split. split() assigns each one to an array index starting with one, so " +"the following code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):287 +#, no-wrap +msgid "" +"\n" +"print mymonths[1],mymonths[numelements]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):291 +msgid "....will print:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):295 +msgid "Example output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):295 +#, no-wrap +msgid "" +"\n" +"Jan Dec\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):302 +msgid "Special string forms" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):305 +msgid "" +"A quick note -- when calling length(), sub(), or gsub(), you can drop the " +"last argument and awk will apply the function call to $0 (the entire current " +"line). To print the length of each line in a file, use this awk script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):311 +msgid "Code printing the length of every line in a file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):311 +#, no-wrap +msgid "" +"\n" +"{\n" +" print length() \n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):320 +msgid "Financial fun" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):323 +msgid "" +"A few weeks ago, I decided to write my own checkbook balancing program in " +"awk. I decided that I'd like to have a simple tab-delimited text file into " +"which I can enter my most recent deposits and withdrawals. The idea was to " +"hand this data to an awk script that would automatically add up all the " +"amounts and tell me my balance. Here's how I decided to record all my " +"transactions into my \"ASCII checkbook\":" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):332 +msgid "ASCII checkbox to record transactions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):332 +#, no-wrap +msgid "" +"\n" +"\n" +"23 Aug 2000 food - - Y Jimmy's Buffet 30.25\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):337 +msgid "" +"Every field in this file is separated by one or more tabs. After the date " +"(field 1, $1), there are two fields called \"expense category\" and \"income " +"category\". When I'm entering an expense like on the above line, I put a " +"four-letter nickname in the exp field, and a \"-\" (blank entry) in the inc " +"field. This signifies that this particular item is a \"food expense\" :) " +"Here's what a deposit looks like:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):346 +msgid "Deposit sample entry" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):346 +#, no-wrap +msgid "" +"\n" +"\n" +"23 Aug 2000 - inco - Y Boss Man 2001.00\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):351 +msgid "" +"In this case, I put a \"-\" (blank) in the exp category, and put \"inco\" in " +"the inc category. \"inco\" is my nickname for generic (paycheck-style) " +"income. Using category nicknames allows me to generate a breakdown of my " +"income and expenditures by category. As far as the rest of the records, all " +"the other fields are fairly self-explanatory. The cleared? field (\"Y\" or " +"\"N\") records whether the transaction has been posted to my account; beyond " +"that, there's a transaction description, and a positive dollar amount." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):361 +msgid "" +"The algorithm used to compute the current balance isn't too hard. Awk simply " +"needs to read in each line, one by one. If an expense category is listed but " +"there is no income category (it's \"-\"), then this item is a debit. If an " +"income category is listed, but no expense category (\"-\") is there, then " +"the dollar amount is a credit. And, if there is both an expense and income " +"category listed, then this amount is a \"category transfer\"; that is, the " +"dollar amount will be subtracted from the expense category and added to the " +"income category. Again, all these categories are virtual, but are very " +"useful for tracking income and expenditures, as well as for budgeting." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):376 +msgid "The code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):379 +msgid "" +"Time to look at the code. We'll start off with the first line, the BEGIN " +"block and a function definition:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):384 +msgid "Balance, part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):384 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env awk -f\n" +"BEGIN {\n" +" FS=\"\\t+\"\n" +" months=\"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec\"\n" +"}\n" +"\n" +"function monthdigit(mymonth) {\n" +" return (index(months,mymonth)+3)/4\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):396 +msgid "" +"Adding the first \"#!...\" line to any awk script will allow it to be " +"directly executed from the shell, provided that you \"chmod +x myscript\" " +"first. The remaining lines define our BEGIN block, which gets executed " +"before awk starts processing our checkbook file. We set FS (the field " +"separator) to \"\\t+\", which tells awk that the fields will be separated by " +"one or more tabs. In addition, we define a string called months that's used " +"by our monthdigit() function, which appears next." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):406 +msgid "" +"The last three lines show you how to define your own awk function. The " +"format is simple -- type \"function\", then the function name, and then the " +"parameters separated by commas, inside parentheses. After this, a \"{ }\" " +"code block contains the code that you'd like this function to execute. All " +"functions can access global variables (like our months variable). In " +"addition, awk provides a \"return\" statement that allows the function to " +"return a value, and operates similarly to the \"return\" found in C, Python, " +"and other languages. This particular function converts a month name in a 3-" +"letter string format into its numeric equivalent. For example, this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):418 +msgid "monthdigit() sample call" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):418 +#, no-wrap +msgid "" +"\n" +"print monthdigit(\"Mar\")\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):422 +msgid "....will print this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):426 +msgid "monthdigit() sample output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):426 +#, no-wrap +msgid "" +"\n" +"3\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):430 +msgid "Now, let's move on to some more functions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):437 +msgid "Financial functions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):440 +msgid "" +"Here are three more functions that perform the bookkeeping for us. Our main " +"code block, which we'll see soon, will process each line of the checkbook " +"file sequentially, calling one of these functions so that the appropriate " +"transactions are recorded in an awk array. There are three basic kinds of " +"transactions, credit (doincome), debit (doexpense) and transfer " +"(dotransfer). You'll notice that all three functions accept one argument, " +"called mybalance. mybalance is a placeholder for a two-dimensional array, " +"which we'll pass in as an argument. Up until now, we haven't dealt with two-" +"dimensional arrays; however, as you can see below, the syntax is quite " +"simple. Just separate each dimension with a comma, and you're in business." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):453 +msgid "" +"We'll record information into \"mybalance\" as follows. The first dimension " +"of the array ranges from 0 to 12, and specifies the month, or zero for the " +"entire year. Our second dimension is a four-letter category, like \"food\" " +"or \"inco\"; this is the actual category we're dealing with. So, to find the " +"entire year's balance for the food category, you'd look in mybalance[0,\"food" +"\"]. To find June's income, you'd look in mybalance[6,\"inco\"]." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):462 +msgid "Finding out information about incomes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):462 +#, no-wrap +msgid "" +"\n" +" \n" +"function doincome(mybalance) {\n" +" mybalance[curmonth,$3] += amount\n" +" mybalance[0,$3] += amount \n" +"}\n" +"\n" +"function doexpense(mybalance) {\n" +" mybalance[curmonth,$2] -= amount\n" +" mybalance[0,$2] -= amount \n" +"}\n" +"\n" +"function dotransfer(mybalance) {\n" +" mybalance[0,$2] -= amount\n" +" mybalance[curmonth,$2] -= amount\n" +" mybalance[0,$3] += amount\n" +" mybalance[curmonth,$3] += amount\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):482 +msgid "" +"When doincome() or any of the other functions are called, we record the " +"transaction in two places -- mybalance[0,category] and mybalance[curmonth, " +"category], the entire year's category balance and the current month's " +"category balance, respectively. This allows us to easily generate either an " +"annual or monthly breakdown of income/expenditures later on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):490 +msgid "" +"If you look at these functions, you'll notice that the array referenced by " +"mybalance is passed in by reference. In addition, we also refer to several " +"global variables: curmonth, which holds the numeric value of the month of " +"the current record, $2 (the expense category), $3 (the income category), and " +"amount ($7, the dollar amount). When doincome() and friends are called, all " +"these variables have already been set correctly for the current record " +"(line) being processed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):503 +msgid "The main block" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):506 +msgid "" +"Here's the main code block that contains the code that parses each line of " +"input data. Remember, because we have set FS correctly, we can refer to the " +"first field as $1, the second field as $2, etc. When doincome() and friends " +"are called, the functions can access the current values of curmonth, $2, $3 " +"and amount from inside the function. Take a look at the code and meet me on " +"the other side for an explanation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):515 +msgid "Balance, part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):515 +#, no-wrap +msgid "" +"\n" +" \n" +"{\n" +" curmonth=monthdigit(substr($1,4,3))\n" +" amount=$7\n" +" \n" +" #record all the categories encountered\n" +" if ( $2 != \"-\" )\n" +" globcat[$2]=\"yes\"\n" +" if ( $3 != \"-\" )\n" +" globcat[$3]=\"yes\"\n" +"\n" +" #tally up the transaction properly\n" +" if ( $2 == \"-\" ) {\n" +" if ( $3 == \"-\" ) {\n" +" print \"Error: inc and exp fields are both blank!\"\n" +" exit 1\n" +" } else {\n" +" #this is income\n" +" doincome(balance)\n" +" if ( $5 == \"Y\" )\n" +" doincome(balance2)\n" +" }\n" +" } else if ( $3 == \"-\" ) {\n" +" #this is an expense \n" +" doexpense(balance)\n" +" if ( $5 == \"Y\" ) \n" +" doexpense(balance2)\n" +" } else {\n" +" #this is a transfer\n" +" dotransfer(balance)\n" +" if ( $5 == \"Y\" ) \n" +" dotransfer(balance2)\n" +" } \n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):552 +msgid "" +"In the main block, the first two lines set curmonth to an integer between 1 " +"and 12, and set amount to field 7 (to make the code easier to understand). " +"Then, we have four interesting lines, where we write values into an array " +"called globcat. globcat, or the global categories array, is used to record " +"all those categories encountered in the file -- \"inco\", \"misc\", \"food" +"\", \"util\", etc. For example, if $2 == \"inco\", we set globcat[\"inco\"] " +"to \"yes\". Later on, we can iterate through our list of categories with a " +"simple \"for (x in globcat)\" loop." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):562 +msgid "" +"On the next twenty or so lines, we analyze fields $2 and $3, and record the " +"transaction appropriately. If $2==\"-\" and $3!=\"-\", we have some income, " +"so we call doincome(). If the situation is reversed, we call doexpense(); " +"and if both $2 and $3 contain categories, we call dotransfer(). Each time, " +"we pass the \"balance\" array to these functions so that the appropriate " +"data is recorded there." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):571 +msgid "" +"You'll also notice several lines that say \"if ( $5 == \"Y\" ), record that " +"same transaction in balance2\". What exactly are we doing here? You'll " +"recall that $5 contains either a \"Y\" or a \"N\", and records whether the " +"transaction has been posted to the account. Because we record the " +"transaction to balance2 only if the transaction has been posted, balance2 " +"will contain the actual account balance, while \"balance\" will contain all " +"transactions, whether they have been posted or not. You can use balance2 to " +"verify your data entry (since it should match with your current account " +"balance according to your bank), and use \"balance\" to make sure that you " +"don't overdraw your account (since it will take into account any checks you " +"have written that have not yet been cashed)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):587 +msgid "Generating the report" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):590 +msgid "" +"After the main block repeatedly processes each input record, we now have a " +"fairly comprehensive record of debits and credits broken down by category " +"and by month. Now, all we need to do is define an END block that will " +"generate a report, in this case a modest one:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):597 +msgid "Generating final report" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):597 +#, no-wrap +msgid "" +"\n" +"END {\n" +" bal=0\n" +" bal2=0 \n" +" for (x in globcat) {\n" +" bal=bal+balance[0,x]\n" +" bal2=bal2+balance2[0,x] \n" +" }\n" +" printf(\"Your available funds: %10.2f\\n\", bal)\n" +" printf(\"Your account balance: %10.2f\\n\", bal2) \n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):610 +msgid "This report prints out a summary that looks something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre:caption):614 +msgid "Final report" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(pre):614 +#, no-wrap +msgid "" +"\n" +"Your available funds: 1174.22\n" +"Your account balance: 2399.33\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):619 +msgid "" +"In our END block, we used the \"for (x in globcat)\" construct to iterate " +"through every category, tallying up a master balance based on all the " +"transactions recorded. We actually tally up two balances, one for available " +"funds, and another for the account balance. To execute the program and " +"process your own financial goodies that you've entered into a file called " +"<path>mycheckbook.txt</path>, put all the above code into a text file called " +"<path>balance</path> and done <c>chmod +x balance</c>, and then type \"<c>./" +"balance mycheckbook.txt</c>\". The balance script will then add up all your " +"transactions and print out a two-line balance summary for you." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):634 +msgid "Upgrades" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):637 +msgid "" +"I use a more advanced version of this program to manage my personal and " +"business finances. My version (which I couldn't include here due to space " +"limitations) prints out a monthly breakdown of income and expenses, " +"including annual totals, net income and a bunch of other stuff. Even better, " +"it outputs the data in HTML format, so that I can view it in a Web " +"browser :) If you find this program useful, I encourage you to add these " +"features to this script. You won't need to configure it to record any " +"additional information; all the information you need is already in balance " +"and balance2. Just upgrade the END block, and you're in business!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(p):649 +msgid "" +"I hope you've enjoyed this series. For more information on awk, check out " +"the resources listed below." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(title):659 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(li):664 +msgid "" +"Read Daniel's other awk articles on developerWorks: Common threads: Awk by " +"example, <uri link=\"l-awk1.xml\">Part 1</uri> and <uri link=\"l-awk2.xml" +"\">Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(li):669 +msgid "" +"If you'd like a good old-fashioned book, O'Reilly's <uri link=\"http://www." +"oreilly.com/catalog/sed2/\">sed & awk, 2nd Edition</uri> is a wonderful " +"choice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(li):674 +msgid "" +"Be sure to check out the <uri link=\"http://www.faqs.org/faqs/computer-lang/" +"awk/faq/\">comp.lang.awk FAQ</uri>. It also contains lots of additional awk " +"links." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(li):679 +msgid "" +"Patrick Hartigan's <uri link=\"http://sparky.rice.edu/~hartigan/awk.html" +"\">awk tutorial</uri> is packed with handy awk scripts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(li):683 +msgid "" +"<uri link=\"http://www.tasoft.com/tawk.html\">Thompson's TAWK Compiler</uri> " +"compiles awk scripts into fast binary executables. Versions are available " +"for Windows, OS/2, DOS, and UNIX." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(li):688 +msgid "" +"<uri link=\"http://www.gnu.org/software/gawk/manual/gawk.html\">The GNU Awk " +"User's Guide</uri> is available for online reference." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-awk3.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-posix1.xml.po b/article/gettext/ru/l-posix1.xml.po new file mode 100644 index 0000000..e8b5240 --- /dev/null +++ b/article/gettext/ru/l-posix1.xml.po @@ -0,0 +1,656 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(guide:link):5 +msgid "/doc/en/articles/l-posix1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):6 +msgid "POSIX threads explained, part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(abstract):12 +msgid "" +"POSIX (Portable Operating System Interface) threads are a great way to " +"increase the responsiveness and performance of your code. In this series, " +"Daniel Robbins shows you exactly how to use threads in your code. A lot of " +"behind-the-scenes details are covered, so by the end of this series you'll " +"really be ready to create your own multithreaded programs." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(version):25 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(date):26 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):29 +msgid "A simple and nimble tool for memory sharing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):31 +msgid "Threads are fun" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):34 +msgid "" +"Knowing how to properly use threads should be part of every good " +"programmer's repertoire. Threads are similar to processes. Threads, like " +"processes, are time-sliced by the kernel. On uniprocessor systems the kernel " +"uses time slicing to simulate simultaneous execution of threads in much the " +"same way it uses time slicing with processes. And, on multiprocessor " +"systems, threads are actually able to run simultaneously, just like two or " +"more processes can." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):43 +msgid "" +"So why is multithreading preferable to multiple independent processes for " +"most cooperative tasks? Well, threads share the same memory space. " +"Independent threads can access the same variables in memory. So all of your " +"program's threads can read or write the declared global integers. If you've " +"ever programmed any non-trivial code that uses fork(), you'll recognize the " +"importance of this tool. Why? While fork() allows you to create multiple " +"processes, it also creates the following communication problem: how to get " +"multiple processes, each with their own independent memory space, to " +"communicate. There is no one simple answer to this problem. While there are " +"many different kinds of local IPC (inter-process communication), they all " +"suffer from two important drawbacks:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):58 +msgid "" +"They impose some form of additional kernel overhead, lowering performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):61 +msgid "" +"In almost all situations, IPC is not a \"natural\" extension of your code. " +"It often dramatically increases the complexity of your program." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):67 +msgid "" +"Double bummer: overhead and complication aren't good things. If you've ever " +"had to make massive modifications to one of your programs so that it " +"supports IPC, you'll really appreciate the simple memory-sharing approach " +"that threads provide. POSIX threads don't need to make expensive and " +"complicated long-distance calls because all our threads happen to live in " +"the same house. With a little synchronization, all your threads can read and " +"modify your program's existing data structures. You don't have to pump the " +"data through a file descriptor or squeeze it into a tight, shared memory " +"space. For this reason alone you should consider the one process/multithread " +"model rather than the multiprocess/single-thread model." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):83 +msgid "Threads are nimble" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):86 +msgid "" +"But there's more. Threads also happen to be extremely nimble. Compared to a " +"standard fork(), they carry a lot less overhead. The kernel does not need to " +"make a new independent copy of the process memory space, file descriptors, " +"etc. That saves a lot of CPU time, making thread creation ten to a hundred " +"times faster than new process creation. Because of this, you can use a whole " +"bunch of threads and not worry too much about the CPU and memory overhead " +"incurred. You don't have a big CPU hit the way you do with fork(). This " +"means you can generally create threads whenever it makes sense in your " +"program." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):97 +msgid "" +"Of course, just like processes, threads will take advantage of multiple " +"CPUs. This is a really great feature if your software is designed to be used " +"on a multiprocessor machine (if the software is open source, it will " +"probably end up running on quite a few of these). The performance of certain " +"kinds of threaded programs (CPU-intensive ones in particular) will scale " +"almost linearly with the number of processors in the system. If you're " +"writing a program that is very CPU-intensive, you'll definitely want to find " +"ways to use multiple threads in your code. Once you're adept at writing " +"threaded code, you'll also be able to approach coding challenges in new and " +"creative ways without a lot of IPC red tape and miscellaneous mumbo-jumbo. " +"All these benefits work synergistically to make multithreaded programming " +"fun, fast, and flexible." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):114 +msgid "I think I'm a clone now" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):117 +msgid "" +"If you've been in the Linux programming world for a while, you may know " +"about the __clone() system call. __clone() is similar to fork(), but allows " +"you to do lots of things that threads can do. For example, with __clone() " +"you can selectively share parts of your parent's execution context (memory " +"space, file descriptors, etc.) with a new child process. That's a good " +"thing. But there is also a not-so-good thing about __clone(). As the __clone" +"() man page states:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):126 +msgid "__clone() man page excerpt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):126 +#, no-wrap +msgid "" +"\n" +" \"The __clone call is Linux-specific and should not be used in programs\n" +" intended to be portable. For programming threaded applications (multiple\n" +" threads of control in the same memory space), it is better to use a library\n" +" implementing the POSIX 1003.1c thread API, such as the Linux-Threads\n" +" library. See pthread_create(3thr).\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):134 +msgid "" +"So, while __clone() offers many of the benefits of threads, it is not " +"portable. That doesn't mean you shouldn't use it in your code. But you " +"should weigh this fact when you are considering using __clone() in your " +"software. Fortunately, as the __clone() man page states, there's a better " +"alternative: POSIX threads. When you want to write portable multithreaded " +"code, code that works under Solaris, FreeBSD, Linux, and more, POSIX threads " +"are the way to go." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):146 +msgid "Beginning threads" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):149 +msgid "Here's a simple example program that uses POSIX threads:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):153 +msgid "Sample program using POSIX threads" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):153 +#, no-wrap +msgid "" +"\n" +"#include <pthread.h>\n" +"#include <stdlib.h>\n" +"#include <unistd.h>\n" +"\n" +"void *thread_function(void *arg) {\n" +" int i;\n" +" for ( i=0; i<20; i++ ) {\n" +" printf(\"Thread says hi!\\n\");\n" +" sleep(1);\n" +" }\n" +" return NULL;\n" +"}\n" +"\n" +"int main(void) {\n" +"\n" +" pthread_t mythread;\n" +" \n" +" if ( pthread_create( &mythread, NULL, thread_function, NULL) ) {\n" +" printf(\"error creating thread.\");\n" +" abort();\n" +" }\n" +"\n" +" if ( pthread_join ( mythread, NULL ) ) {\n" +" printf(\"error joining thread.\");\n" +" abort();\n" +" }\n" +"\n" +" exit(0);\n" +"\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):186 +msgid "" +"To compile this program, simply save this program as thread1.c, and type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):190 +msgid "Compiling above program" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):190 +#, no-wrap +msgid "" +"\n" +"$ <i>gcc thread1.c -o thread1 -lpthread</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):194 +msgid "Run it by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):198 +msgid "Running that program" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):198 +#, no-wrap +msgid "" +"\n" +"$ <i>./thread1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):205 +msgid "Understanding thread1.c" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):208 +msgid "" +"<path>thread1.c</path> is an extremely simple threaded program. While it " +"doesn't do anything useful, it'll help you understand how threads work. " +"Let's take a step-by-step look at what this program does. In main() we first " +"declare a variable called mythread, which has a type of pthread_t. The " +"pthread_t type, defined in <path>pthread.h</path>, is often called a " +"\"thread id\" (commonly abbreviated as \"tid\"). Think of it as a kind of " +"thread handle." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):217 +msgid "" +"After mythread is declared (remember that mythread is just a \"tid\", or a " +"handle to the thread we are about to create), we call the pthread_create " +"function to create a real, living thread. Don't be confused by the fact that " +"pthread_create() is inside an \"if\" statement. Since pthread_create() " +"returns zero on success and a non-zero value on failure, placing the " +"function call in an if() is just an elegant way of detecting a failed " +"pthread_create() call. Let's look at the arguments to pthread_create. The " +"first one is a pointer to mythread, &mythread. The second argument, " +"currently set to NULL, can be used to define certain attributes for our " +"thread. Because the default thread attributes work for us, we simply set it " +"to NULL." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):230 +msgid "" +"Our third argument is the name of a function that the new thread will " +"execute when it starts. In this case the name of the function is " +"thread_function(). When this thread_function() returns, our new thread will " +"terminate. In this example our thread function doesn't do anything " +"remarkable. It just prints out \"Thread says hi!\" 20 times and then exits. " +"Notice that thread_function() accepts a void * as an argument and also " +"returns a void * as a return value. This shows us that it's possible to use " +"a void * to pass an arbitrary piece of data to our new thread, and that our " +"new thread can return an arbitrary piece of data when it finishes. Now, how " +"do we pass our thread an arbitrary argument? Easy. We use the fourth " +"argument to the pthread_create() call. In this example, we set it to NULL " +"because we don't need to pass any data into our trivial thread_function()." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):245 +msgid "" +"As you may have guessed, the program will consist of two threads after " +"pthread_create() successfully returns. Wait a minute, two threads? Didn't we " +"just create a single thread? Yes, we did. But our main program is also " +"considered a thread. Think of it this way: if you write a program and don't " +"use POSIX threads at all, the program will be single-threaded (this single " +"thread is called the \"main\" thread). By creating a new thread we now have " +"a total of two threads in our program." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):255 +msgid "" +"I imagine you have at least two important questions at this point. The first " +"is what the main thread does after the new thread is created. It keeps on " +"going and executes the next line of our program in sequence (in this case " +"that line is \"if ( pthread_join(...))\"). The second question you may be " +"wondering about is what happens to our new thread when it exits. It stops " +"and waits to be merged or \"joined\" with another thread as part of its " +"cleanup process." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):264 +msgid "" +"OK, now on to pthread_join(). Just as pthread_create() split our single " +"thread into two threads, pthread_join() merges two threads into a single " +"thread. The first argument to pthread_join() is our tid mythread. The second " +"argument is a pointer to a void pointer. If the void pointer is non-NULL, " +"pthread_join will place our thread's void * return value at the location we " +"specify. Since we don't care about thread_function()'s return value, we set " +"it to NULL." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):273 +msgid "" +"You'll notice that our thread_function() takes 20 seconds to complete. Long " +"before thread_function() completes, our main thread has already called " +"pthread_join(). When this occurs our main thread will block (go to sleep) " +"and wait for thread_function() to complete. When thread_function() " +"completes, pthread_join() will return. Now our program has one main thread " +"again. When our program exits, all new threads have been pthread_join()ed. " +"This is exactly how you should deal with every new thread you create in your " +"programs. If a new thread isn't joined it will still count against your " +"system's maximum thread limit. This means that not doing the proper cleanup " +"will eventually cause new pthread_create() calls to fail." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):289 +msgid "No parents, no children" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):292 +msgid "" +"If you've used the fork() system call you're probably familiar with the " +"concept of parent and child processes. When a process creates another new " +"process, using fork(), the new process is considered the child and the " +"original process is considered the parent. This creates a hierarchical " +"relationship that can be handy, especially when waiting for child processes " +"to terminate. The waitpid() function, for example, will tell the current " +"process to wait for the termination of any child processes. waitpid() is " +"used to implement a simple cleanup routine in your parent process." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):303 +msgid "" +"Things are a little more interesting with POSIX threads. You may have " +"noticed that I have intentionally avoided using the terms \"parent thread\" " +"and \"child thread\" so far. That's because with POSIX threads this " +"hierarchical relationship doesn't exist. While a main thread may create a " +"new thread, and that new thread may create an additional new thread, the " +"POSIX threads standard views all your threads as a single pool of equals. So " +"the concept of waiting for a child thread to exit doesn't make sense. The " +"POSIX threads standard does not record any \"family\" information. This lack " +"of genealogy has one major implication: if you want to wait for a thread to " +"terminate, you need to specify which one you are waiting for by passing the " +"proper tid to pthread_join(). The threads library can't figure it out for " +"you." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):317 +msgid "" +"To many people this isn't very good news because it can complicate programs " +"that consist of more than two threads. Don't let it worry you. The POSIX " +"threads standard provides all the tools you need to manage multiple threads " +"gracefully. Actually, the fact that there is no parent/child relationship " +"opens up some creative ways to use threads in our programs. For example, if " +"we have a thread called thread 1, and thread 1 creates a thread called " +"thread 2, it's not necessary for thread 1 itself to call pthread_join() for " +"thread 2. Any other thread in the program can do that. This allows for " +"interesting possibilities when you write heavily multithreaded code. You " +"can, for example, create a global \"dead list\" that contains all stopped " +"threads and then have a special cleanup thread that simply waits for an item " +"to be added to the list. The cleanup thread calls pthread_join() to merge it " +"with itself. Now your entire cleanup will be handled neatly and efficiently " +"in a single thread." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):336 +msgid "Synchronized swimming" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):339 +msgid "" +"Now it's time to take a look at some code that does something a little " +"unexpected. Here's thread2.c:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):344 +msgid "thread2.c" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):344 +#, no-wrap +msgid "" +"\n" +"#include <pthread.h>\n" +"#include <stdlib.h>\n" +"#include <unistd.h>\n" +"#include <stdio.h>\n" +"\n" +"int myglobal;\n" +"\n" +" void *thread_function(void *arg) {\n" +" int i,j;\n" +" for ( i=0; i<20; i++ ) {\n" +" j=myglobal;\n" +" j=j+1;\n" +" printf(\".\");\n" +" fflush(stdout);\n" +" sleep(1);\n" +" myglobal=j;\n" +" }\n" +" return NULL;\n" +"}\n" +"\n" +"int main(void) {\n" +"\n" +" pthread_t mythread;\n" +" int i;\n" +"\n" +" if ( pthread_create( &mythread, NULL, thread_function, NULL) ) {\n" +" printf(\"error creating thread.\");\n" +" abort();\n" +" }\n" +"\n" +" for ( i=0; i<20; i++) {\n" +" myglobal=myglobal+1;\n" +" printf(\"o\");\n" +" fflush(stdout);\n" +" sleep(1);\n" +" }\n" +"\n" +" if ( pthread_join ( mythread, NULL ) ) {\n" +" printf(\"error joining thread.\");\n" +" abort();\n" +" }\n" +"\n" +" printf(\"\\nmyglobal equals %d\\n\",myglobal);\n" +"\n" +" exit(0);\n" +"\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):397 +msgid "Understanding thread2.c" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):400 +msgid "" +"This program, like our first one, creates a new thread. Both the main thread " +"and the new thread then increment a global variable called myglobal 20 " +"times. But the program itself produces some unexpected results. Compile it " +"by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):406 +msgid "Compiling program" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):406 +#, no-wrap +msgid "" +"\n" +"$ <i>gcc thread2.c -o thread2 -lpthread</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):410 +msgid "And run it:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre:caption):414 +msgid "Running it" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(pre):414 +#, no-wrap +msgid "" +"\n" +"$ <i>./thread2</i>\n" +"..o.o.o.o.oo.o.o.o.o.o.o.o.o.o..o.o.o.o.o\n" +"myglobal equals 21\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):420 +msgid "" +"Quite unexpected! Since myglobal starts at zero, and both the main thread " +"and the new thread each increment it by 20, we should see myglobal equaling " +"40 at the end of the program. Since myglobal equals 21, we know that " +"something fishy is going on here. But what is it?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):427 +msgid "" +"Give up? OK, I'll show you why it happens. Take a look at thread_function(). " +"Notice how we copy myglobal into a local variable called \"j\"? And see how " +"we increment j, then sleep for one second, and only then copy our new j " +"value into myglobal? That's the key. Imagine what happens if our main thread " +"increments myglobal just <e>after</e> our new thread copies the value of " +"myglobal into j. When thread_function() writes the value of j back to " +"myglobal, it will overwrite the modification that our main thread made." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):437 +msgid "" +"When writing threaded programs, you want to avoid useless side effects like " +"the one we just looked at because they're a waste of time (except when you " +"are writing articles on POSIX threads, of course :). Now, what can we do to " +"eliminate this hassle?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):444 +msgid "" +"Since the problem occurs because we copy myglobal to j and hold it there for " +"one second before writing it back, we could try to avoid using a temporary " +"local variable and incrementing myglobal directly. While this solution will " +"probably work in this particular example, it is not correct. And if we were " +"performing a relatively complex mathematical operation on myglobal instead " +"of just incrementing it, it would certainly fail. But why?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(p):453 +msgid "" +"To understand the problem, you need to remember that threads run " +"simultaneously. Even on a uniprocessor machine (where the kernel uses time " +"slicing to simulate true multitasking) we can, from a programmer's " +"perspective, imagine both threads as executing at the same time. thread2.c " +"has problems because the code in thread_function() relies on the fact that " +"myglobal will not be modified during the ~1 second before it is incremented. " +"We need some way for one thread to tell the other to \"hold off\" while it's " +"making changes to myglobal. I'll show you exactly how to do this in my next " +"article. See you then." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(title):469 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):474 +msgid "" +"Read Daniel's POSIX threads explained <uri link=\"l-posix2.xml\">Part 2</" +"uri> and <uri link=\"l-posix3.xml\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):478 +msgid "" +"See documentation on <uri link=\"http://metalab.unc.edu/pub/Linux/docs/faqs/" +"Threads-FAQ/html/\">Linux threads</uri>, by Sean Walton, KB7rfa" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):483 +msgid "" +"Take a POSIX threads <uri link=\"http://www.math.arizona.edu/swig/pthreads/" +"threads.html\">tutorial</uri> by Mark Hays at the University of Arizona" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):488 +msgid "" +"In <uri link=\"http://hwaci.com/sw/pttcl/pttcl.html\">An Introduction to " +"Pthreads-Tcl</uri>, see changes to Tcl that enable it to be used with POSIX " +"threads" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):493 +msgid "" +"Take another tutorial, <uri link=\"http://dis.cs.umass.edu/~wagner/" +"threads_html/tutorial.html\">Getting Started with POSIX Threads</uri>, by " +"Tom Wagner and Don Towsley in the Computer Science Department at the " +"University of Massachusetts, Amherst" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):499 +msgid "" +"Always go to your friendly Linux pthread man pages (<c>man -k pthread</c>)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):502 +msgid "" +"<uri link=\"http://moss.csc.ncsu.edu/~mueller/pthreads/\">FSU PThreads</uri> " +"is a C library that implements POSIX threads for SunOS 4.1.x, Solaris 2.x, " +"SCO UNIX, FreeBSD, Linux, and DOS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):507 +msgid "" +"Refer to the home page for <uri link=\"http://www.sai.msu.su/sal/C/2/" +"PCTHREADS.html\">POSIX and DCE threads for Linux</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):512 +msgid "" +"See <uri link=\"http://pauillac.inria.fr/~xleroy/linuxthreads/\">The " +"LinuxThreads Library</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):516 +msgid "" +"<uri link=\"http://www.users.itl.net.ua/~prool/proolix.html\">Proolix</uri> " +"is a simple POSIX-compliant operating system for i8086+ under permanent " +"development" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):521 +msgid "" +"Take a look at David R. Butenhof's book <uri link=\"http://www.amazon.com/" +"exec/obidos/ASIN/0201633922/o/qid=961544788/sr=8-1/" +"ref=aps_sr_b_1_1/002-2882413-1227240\"> Programming with POSIX Threads</" +"uri>, in which he covers, among other things, the possible permutations of " +"not using mutexes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(li):527 +msgid "" +"Check out W. Richard Stevens' book <uri link=\"http://search.borders.com/" +"fcgi-bin/db2www/search/search.d2w/Details?&mediaType=Book&" +"prodID=2362607\">UNIX Network Programming: Network APIs: Sockets and XTI, " +"Volume 1</uri>" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-posix2.xml.po b/article/gettext/ru/l-posix2.xml.po new file mode 100644 index 0000000..58751e0 --- /dev/null +++ b/article/gettext/ru/l-posix2.xml.po @@ -0,0 +1,698 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(guide:link):5 +msgid "/doc/en/articles/l-posix2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):6 +msgid "POSIX threads explained, part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(abstract):12 +msgid "" +"POSIX threads are a great way to increase the responsiveness and performance " +"of your code. In this second article of a three-part series, Daniel Robbins " +"shows you how to protect the integrity of shared data structures in your " +"threaded code by using nifty little things called mutexes." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(version):24 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(date):25 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):28 +msgid "The little things called mutexes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):30 +msgid "Mutex me!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):33 +msgid "" +"In my <uri link=\"/doc/en/articles/l-posix1.xml\">previous article</uri>, I " +"talked about threaded code that did unusual and unexpected things. Two " +"threads each incremented a global variable twenty times. The variable was " +"supposed to end up with a value of 40, but ended up with a value of 21 " +"instead. What happened? The problem occurred because one thread repeatedly " +"\"cancelled out\" the increment performed by the other thread. Let's take a " +"look at some corrected code that uses a <b>mutex</b> to solve the problem:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):43 +msgid "thread3.c" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):43 +#, no-wrap +msgid "" +"\n" +"#include <pthread.h>\n" +"#include <stdlib.h>\n" +"#include <unistd.h>\n" +"#include <stdio.h>\n" +"\n" +"int myglobal;\n" +"pthread_mutex_t mymutex=PTHREAD_MUTEX_INITIALIZER;\n" +"\n" +"void *thread_function(void *arg) {\n" +" int i,j;\n" +" for ( i=0; i<20; i++ ) {\n" +" pthread_mutex_lock(&mymutex);\n" +" j=myglobal;\n" +" j=j+1;\n" +" printf(\".\");\n" +" fflush(stdout);\n" +" sleep(1);\n" +" myglobal=j;\n" +" pthread_mutex_unlock(&mymutex);\n" +" }\n" +" return NULL;\n" +"}\n" +"\n" +"int main(void) {\n" +"\n" +" pthread_t mythread;\n" +" int i;\n" +"\n" +" if ( pthread_create( &mythread, NULL, thread_function, NULL) ) {\n" +" printf(\"error creating thread.\");\n" +" bort();\n" +" }\n" +"\n" +" for ( i=0; i<20; i++) {\n" +" pthread_mutex_lock(&mymutex);\n" +" myglobal=myglobal+1;\n" +" pthread_mutex_unlock(&mymutex);\n" +" printf(\"o\");\n" +" fflush(stdout);\n" +" sleep(1);\n" +" }\n" +"\n" +" if ( pthread_join ( mythread, NULL ) ) {\n" +" printf(\"error joining thread.\");\n" +" abort();\n" +" }\n" +"\n" +" printf(\"\\nmyglobal equals %d\\n\",myglobal);\n" +"\n" +" exit(0);\n" +"\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):101 +msgid "Comprehension time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):104 +msgid "" +"If you compare this code to the version in my <uri link=\"/doc/en/articles/l-" +"posix1.xml\">previous article</uri>, you'll notice the addition of the calls " +"pthread_mutex_lock() and pthread_mutex_unlock(). These calls perform a much-" +"needed function in threaded programs. They provide a means of mutual " +"exclusion (hence the name). No two threads can have the same mutex locked at " +"the same time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):113 +msgid "" +"This is how mutexes work. If thread \"a\" tries to lock a mutex while thread " +"\"b\" has the same mutex locked, thread \"a\" goes to sleep. As soon as " +"thread \"b\" releases the mutex (via a pthread_mutex_unlock() call), thread " +"\"a\" will be able to lock the mutex (in other words, it will return from " +"the pthread_mutex_lock() call with the mutex locked). Likewise, if thread \"c" +"\" tries to lock the mutex while thread \"a\" is holding it, thread \"c\" " +"will also be put to sleep temporarily. All threads that go to sleep from " +"calling pthread_mutex_lock() on an already-locked mutex will \"queue up\" " +"for access to that mutex." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):124 +msgid "" +"pthread_mutex_lock() and pthread_mutex_unlock() are normally used to protect " +"data structures. That is, you make sure that only one thread at a time can " +"access a certain data structure by locking and unlocking it. As you may have " +"guessed, the POSIX threads library will grant a lock without having put the " +"thread to sleep at all if a thread tries to lock an unlocked mutex." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(figure:link):133 +msgid "/images/docs/l-posix-mutex.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(figure:caption):133 +msgid "" +"For your enjoyment, four znurts re-enact a scene from recent " +"pthread_mutex_lock() calls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):135 +msgid "" +"The thread in this image that has the mutex locked gets to access the " +"complex data structure without worrying about having other threads mess with " +"it at the same time. The data structure is in effect \"frozen\" until the " +"mutex is unlocked. It's as if the pthread_mutex_lock() and " +"pthread_mutex_unlock() calls are \"under construction\" signs that surround " +"a particular piece of shared data that's being modified or read. The calls " +"act as a warning to other threads to go to sleep and wait their turn for the " +"mutex lock. Of course this is only true if your surround every read and " +"write to a particular data structure with calls to pthread_mutex_lock() and " +"pthread_mutex_unlock()." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):150 +msgid "Why mutex at all?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):153 +msgid "" +"Sounds interesting, but why exactly do we want to put our threads to sleep? " +"After all, isn't the main advantage of threads their ability to work " +"independently and in many cases simultaneously? Yes, that's completely true. " +"However, every non-trivial threads program will require at least some use of " +"mutexes. Let's refer to our example program again to understand why." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):161 +msgid "" +"If you take a look at thread_function(), you'll notice that the mutex is " +"locked at the beginning of the loop and released at the very end. In this " +"example program, mymutex is used to protect the value of myglobal. If you " +"look carefully at thread_function() you'll notice that the increment code " +"copies myglobal to a local variable, increments the local variable, sleeps " +"for one second, and only then copies the local value back to myglobal. " +"Without the mutex, thread_function() will overwrite the incremented value " +"when it wakes up if our main thread increments myglobal during " +"thread_function()'s one-second nap. Using a mutex ensures that this doesn't " +"happen. (In case you're wondering, I added the one-second delay to trigger a " +"flawed result. There is no real reason for thread_function() to go to sleep " +"for one second before writing the local value back to myglobal.) Our new " +"program using mutex produces the desired result:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):176 +msgid "Output of program using mutex" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):176 +#, no-wrap +msgid "" +"\n" +"$ <i>./thread3</i>\n" +"o..o..o.o..o..o.o.o.o.o..o..o..o.ooooooo\n" +"myglobal equals 40\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):182 +msgid "" +"To further explore this extremely important concept, let's take a look at " +"the increment code from our program:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):187 +msgid "Incremented code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):187 +#, no-wrap +msgid "" +"\n" +"thread_function() increment code: \n" +" j=myglobal;\n" +" j=j+1;\n" +" printf(\".\");\n" +" fflush(stdout);\n" +" sleep(1);\n" +" myglobal=j;\n" +"\n" +"main thread increment code:\n" +" myglobal=myglobal+1;\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):200 +msgid "" +"If this code were in a single-threaded program we'd expect the " +"thread_function() code to execute in its entirety. The execution would then " +"be followed by the main thread code (or the other way around). In a threaded " +"program without mutexes, the code can (and often will, thanks to the sleep() " +"call) end up executing in the following order:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):208 +msgid "Executing order" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):208 +#, no-wrap +msgid "" +"\n" +" thread_function() thread main thread\n" +"\n" +" j=myglobal;\n" +" j=j+1;\n" +" printf(\".\");\n" +" fflush(stdout);\n" +" sleep(1); myglobal=myglobal+1;\n" +" myglobal=j;\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):219 +msgid "" +"When the code executes in this particular order, the main thread's " +"modification to myglobal gets overwritten. We then end up with an incorrect " +"value at the end of our program. If we were manipulating pointers we'd " +"probably end up with a segfault. Notice that our thread_function() thread " +"executes all its instructions in order. It's not as if thread_function() " +"does anything out of order. The problem is that we have another thread " +"performing the other modifications to the same data structure effectively at " +"the same time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):232 +msgid "Inside threads 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):235 +msgid "" +"Before I explain how to figure out where to use mutexes, I'll offer a little " +"insight into the internal working of threads. Here's our first example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):240 +msgid "" +"Let's say you have a main thread that creates three new threads: threads \"a" +"\", \"b\", and \"c\". Let's say that thread \"a\" is created first, thread " +"\"b\", second and thread \"c\" last." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):246 +msgid "Thread creating order" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):246 +#, no-wrap +msgid "" +"\n" +" pthread_create( &thread_a, NULL, thread_function, NULL);\n" +" pthread_create( &thread_b, NULL, thread_function, NULL);\n" +" pthread_create( &thread_c, NULL, thread_function, NULL);\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):252 +msgid "" +"After the first pthread_create() call completes, you can assume either that " +"thread \"a\" exists or that it has finished and is now stopped. After the " +"second pthread_create() call, both the main thread and thread \"b\" can " +"assume that thread \"a\" exists (or has stopped)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):259 +msgid "" +"However, immediately after the second create() call returns, the main thread " +"can't assume which thread (a or b) will actually start running first. " +"Although both threads exist it's up to the kernel and threads library to " +"give them a slice of CPU time. And there is no hard rule as to who goes " +"first. Now, it's very likely that thread \"a\" will start executing before " +"thread \"b\", but it isn't guaranteed. This is especially true on a multi-" +"processor machine. If you write code that assumes that thread \"a\" will " +"actually start executing its code before thread \"b\" starts, you'll end up " +"with a program that works 99% of the time. Or worse, a program that works " +"100% of the time on your machine but 0% of the time on your client's quad-" +"processor server." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):272 +msgid "" +"Another thing that we can learn from this example is that the threads " +"library preserves the order of code execution for each individual thread. In " +"other words, those three pthread_create() calls will in fact execute in the " +"order that they appear. From the main thread's perspective, all the code is " +"executing in order. Sometimes we can take advantage of this to optimize " +"parts of our threaded programs. For instance, in the above example, thread " +"\"c\" can assume that thread \"a\" and \"b\" are running or have already " +"terminated. It does not have to worry about the possibility that threads \"a" +"\" and \"b\" haven't been created yet. You can use this logic to optimize " +"your threaded programs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):287 +msgid "Inside threads 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):290 +msgid "" +"OK, now for another hypothetical example. Let's say we have a bunch of " +"threads that are executing the following code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):295 +msgid "Code being executed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):295 +#, no-wrap +msgid "" +"\n" +" myglobal=myglobal+1;\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):299 +msgid "" +"Do we need to lock and unlock the mutex before and after the increment " +"respectively? Some of you may say \"no\". The compiler will after all very " +"likely compile the above assignment into a single machine instruction. As " +"you know a single machine instruction cannot be interrupted \"mid-stream\". " +"Even hardware interrupts will respect the atomicity of machine instructions. " +"Because of this tendency it's tempting to leave out the pthread_mutex_lock() " +"and pthread_mutex_unlock() calls entirely. Don't do it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):309 +msgid "" +"Am I being a wimp? Not really. First, you shouldn't assume that the above " +"assignment would be compiled as a single machine instruction unless you " +"personally verify the machine code yourself. Even if you insert some inline " +"assembly to ensure that the increment happens atomically -- or even if you " +"wrote the compiler yourself! -- you may still have problems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):317 +msgid "" +"Here's why. Using a single inline assembly opcode will probably work " +"wonderfully on a uni-processor machine. Each increment will happen " +"atomically, and chances are you'll get the desired result. But a multi-" +"processor machine is another story. On a multi-CPU machine, you can have two " +"separate processors executing the above assignment at nearly (or at times " +"exactly) the same time. And remember that this memory modification will need " +"to trickle down from L1 to L2 cache, and then to main memory. (An SMP " +"machine is not just an additional processor; it also has special hardware " +"that arbitrates access to RAM.) In the end, you'll really have no idea which " +"CPU \"wins\" the race of writing to main memory. To produce predictable " +"code, you'll want to use mutexes. Mutexes will insert a \"memory barrier,\" " +"which ensures that the writes to main memory occur in the order the threads " +"lock the mutex." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):332 +msgid "" +"Consider an SMP architecture that updates main memory in 32-bit blocks. If " +"you are incrementing a 64-bit integer without mutexes, the uppermost 4 bytes " +"might come from one CPU and the other four might come from another. Bummer! " +"Worst of all, using poor technique will probably make your program bomb out " +"once in a blue moon or at 3 AM on an important client's system. David R. " +"Butenhof covers the possible permutations of not using mutexes in his book, " +"Programming with POSIX Threads (see <uri link=\"#resources\">Resources</uri> " +"at the end of this article)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):346 +msgid "Many mutexes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):349 +msgid "" +"If you place too many mutexes, your code won't have any kind of concurrency " +"and will run slower than a single-threaded solution. If you place too few, " +"your code will have weird and embarrassing bugs. Fortunately, there is a " +"middle ground. First of all, mutexes are used to serialize access to *shared " +"data*. Don't use them for non-shared data, and don't use them if your " +"program's logic ensures that only one thread is accessing a particular data " +"structure at a single time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):358 +msgid "" +"Second of all, if you are using shared data, use mutexes for both reading " +"and writing. Surround your read and write sections with pthread_mutex_lock() " +"and pthread_mutex_unlock(), or use them any time a program's invariant is " +"temporarily broken. Learn to view your code from the perspective of a single " +"thread and make sure each individual thread in your program has a " +"consistent, friendly view of memory. It'll probably take you several hours " +"of writing your own code to get the hang of mutexes, but they will soon " +"become second nature and you'll be able to use them properly without " +"thinking <e>too</e> much." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):372 +msgid "Using the calls: initialization" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):375 +msgid "" +"OK, now it's time to see all the different ways to use mutexes. First, we'll " +"start with initialization. In our <uri link=\"#thread3c\">thread3.c example</" +"uri>, we used a static initialization method. This involved declaring a " +"pthread_mutex_t variable and assigning it the constant " +"PTHREAD_MUTEX_INITIALIZER:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):383 +msgid "Initialization example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):383 +#, no-wrap +msgid "" +"\n" +"pthread_mutex_t mymutex=PTHREAD_MUTEX_INITIALIZER;\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):387 +msgid "" +"That's pretty easy. But you can also create a mutex dynamically. Use this " +"dynamic method whenever your code allocates a new mutex using malloc(). In " +"this case, the static initialization method won't do, and the routine " +"pthread_mutex_init() should be used:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):394 +msgid "Dynamic way of creating mutex" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):394 +#, no-wrap +msgid "" +"\n" +"int pthread_mutex_init( pthread_mutex_t *mymutex, const pthread_mutexattr_t*attr)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):398 +msgid "" +"As you can see, pthread_mutex_init accepts a pointer to an already-allocated " +"region of memory to initialize as a mutex. As a second argument, it can also " +"accept an optional pthread_mutexattr_t pointer. This structure can be used " +"to set various mutex attributes. But usually these attributes are not " +"needed, so specifying NULL is the norm." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):406 +msgid "" +"Whenever you initialize a mutex using pthread_mutex_init(), it should be " +"destroyed using pthread_mutex_destroy(). pthread_mutex_destroy() accepts a " +"single pointer to a pthread_mutex_t and frees any resources allocated to the " +"mutex when it was created. Be sure to note that pthread_mutex_destroy() does " +"not free the memory used to store the pthread_mutex_t. It's up to you to free" +"() your own memory. Also remember that both pthread_mutex_init() and " +"pthread_mutex_destroy() return zero on success." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):419 +msgid "Using the calls: locking" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):422 +msgid "Locking example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):422 +#, no-wrap +msgid "" +"\n" +"pthread_mutex_lock(pthread_mutex_t *mutex)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):426 +msgid "" +"pthread_mutex_lock() accepts a single pointer to a mutex to lock. If the " +"mutex already happens to be locked, the caller will go to sleep. When the " +"function returns, the caller will be woken up (obviously), and the caller " +"will also now hold the lock. This call either returns zero on success or a " +"non-zero error code on failure." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):434 +msgid "Unlocking example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):434 +#, no-wrap +msgid "" +"\n" +"pthread_mutex_unlock(pthread_mutex_t *mutex)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):438 +msgid "" +"pthread_mutex_unlock() complements pthread_mutex_lock() and unlocks a mutex " +"that the thread has already locked. You should always unlock a mutex that " +"you've locked as soon as safely possible (to increase performance). And you " +"should never unlock a mutex that you don't hold a lock for (otherwise, the " +"pthread_mutex_unlock() call will fail with a non-zero EPERM return value)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre:caption):446 +msgid "Trying the lock example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(pre):446 +#, no-wrap +msgid "" +"\n" +"pthread_mutex_trylock(pthread_mutex_t *mutex)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):450 +msgid "" +"This call is handy when you want to lock a mutex while your thread is doing " +"something else (because the mutex is currently locked). When you call " +"pthread_mutex_trylock() you'll attempt to lock the mutex. If the mutex is " +"currently unlocked you'll get the lock, and this function will return zero. " +"However, if the mutex is locked this call won't block. Rather, it will " +"return a non-zero EBUSY error value. Then you can go about your business and " +"try to lock at a later time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):463 +msgid "Waiting on conditions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):466 +msgid "" +"Mutexes are necessary tools for threaded programs, but they can't do " +"everything. What happens, for instance, if your thread is waiting for a " +"certain condition to appear in shared data? Your code could repeatedly lock " +"and unlock the mutex, checking for any changes to the value. At the same " +"time it will also quickly unlock the mutex so that others can make any " +"necessary changes. But this is a horrible approach because this thread will " +"need to busy-loop to detect a change in a reasonable time frame." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):476 +msgid "" +"You could put the calling thread to sleep for a little bit, say three " +"seconds between each check, but then your threaded code wouldn't be " +"optimally responsive. What you really need is a way to put a thread to sleep " +"while it waits for some condition to be met. Once the condition is met you " +"need a method to wake up the thread(s) that are waiting for that particular " +"condition to become true. If you can do this, your threaded code will be " +"really efficient and it won't tie up valuable mutex locks. That's precisely " +"what POSIX condition variables can do for you!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(p):487 +msgid "" +"And POSIX condition variables are the subject of my next article, where I'll " +"show you exactly how to use them. Then you'll have all the resources to " +"create sophisticated threaded programs that model work crews, assembly " +"lines, and more. I'm going to pick up the pace in the next article now that " +"you're getting more familiar with threads. I'm hoping this will allow me to " +"squeeze in a reasonably sophisticated threaded program at the end of the " +"next article. And speaking of waiting on conditions, I'll see you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(title):502 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):507 +msgid "" +"Read Daniel's POSIX threads explained <uri link=\"l-posix1.xml\">Part 1</" +"uri> and <uri link=\"l-posix3.xml\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):511 +msgid "" +"See documentation on <uri link=\"http://metalab.unc.edu/pub/Linux/docs/faqs/" +"Threads-FAQ/html/\">Linux threads</uri>, by Sean Walton, KB7rfa." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):516 +msgid "" +"Always go to your friendly Linux pthread man pages (<c>man -k pthread</c>)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):519 +msgid "" +"See <uri link=\"http://pauillac.inria.fr/~xleroy/linuxthreads/\">The " +"LinuxThreads Library.</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):523 +msgid "" +"<uri link=\"http://www.users.itl.net.ua/~prool/proolix.html\">Proolix</uri> " +"is a simple POSIX-compliant operating system for i8086+ under permanent " +"development." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):528 +msgid "" +"Take a look at David R. Butenhof's book <uri link=\"http://www.amazon.com/" +"exec/obidos/ASIN/0201633922/o/qid=961544788/sr=8-1/" +"ref=aps_sr_b_1_1/002-2882413-1227240\">Programming with POSIX Threads</uri>, " +"in which he covers, among other things, the possible permutations of not " +"using mutexes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):535 +msgid "Check out W. Richard Stevens' book \"UNIX Network Programming\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):541 +msgid "" +"Find more resources for Linux developers in the <uri link=\"http://www.ibm." +"com/developerworks/linux/\">developerWorks Linux zone</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(li):546 +msgid "" +"Get involved in the developerWorks community by participating in <uri link=" +"\"http://www.ibm.com/developerworks/blogs/\">developerWorks blogs</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-posix3.xml.po b/article/gettext/ru/l-posix3.xml.po new file mode 100644 index 0000000..8b24444 --- /dev/null +++ b/article/gettext/ru/l-posix3.xml.po @@ -0,0 +1,767 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(guide:link):5 +msgid "/doc/en/articles/l-posix3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):6 +msgid "POSIX threads explained, part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(abstract):12 +msgid "" +"In this article, the last of a three-part series on POSIX threads, Daniel " +"takes a good look at how to use condition variables. Condition variables are " +"POSIX thread structures that allow you to \"wake up\" threads when certain " +"conditions are met. You can think of them as a thread-safe form of " +"signalling. Daniel wraps up the article by using all that you've learned so " +"far to implement a multi-threaded work crew application." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(version):26 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(date):27 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):30 +msgid "Improve efficiency with condition variables" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):32 +msgid "Condition variables explained" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):35 +msgid "" +"I ended my <uri link=\"/doc/en/articles/l-posix2.xml\">previous article</" +"uri> by describing a particular dilemma how does a thread deal with a " +"situation where it is waiting for a specific condition to become true? It " +"could repeatedly lock and unlock a mutex, each time checking a shared data " +"structure for a certain value. But this is a waste of time and resources, " +"and this form of busy polling is extremely inefficient. The best way to do " +"this is to use the pthread_cond_wait() call to wait on a particular " +"condition to become true." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):45 +msgid "" +"It's important to understand what pthread_cond_wait() does -- it's the heart " +"of the POSIX threads signalling system, and also the hardest part to " +"understand." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):50 +msgid "" +"First, let's consider a scenario where a thread has locked a mutex, in order " +"to take a look at a linked list, and the list happens to be empty. This " +"particular thread can't do anything -- it's designed to remove a node from " +"the list, and there are no nodes available. So, this is what it does." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):57 +msgid "" +"While still holding the mutex lock, our thread will call pthread_cond_wait" +"(&mycond,&mymutex). The pthread_cond_wait() call is rather complex, " +"so we'll step through each of its operations one at a time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):63 +msgid "" +"The first thing pthread_cond_wait() does is simultaneously unlock the mutex " +"mymutex (so that other threads can modify the linked list) and wait on the " +"condition mycond (so that pthread_cond_wait() will wake up when it is " +"\"signalled\" by another thread). Now that the mutex is unlocked, other " +"threads can access and modify the linked list, possibly adding items." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):71 +msgid "" +"At this point, the pthread_cond_wait() call has not yet returned. Unlocking " +"the mutex happens immediately, but waiting on the condition mycond is " +"normally a blocking operation, meaning that our thread will go to sleep, " +"consuming no CPU cycles until it is woken up. This is exactly what we want " +"to happen. Our thread is sleeping, waiting for a particular condition to " +"become true, without performing any kind of busy polling that would waste " +"CPU time. From our thread's perspective, it's simply waiting for the " +"pthread_cond_wait() call to return." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):81 +msgid "" +"Now, to continue the explanation, let's say that another thread (call it " +"\"thread 2\") locks mymutex and adds an item to our linked list. Immediately " +"after unlocking the mutex, thread 2 calls the function pthread_cond_broadcast" +"(&mycond). By doing so, thread 2 will cause all threads waiting on the " +"mycond condition variable to immediately wake up. This means that our first " +"thread (which is in the middle of a pthread_cond_wait() call) will now wake " +"up." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):91 +msgid "" +"Now, let's take a look at what happens to our first thread. After thread 2 " +"called pthread_cond_broadcast(&mymutex) you might think that thread 1's " +"pthread_cond_wait() will immediately return. Not so! Instead, " +"pthread_cond_wait() will perform one last operation: relock mymutex. Once " +"pthread_cond_wait() has the lock, it will then return and allow thread 1 to " +"continue execution. At that point, it can immediately check the list for any " +"interesting changes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):104 +msgid "Stop and review!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre:caption):127 +msgid "queue.h" +msgstr "" + +#. These bits do not make any sense to me, commented out +#. +#. <pre caption="queue.h"> +#. pthread_cond_t mycond; +#. </pre> +#. +#. <pre caption="control.h"> +#. pthread_cond_t mycond; +#. +#. pthread_cond_init(&mycond,NULL); +#. +#. pthread_cond_destroy(&mycond); +#. +#. pthread_cond_wait(&mycond, &mymutex); +#. +#. pthread_cond_broadcast(&mycond); +#. +#. pthread_cond_signal(&mycond); +#. </pre> +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre):127 +#, no-wrap +msgid "" +"\n" +"/* queue.h\n" +"<comment>** Copyright 2000 Daniel Robbins, Gentoo Technologies, Inc.\n" +"** Author: Daniel Robbins\n" +"** Date: 16 Jun 2000</comment>\n" +"*/\n" +"typedef struct node {\n" +" struct node *next;\n" +"} node;\n" +"typedef struct queue {\n" +" node *head, *tail; \n" +"} queue;\n" +"void queue_init(queue *myroot);\n" +"void queue_put(queue *myroot, node *mynode);\n" +"node *queue_get(queue *myroot);\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre:caption):144 +msgid "queue.c" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre):144 +#, no-wrap +msgid "" +"\n" +"/* queue.c\n" +"<comment>** Copyright 2000 Daniel Robbins, Gentoo Technologies, Inc.\n" +"** Author: Daniel Robbins\n" +"** Date: 16 Jun 2000\n" +"**\n" +"** This set of queue functions was originally thread-aware. I\n" +"** redesigned the code to make this set of queue routines\n" +"** thread-ignorant (just a generic, boring yet very fast set of queue\n" +"** routines). Why the change? Because it makes more sense to have\n" +"** the thread support as an optional add-on. Consider a situation\n" +"** where you want to add 5 nodes to the queue. With the\n" +"** thread-enabled version, each call to queue_put() would\n" +"** automatically lock and unlock the queue mutex 5 times -- that's a\n" +"** lot of unnecessary overhead. However, by moving the thread stuff\n" +"** out of the queue routines, the caller can lock the mutex once at\n" +"** the beginning, then insert 5 items, and then unlock at the end.\n" +"** Moving the lock/unlock code out of the queue functions allows for\n" +"** optimizations that aren't possible otherwise. It also makes this\n" +"** code useful for non-threaded applications.\n" +"**\n" +"** We can easily thread-enable this data structure by using the\n" +"** data_control type defined in control.c and control.h.</comment> */\n" +"#include <stdio.h>\n" +"#include \"queue.h\"\n" +"void queue_init(queue *myroot) {\n" +" myroot->head=NULL;\n" +" myroot->tail=NULL;\n" +"}\n" +"void queue_put(queue *myroot,node *mynode) {\n" +" mynode->next=NULL;\n" +" if (myroot->tail!=NULL)\n" +" myroot->tail->next=mynode;\n" +" myroot->tail=mynode;\n" +" if (myroot->head==NULL)\n" +" myroot->head=mynode;\n" +"}\n" +"node *queue_get(queue *myroot) {\n" +" //get from root\n" +" node *mynode;\n" +" mynode=myroot->head;\n" +" if (myroot->head!=NULL)\n" +" myroot->head=myroot->head->next;\n" +" return mynode;\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre:caption):191 +msgid "control.h" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre):191 +#, no-wrap +msgid "" +"\n" +"#include <pthread.h>\n" +"typedef struct data_control {\n" +" pthread_mutex_t mutex;\n" +" pthread_cond_t cond;\n" +" int active;\n" +"} data_control;\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre:caption):200 +msgid "control.c" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre):200 +#, no-wrap +msgid "" +"\n" +"/* control.c\n" +"<comment>** Copyright 2000 Daniel Robbins, Gentoo Technologies, Inc.\n" +"** Author: Daniel Robbins\n" +"** Date: 16 Jun 2000\n" +"**\n" +"** These routines provide an easy way to make any type of\n" +"** data-structure thread-aware. Simply associate a data_control\n" +"** structure with the data structure (by creating a new struct, for\n" +"** example). Then, simply lock and unlock the mutex, or\n" +"** wait/signal/broadcast on the condition variable in the data_control\n" +"** structure as needed.\n" +"**\n" +"** data_control structs contain an int called \"active\". This int is\n" +"** intended to be used for a specific kind of multithreaded design,\n" +"** where each thread checks the state of \"active\" every time it locks\n" +"** the mutex. If active is 0, the thread knows that instead of doing\n" +"** its normal routine, it should stop itself. If active is 1, it\n" +"** should continue as normal. So, by setting active to 0, a\n" +"** controlling thread can easily inform a thread work crew to shut\n" +"** down instead of processing new jobs. Use the control_activate()\n" +"** and control_deactivate() functions, which will also broadcast on\n" +"** the data_control struct's condition variable, so that all threads\n" +"** stuck in pthread_cond_wait() will wake up, have an opportunity to\n" +"** notice the change, and then terminate.</comment>\n" +"*/\n" +"#include \"control.h\"\n" +"int control_init(data_control *mycontrol) {\n" +" int mystatus;\n" +" if (pthread_mutex_init(&(mycontrol->mutex),NULL))\n" +" return 1;\n" +" if (pthread_cond_init(&(mycontrol->cond),NULL))\n" +" return 1;\n" +" mycontrol->active=0;\n" +" return 0;\n" +"}\n" +"int control_destroy(data_control *mycontrol) {\n" +" int mystatus;\n" +" if (pthread_cond_destroy(&(mycontrol->cond)))\n" +" return 1;\n" +" if (pthread_mutex_destroy(&(mycontrol->cond)))\n" +" return 1;\n" +" mycontrol->active=0;\n" +" return 0;\n" +"}\n" +"int control_activate(data_control *mycontrol) {\n" +" int mystatus;\n" +" if (pthread_mutex_lock(&(mycontrol->mutex)))\n" +" return 0;\n" +" mycontrol->active=1;\n" +" pthread_mutex_unlock(&(mycontrol->mutex));\n" +" pthread_cond_broadcast(&(mycontrol->cond));\n" +" return 1;\n" +"}\n" +"int control_deactivate(data_control *mycontrol) {\n" +" int mystatus;\n" +" if (pthread_mutex_lock(&(mycontrol->mutex)))\n" +" return 0;\n" +" mycontrol->active=0;\n" +" pthread_mutex_unlock(&(mycontrol->mutex));\n" +" pthread_cond_broadcast(&(mycontrol->cond));\n" +" return 1;\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):268 +msgid "Debug time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):271 +msgid "" +"One more miscellaneous file before we get to the biggie. Here's <path>dbug." +"h</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre:caption):276 +msgid "dbug.h" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre):276 +#, no-wrap +msgid "" +"\n" +"#define dabort() \\\n" +" { printf(\"Aborting at line %d in source file %s\\n\",__LINE__,__FILE__); abort(); }\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):281 +msgid "We use this code to handle unrecoverable errors in our work crew code." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):288 +msgid "The work crew code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):291 +msgid "Speaking of the work crew code, here it is:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre:caption):295 +msgid "workcrew.c>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(pre):295 +#, no-wrap +msgid "" +"\n" +"#include <stdio.h>\n" +"#include <stdlib.h>\n" +"#include \"control.h\"\n" +"#include \"queue.h\"\n" +"#include \"dbug.h\"\n" +"/* <comment>the work_queue holds tasks for the various threads to complete.</comment>*/\n" +"struct work_queue {\n" +" data_control control;\n" +" queue work;\n" +"} wq;\n" +"/* <comment>I added a job number to the work node. Normally, the work node\n" +" would contain additional data that needed to be processed. </comment>*/\n" +"typedef struct work_node {\n" +" struct node *next;\n" +" int jobnum;\n" +"} wnode;\n" +"/* <comment>the cleanup queue holds stopped threads. Before a thread\n" +" terminates, it adds itself to this list. Since the main thread is\n" +" waiting for changes in this list, it will then wake up and clean up\n" +" the newly terminated thread. </comment>*/\n" +"struct cleanup_queue {\n" +" data_control control;\n" +" queue cleanup;\n" +"} cq;\n" +"/* <comment>I added a thread number (for debugging/instructional purposes) and\n" +" a thread id to the cleanup node. The cleanup node gets passed to\n" +" the new thread on startup, and just before the thread stops, it\n" +" attaches the cleanup node to the cleanup queue. The main thread\n" +" monitors the cleanup queue and is the one that performs the\n" +" necessary cleanup.</comment> */\n" +"typedef struct cleanup_node {\n" +" struct node *next;\n" +" int threadnum;\n" +" pthread_t tid;\n" +"} cnode;\n" +"void *threadfunc(void *myarg) {\n" +" wnode *mywork;\n" +" cnode *mynode;\n" +" mynode=(cnode *) myarg;\n" +" pthread_mutex_lock(&wq.control.mutex);\n" +" while (wq.control.active) {\n" +" while (wq.work.head==NULL && wq.control.active) {\n" +" pthread_cond_wait(&wq.control.cond, &wq.control.mutex);\n" +" }\n" +" if (!wq.control.active) \n" +" break;\n" +" //we got something!\n" +" mywork=(wnode *) queue_get(&wq.work);\n" +" pthread_mutex_unlock(&wq.control.mutex);\n" +" //perform processing...\n" +" printf(\"Thread number %d processing job %d\\n\",mynode->threadnum,mywork->jobnum);\n" +" free(mywork);\n" +" pthread_mutex_lock(&wq.control.mutex);\n" +" }\n" +" pthread_mutex_unlock(&wq.control.mutex);\n" +" pthread_mutex_lock(&cq.control.mutex);\n" +" queue_put(&cq.cleanup,(node *) mynode);\n" +" pthread_mutex_unlock(&cq.control.mutex);\n" +" pthread_cond_signal(&cq.control.cond);\n" +" printf(\"thread %d shutting down...\\n\",mynode->threadnum);\n" +" return NULL;\n" +" \n" +"}\n" +"#define NUM_WORKERS 4\n" +"int numthreads;\n" +"void join_threads(void) {\n" +" cnode *curnode;\n" +" printf(\"joining threads...\\n\");\n" +" while (numthreads) {\n" +" pthread_mutex_lock(&cq.control.mutex);\n" +" /* <comment>below, we sleep until there really is a new cleanup node. This\n" +" takes care of any false wakeups... even if we break out of\n" +" pthread_cond_wait(), we don't make any assumptions that the\n" +" condition we were waiting for is true. </comment>*/\n" +" while (cq.cleanup.head==NULL) {\n" +" pthread_cond_wait(&cq.control.cond,&cq.control.mutex);\n" +" }\n" +" /* <comment>at this point, we hold the mutex and there is an item in the\n" +" list that we need to process. First, we remove the node from\n" +" the queue. Then, we call pthread_join() on the tid stored in\n" +" the node. When pthread_join() returns, we have cleaned up\n" +" after a thread. Only then do we free() the node, decrement the\n" +" number of additional threads we need to wait for and repeat the\n" +" entire process, if necessary</comment> */\n" +" curnode = (cnode *) queue_get(&cq.cleanup);\n" +" pthread_mutex_unlock(&cq.control.mutex);\n" +" pthread_join(curnode->tid,NULL);\n" +" printf(\"joined with thread %d\\n\",curnode->threadnum);\n" +" free(curnode);\n" +" numthreads--;\n" +" }\n" +"}\n" +"int create_threads(void) {\n" +" int x;\n" +" cnode *curnode;\n" +" for (x=0; x<NUM_WORKERS; x++) {\n" +" curnode=malloc(sizeof(cnode));\n" +" if (!curnode)\n" +" return 1;\n" +" curnode->threadnum=x;\n" +" if (pthread_create(&curnode->tid, NULL, threadfunc, (void *) curnode))\n" +" return 1;\n" +" printf(\"created thread %d\\n\",x);\n" +" numthreads++;\n" +" }\n" +" return 0;\n" +"}\n" +"void initialize_structs(void) {\n" +" numthreads=0;\n" +" if (control_init(&wq.control))\n" +" dabort();\n" +" queue_init(&wq.work);\n" +" if (control_init(&cq.control)) {\n" +" control_destroy(&wq.control);\n" +" dabort();\n" +" }\n" +" queue_init(&wq.work);\n" +" control_activate(&wq.control);\n" +"}\n" +"void cleanup_structs(void) {\n" +" control_destroy(&cq.control);\n" +" control_destroy(&wq.control);\n" +"}\n" +"int main(void) {\n" +" int x;\n" +" wnode *mywork;\n" +" initialize_structs();\n" +" /* CREATION */\n" +" \n" +" if (create_threads()) {\n" +" printf(\"Error starting threads... cleaning up.\\n\");\n" +" join_threads();\n" +" dabort();\n" +" }\n" +" pthread_mutex_lock(&wq.control.mutex);\n" +" for (x=0; x<16000; x++) {\n" +" mywork=malloc(sizeof(wnode));\n" +" if (!mywork) {\n" +" printf(\"ouch! can't malloc!\\n\");\n" +" break;\n" +" }\n" +" mywork->jobnum=x;\n" +" queue_put(&wq.work,(node *) mywork);\n" +" }\n" +" pthread_mutex_unlock(&wq.control.mutex);\n" +" pthread_cond_broadcast(&wq.control.cond);\n" +" printf(\"sleeping...\\n\");\n" +" sleep(2);\n" +" printf(\"deactivating work queue...\\n\");\n" +" control_deactivate(&wq.control);\n" +" /* CLEANUP */\n" +" join_threads();\n" +" cleanup_structs();\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):455 +msgid "Code walkthrough" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):458 +msgid "" +"Now it's time for a quick code walkthrough. The first struct defined is " +"called \"wq\", and contains a data_control and a queue header. The " +"data_control structure will be used to arbitrate access to the entire queue, " +"including the nodes in the queue. Our next job is to define the actual work " +"nodes. To keep the code lean to fit in this article, all that's contained " +"here is a job number." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):466 +msgid "" +"Next, we create the cleanup queue. The comments explain how this works. OK, " +"now let's skip the threadfunc(), join_threads(), create_threads() and " +"initialize_structs() calls, and jump down to main(). The first thing we do " +"is initialize our structures -- this includes initializing our data_controls " +"and queues, as well as activating our work queue." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):477 +msgid "Cleanup special" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):480 +msgid "" +"Now it's time to initialize our threads. If you look at our create_threads() " +"call, everything will look pretty normal -- except for one thing. Notice " +"that we are allocating a cleanup node, and initializing its threadnum and " +"TID components. We also pass a cleanup node to each new worker thread as an " +"initial argument. Why do we do this?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):488 +msgid "" +"Because when a worker thread exits, it'll attach its cleanup node to the " +"cleanup queue, and terminate. Then, our main thread will detect this " +"addition to the cleanup queue (by use of a condition variable) and dequeue " +"the node. Because the TID (thread id) is stored in the cleanup node, our " +"main thread will know exactly which thread terminated. Then, our main thread " +"will call pthread_join(tid), and join with the appropriate worker thread. If " +"we didn't perform such bookkeeping, our main thread would need to join with " +"worker threads in an arbitrary order, possibly in the order that they were " +"created. Because the threads may not necessarily terminate in this order, " +"our main thread could be waiting to join with one thread while it could have " +"been joining with ten others. Can you see how this design decision can " +"really speed up our shutdown code, especially if we were to use hundreds of " +"worker threads?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):506 +msgid "Creating work" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):509 +msgid "" +"Now that we've started our worker threads (and they're off performing their " +"threadfunc(), which we'll get to in a bit), our main thread begins inserting " +"items into the work queue. First, it locks wq's control mutex, and then " +"allocates 16000 work packets, inserting them into the queue one-by-one. " +"After this is done, pthread_cond_broadcast() is called, so that any sleeping " +"threads are woken up and able to do the work. Then, our main thread sleeps " +"for two seconds, and then deactivates the work queue, telling our worker " +"threads to terminate. Then, our main thread calls the join_threads() " +"function to clean up all the worker threads." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):524 +msgid "threadfunc()" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):527 +msgid "" +"Time to look at threadfunc(), the code that each worker thread executes. " +"When a worker thread starts, it immediately locks the work queue mutex, gets " +"one work node (if available) and processes it. If no work is available, " +"pthread_cond_wait() is called. You'll notice that it's called in a very " +"tight while() loop, and this is very important. When you wake up from a " +"pthread_cond_wait() call, you should never assume that your condition is " +"definitely true -- it will probably be true, but it may not. The while loop " +"will cause pthread_cond_wait() to be called again if it so happens that the " +"thread was mistakenly woken up and the list is empty." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):539 +msgid "" +"If there's a work node, we simply print out its job number, free it, and " +"exit. Real code would do something more substantial. At the end of the while" +"() loop, we lock the mutex so we can check the active variable as well as " +"checking for new work nodes at the top of the loop. If you follow the code " +"through, you'll find that if wq.control.active is 0, the while loop will be " +"terminated and the cleanup code at the end of threadfunc() will begin." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):548 +msgid "" +"The worker thread's part of the cleanup code is pretty interesting. First, " +"it unlocks the work_queue, since pthread_cond_wait() returns with the mutex " +"locked. Then, it gets a lock on the cleanup queue, adds our cleanup node " +"(containing our TID, which the main thread will use for its pthread_join() " +"call), and then it unlocks the cleanup queue. After that, it signals any cq " +"waiters (pthread_cond_signal(&cq.control.cond)) so that the main thread " +"will know that there's a new node to process. We don't use " +"pthread_cond_broadcast() because it's not necessary -- only one thread (the " +"main thread) is waiting for new entries in the cleanup queue. Our worker " +"thread prints a shutdown message, and then terminates, waiting to be " +"pthread_joined() by the main thread when it calls join_threads()." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):565 +msgid "join_threads()" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):568 +msgid "" +"If you want to see a simple example of how condition variables should be " +"used, take a look at the join_threads() function. While we still have worker " +"threads in existence, join_threads() loops, waiting for new cleanup nodes in " +"our cleanup queue. If there is a new node, we dequeue the node, unlock the " +"cleanup queue (so that other cleanup nodes can be added by our worker " +"threads), join with our new thread (using the TID stored in the cleanup " +"node), free the cleanup node, decrement the number of threads \"out there\", " +"and continue." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):581 +msgid "Wrapping it up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(p):584 +msgid "" +"We've reached the end of the \"POSIX threads explained\" series, and I hope " +"that you're now ready to begin adding multithreaded code to your own " +"applications. For more information, please see the <uri link=\"#resources" +"\">Resources</uri> section, which also contains a tarball of all the sources " +"used in this article. I'll see you next series!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(title):597 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):602 +msgid "" +"A <uri link=\"/doc/en/files/l-posix-thread-3.tar.gz\">tarball of the " +"sources</uri> used in this article is available." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):606 +msgid "" +"Read Daniel's POSIX threads explained <uri link=\"l-posix1.xml\">Part 1</" +"uri> and <uri link=\"l-posix2.xml\">Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):610 +msgid "" +"Your friendly Linux pthread man pages (<c>man -k pthread</c>) are an " +"excellent resource." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):614 +msgid "" +"For a thorough treatment of POSIX threads, I recommend this book: <uri link=" +"\"http://search.borders.com/fcgi-bin/db2www/search/search.d2w/Details?&" +"mediaType=Book&prodID=2362607\">Programming with POSIX Threads</uri>, by " +"David R. Butenhof (Addison-Wesley, 1997). This is arguably the best POSIX " +"threads book available." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):621 +msgid "" +"POSIX threads are also covered in this book: <uri link=\"http://search." +"borders.com/fcgi-bin/db2www/search/search.d2w/Details?&" +"mediaType=Book&prodID=2362607\">UNIX Network Programming - Networking " +"APIs: Sockets and XTI</uri>, by W. Richard Stevens (Prentice Hall, 1997). " +"This is a classic book, but it doesn't cover threads in as much detail as " +"does Programming with POSIX Threads, above." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):628 +msgid "" +"See documentation on <uri link=\"http://metalab.unc.edu/pub/Linux/docs/faqs/" +"Threads-FAQ/html/\">Linux threads</uri>, by Sean Walton, KB7rfa." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):633 +msgid "" +"Take a POSIX threads <uri link=\"http://www.math.arizona.edu/swig/pthreads/" +"threads.html\">tutorial</uri> by Mark Hays at the University of Arizona." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):638 +msgid "" +"In <uri link=\"http://hwaci.com/sw/pttcl/pttcl.html\">An Introduction to " +"Pthreads-Tcl</uri>, see changes to Tcl that enable it to be used with POSIX " +"threads." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):643 +msgid "" +"Take another tutorial, <uri link=\"http://dis.cs.umass.edu/~wagner/" +"threads_html/tutorial.html\">Getting Started with POSIX Threads</uri>, by " +"Tom Wagner and Don Towsley of the Computer Science Department at the " +"University of Massachusetts, Amherst." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):649 +msgid "" +"<uri link=\"http://moss.csc.ncsu.edu/~mueller/pthreads/\">FSU PThreads</uri> " +"is a C library that implements POSIX threads for SunOS 4.1.x, Solaris 2.x, " +"SCO UNIX, FreeBSD, Linux, and DOS." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):654 +msgid "" +"Refer to the home page for <uri link=\"http://www.sai.msu.su/sal/C/2/" +"PCTHREADS.html\">POSIX and DCE threads</uri> for Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):659 +msgid "" +"See <uri link=\"http://pauillac.inria.fr/~xleroy/linuxthreads/\">The " +"LinuxThreads library</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(li):663 +msgid "" +"<uri link=\"http://www.users.itl.net.ua/~prool/proolix.html\">Proolix</uri> " +"is a simple POSIX-compliant operating system for i8086+ under permanent " +"development." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-posix3.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-redesign-1.xml.po b/article/gettext/ru/l-redesign-1.xml.po new file mode 100644 index 0000000..52bca22 --- /dev/null +++ b/article/gettext/ru/l-redesign-1.xml.po @@ -0,0 +1,716 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(guide:link):5 +msgid "/doc/en/articles/l-redesign-1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):6 +msgid "The gentoo.org redesign, Part 1: A site reborn" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(abstract):12 +msgid "" +"Have you ever woken up one morning and suddenly realized that your cute " +"little personal development Web site isn't really that great? If so, you're " +"in good company. In this series, Daniel Robbins shares his experiences as he " +"redesigns the www.gentoo.org Web site using technologies like XML, XSLT, and " +"Python. Along the way, you may find some excellent approaches to use for " +"your next Web site redesign. In this article, Daniel creates a user-centric " +"action plan and introduces pytext, an embedded Python interpreter." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(version):27 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(date):28 +msgid "2005-10-10" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):31 +msgid "An unruly horde" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):35 +msgid "" +"Fellow software developer, may I ask you a question? Why is it that although " +"many of us are intimately familiar with Web technologies such as HTML, CGI, " +"Perl, Python, Java technology, and XML, our very own Web sites -- the ones " +"devoted to our precious development projects -- look like they were thrown " +"together by an unruly horde of hyperactive 12-year-olds? Why, oh why, is " +"this so?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):44 +msgid "" +"Could it be because most of the time, we've left our Web site out to rot " +"while we squander our precious time hacking away on our free software " +"projects? The answer, at least in my case, is a most definite \"Yes.\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):50 +msgid "" +"When I'm not writing articles for IBM developerWorks or being a new dad, I'm " +"feverishly working on the next release of Gentoo Linux, along with my " +"skilled team of volunteers. And, yes, Gentoo Linux has its own Web site (see " +"Resources). As of right now (March 2001), our Web site isn't that special; " +"that's because we don't spend much time working on it because we're " +"generally engrossed in improving Gentoo Linux itself. Sure, our site does " +"have several admittedly cute logos that I whipped up using Xara X (see " +"Resources), but when you look past the eye candy, our site leaves a lot to " +"be desired. Maybe yours does too. If so, I have one thing to say to you -- " +"welcome to the club." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):67 +msgid "www.gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):71 +msgid "" +"In our case, our Web site dilemma exists because our project has been " +"growing, and our Web site hasn't. Now that Gentoo Linux is approaching the " +"1.0 release (when it'll be officially ready for non-developers) and is " +"growing in popularity, we need to start seriously looking at how our Web " +"site can better serve its users. Here's a snapshot of www.gentoo.org:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(figure:link):80 +msgid "/images/docs/l-redesign-01.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(figure:caption):80 +msgid "The current (March 2001) state of affairs at www.gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):82 +msgid "" +"As you can see, we have all the bare essentials -- a description of Gentoo " +"Linux, a features list, a daily Changelog (automatically updated thanks to " +"Python), and a bunch of important links (to the download sites, to our " +"mailing list sign-up pages, and to cvsWeb). We also have links to three " +"documentation resources -- the Gentoo Linux Install Guide and Development " +"Guides, and Christian Zander's NVIDIA Troubleshooting Guide." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):91 +msgid "" +"However, while the site seems O.K., we're missing a lot of things. The most " +"obvious is documentation -- our installation and development guides need a " +"lot of work. And then we need to add an FAQ, new links, new user " +"information...the list is endless." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):101 +msgid "Content vs. display" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):104 +msgid "" +"And now we come to our second problem. Right now, all of our work is done in " +"raw HTML; I hack away at the index.html file until it looks O.K. Even worse, " +"our Web documentation is written in raw HTML. This isn't a good thing from a " +"development perspective because our raw content (consisting of paragraphs, " +"sections, chapters) is garbled together with a bunch of display-related HTML " +"tags. This, of course, makes it difficult to change both the content and the " +"look of our site. While this approach has worked so far, it is bound to " +"cause problems as our site continues to grow." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):115 +msgid "" +"Clearly, we need to be using better technologies behind the scenes. Instead " +"of using HTML directly, we need to start using things like XML, XSLT, and " +"Python. The goal is to automate as much as possible so that we can add and " +"expand our site with ease. If we do our job well, even major future changes " +"to our site should be relatively painless." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):126 +msgid "A strategy!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):129 +msgid "" +"It was clear that we had a lot of work ahead of us. In fact, there was so " +"much to be done that I didn't know where to begin. Just as I was trying to " +"sort out everything in my head, I came across Laura Wonnacott's \"Site Savvy" +"\" InfoWorld column (see <uri link=\"#resources\">Resources</uri>). In it, " +"she explained the concept of \"user-centric\" design -- how to improve a Web " +"site while keeping the needs of your target audience (in this case, Gentoo " +"Linux users and developers) in focus. Reading the article and taking a look " +"at the \"Handbook of User-Centered Design\" link from the article helped me " +"to formulate a strategy -- an action plan -- for the redesign:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):142 +msgid "" +"First, clearly define the official goal of the Web site -- in writing. " +"What's it there for, and what's it supposed to do?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):146 +msgid "" +"Identify the different categories of users who will be using your site -- " +"your target audience. Rank them in order of priority: Which ones are most " +"important to you?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):151 +msgid "" +"Set up a system for getting feedback from your target audience, so they can " +"let you know what you're doing right and wrong." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):155 +msgid "" +"Evaluate the feedback, and use it to determine what parts of the site need " +"to be improved or redesigned. Tackle high-priority sections first." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):159 +msgid "" +"Once you've selected the part of the site to improve, get to work! During " +"your implementation, make sure that the content and design of the new " +"section caters specifically to the needs of your target audience and fixes " +"all known deficiencies." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):165 +msgid "" +"When the section redesign is complete, add it to your live site, even if it " +"has a look that's markedly different from your current site. This way, your " +"users can begin benefitting from the newly redesigned section immediately. " +"If there's a problem with the redesign, you'll get user feedback more " +"quickly. Finally, making incremental improvements to your site (rather than " +"revamping the whole site and then rolling it out all at once -- surprise!) " +"will help prevent your users from feeling alienated by your (possibly " +"dramatic) site changes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):175 +msgid "After completing step 6, jump to step 4 and repeat." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):181 +msgid "The mission statement" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):184 +msgid "" +"I was happy to discover that we already had step 3 in place. We had received " +"several e-mail suggestions from visitors to the site, and our developer " +"mailing list also served as a way of exchanging suggestions and comments. " +"However, I had never really completed steps 1 or 2. While the answers may " +"seem obvious, I did find it helpful to actually sit down and write out our " +"mission statement:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):192 +msgid "" +"www.gentoo.org exists to assist those who use and develop for Gentoo Linux " +"by providing relevant, up-to-date information about Gentoo Linux and Linux " +"in general, focusing on topics related to Gentoo Linux installation, use, " +"administration, and development. As the central hub for all things Gentoo, " +"the site should also feature important news relevant to Gentoo Linux users " +"and developers. In addition to catering to Gentoo Linux users and " +"developers, www.gentoo.org has the secondary purpose of meeting the needs of " +"potential Gentoo Linux users, providing the information they need to decide " +"whether Gentoo Linux is right for them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):207 +msgid "The target audience" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):210 +msgid "So far, so good. Now for step 2 -- defining our target audience:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):214 +msgid "" +"www.gentoo.org has three target audiences -- Gentoo Linux developers, users, " +"and potential users. While no one group is absolutely a higher priority than " +"another, right now the needs of Gentoo Linux developers are our highest " +"priority, followed by Gentoo Linux users, and then potential users. This is " +"because Gentoo Linux is currently in a prerelease state. When Gentoo Linux " +"reaches version 1.0, Gentoo Linux users and potential users will also become " +"a priority." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):227 +msgid "Comments and suggestions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):230 +msgid "" +"O.K., now it's time to evaluate the suggestions and comments we've collected:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):234 +msgid "" +"Over the past few months, we've received a number of suggestions from Web " +"site visitors. Overwhelmingly, people are requesting better documentation -- " +"for both developers and users. Several developers have asked if we could " +"create a mailing list that would be devoted exclusively to describing CVS " +"commits." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):241 +msgid "" +"Interestingly, we've also received a couple of e-mails asking whether Gentoo " +"Linux is a commercial or free product. I'm guessing that because our main " +"logo is inscribed with the name \"Gentoo Technologies, Inc.\" (our legal " +"corporation name), people assume that we have a commercial focus. Modifying " +"our logo so that it reads \"Gentoo Linux\" and adding small opening " +"paragraph to the main page explaining that we are a free software project " +"should help." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):253 +msgid "The improvement list" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):256 +msgid "" +"O.K., now let's turn these suggestions into a list of possible improvements:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):263 +msgid "Implementation: update logo and add free software blurb" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):264 +msgid "Goal: to clearly state that we are a free software project" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):265 +msgid "Target group: potential users" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):266 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):274 +msgid "Difficulty: medium" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):261 +msgid "Revamp main page <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):271 +msgid "Implementation: new XML/XSLT system, verbose documentation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):272 +msgid "Goal: to make it easier for users to install Gentoo Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):273 +msgid "Target group: new users" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):269 +msgid "Improve basic user documentation <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):279 +msgid "" +"Implementation: new XML/XSLT system, CVS guide, dev guide, Portage guide" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):280 +msgid "Goal: to help our developers to do a great job" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):281 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):289 +msgid "Target group: developers" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):282 +msgid "Difficulty: hard" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):277 +msgid "Improve/create developer documentation <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):287 +msgid "Implementation: use our existing mailman mailing list manager" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):288 +msgid "Goal: to better inform our developers" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):290 +msgid "Difficulty: easy" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):285 +msgid "Add a CVS mailing list <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):298 +msgid "A selection!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):301 +msgid "" +"Two things leap out from the list, for different reasons. The first is the " +"CVS mailing list -- this one is a no-brainer because it's so easy to " +"implement. Often, it makes sense to implement the easiest changes first so " +"that users can benefit from them right away." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):308 +msgid "" +"The second big thing that leaps out from the list is the need for developer " +"documentation. This is a longer-term project that will require much more " +"work. From my conversations with the other developers, we all appear to be " +"in agreement that some kind of XML/XSL approach is the right solution." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):318 +msgid "The XML/XSL prototype" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):321 +msgid "" +"To help start the process, I developed a prototype XML syntax to be used for " +"all our online documentation. By using this XML syntax (called \"guide\"), " +"our documentation will be clearly organized into paragraphs, sections, and " +"chapters (using XML tags like <section>, <chapter>, etc.) while " +"remaining free of any display-related tags. To create the HTML for display " +"on our site, I created a prototype set of XSL transforms. By using an XSLT " +"processor such as Sablotron, our guide XML files can be converted into HTML " +"as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre:caption):331 +msgid "Converting guide XML files to HTML" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre):331 +#, no-wrap +msgid "" +"\n" +"devguide.xml + guide.xsl ---XSLT processor---> devguide.html\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):335 +msgid "" +"The great thing about this XML/XSLT approach is that it separates our raw " +"content (XML) from the display-related information contained in the guide." +"xsl (XSLT) file. If we ever need to update the look of our Web pages, we " +"simply modify the guide.xsl file and run all our XML through the XSLT " +"processor (Sablotron), creating updated HTML pages. Or, if we need to add a " +"few chapters to the development guide, we can modify devguide.xml. Once " +"we're done, we then run the XML through Sablotron, which then spits out a " +"fully-formatted devguide.html file with several added chapters. Think of XML " +"as the content and XSLT as the display-related formatting macros." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):347 +msgid "" +"While our entire team is convinced that XML/XSLT is the way to go, we " +"haven't yet agreed upon an official XML syntax. Achim, our development lead, " +"suggested that we use docbook instead of rolling our own XML syntax. " +"However, the prototype guide XML format has helped to start the decision-" +"making process. Because we developers are going to be the ones using the XML/" +"XSL on a daily basis, it's important to choose a solution that we're " +"comfortable with and meets all of our needs. By my next article, I should " +"have a working XML/XSL doc system to show off to you." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):361 +msgid "Technology demo: pytext" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):364 +msgid "" +"For the most part, our current Web site isn't using any new or super-cool " +"technologies that are worth mentioning. However, there's one notable " +"exception -- our tiny pytext embedded Python interpreter." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):370 +msgid "" +"Like many of you, I'm a huge Python fan and much prefer it over other " +"scripting languages, so when it came time to add some dynamic content to our " +"Web site, I naturally wanted to use Python. And, as you probably know, when " +"coding dynamic HTML content, it's usually much more convenient to embed the " +"language commands inside the HTML, rather than the other way around. Thus, " +"the need for an embedded Python interpreter that can take a document like " +"this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre:caption):379 +msgid "Source document" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre):379 +#, no-wrap +msgid "" +"\n" +"<p>\n" +"Yeah, sure; I got some questions:<br>\n" +"<!--code\n" +"names=[\"bob\",\"jimmy\",\"ralph\"]\n" +"items=[\"socks\",\"lunch\",\"accordion\"]\n" +"for x in items:\n" +"for y in names:\n" +"print \"Anyone seen\",y+\"'s\",x+\"?<br>\"\n" +"-->\n" +"See, told you so.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):392 +msgid "....and transform it into this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre:caption):396 +msgid "Target document" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre):396 +#, no-wrap +msgid "" +"\n" +"<p>\n" +"Yeah, sure; I got some questions:<br>\n" +"Anyone seen bob's socks?<br>\n" +"Anyone seen jimmy's socks?<br>\n" +"Anyone seen ralph's socks?<br>\n" +"Anyone seen bob's lunch?<br>\n" +"Anyone seen jimmy's lunch?<br>\n" +"Anyone seen ralph's lunch?<br>\n" +"Anyone seen bob's accordion?<br>\n" +"Anyone seen jimmy's accordion?<br>\n" +"Anyone seen ralph's accordion?<br>\n" +"See, told you so.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):411 +msgid "Here's the source code for pytext:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre:caption):415 +msgid "The pytext embedded Python interpreter" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre):415 +#, no-wrap +msgid "" +"\n" +"#!/usr/bin/env python\n" +"\n" +"# pytext 2.1\n" +"# Copyright 1999-2001 Daniel Robbins\n" +"# Distributed under the GPL\n" +"\n" +"import sys\n" +"\n" +"def runfile(myarg):\n" +" \"interprets a text file with embedded elements\"\n" +" mylocals={}\n" +" try:\n" +" a=open(myarg,'r')\n" +" except IOError:\n" +" sys.stderr.write(\"!!! Error opening \"+myarg+\"!\\n\")\n" +" return\n" +" mylines=a.readlines()\n" +" a.close()\n" +" pos=0\n" +" while pos<len(mylines):\n" +" if mylines[pos][0:8]==\"<!--code\":\n" +" mycode=\"\"\n" +" pos=pos+1\n" +" while (pos<len(mylines)) and (mylines[pos][0:3]!=\"-->\"):\n" +" mycode=mycode+mylines[pos]\n" +" pos=pos+1\n" +" exec(mycode,globals(),mylocals)\n" +" else:\n" +" sys.stdout.write(mylines[pos])\n" +" pos=pos+1\n" +"\n" +"if len(sys.argv)>1:\n" +" for x in sys.argv[1:]:\n" +" runfile(x)\n" +" sys.exit(0)\n" +"else:\n" +" sys.stderr.write\n" +" (\"pytext 2.1 -- Copyright 1999-2001 Daniel Robbins. \")\n" +" sys.stderr.write\n" +" (\"Distributed under the\\nGNU Public License\\n\\n\")\n" +" sys.stderr.write\n" +" (\"Usage: \"+sys.argv[0]+\" file0 [file1]...\\n\")\n" +" sys.exit(1)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):464 +msgid "How pytext works" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):467 +msgid "" +"Here's how it works. It scans each input line, and most of the time, each " +"input line is simply echoed to stdout. However, if pytext encounters a line " +"beginning with <!--code, then the contents of every line up to the first " +"line beginning with --> are appended to a string called mycode. Pytext " +"then executes the mycode string using the built-in exec() function, " +"effectively creating an embedded Python interpreter." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):476 +msgid "" +"There's something really beautiful about this particular implementation -- " +"we call exec() in such a way that all modifications to the global and local " +"namespaces are saved. This makes it possible to import a module or define a " +"variable in one embedded block, and then access this previously-created " +"object in a later block, as this example clearly demonstrates:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre:caption):484 +msgid "Sample code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre):484 +#, no-wrap +msgid "" +"\n" +"<!--code\n" +"import os\n" +"foo=23\n" +"-->\n" +"\n" +"Hello\n" +"\n" +"<!--code\n" +"print foo\n" +"if os.path.exists(\"/tmp/mytmpfile\"):\n" +"print \"it exists\"\n" +"else:\n" +"print \"I don't see it\"\n" +"-->\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):501 +msgid "" +"Handy, eh? pytext serves is an excellent demonstration of the power of " +"Python, and is an extremely useful tool for Python fans. For our current " +"site, we call pytext from a cron job, using it to periodically generate the " +"HTML code for our main page Changelog:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre:caption):508 +msgid "Generating the HTML code for main page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(pre):508 +#, no-wrap +msgid "" +"\n" +"pytext index.ehtml > index.html\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(p):512 +msgid "" +"That's it for now; I'll see you next time when we'll take a look at the " +"first stage of the www.gentoo.org redesign!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(title):522 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):531 +msgid "" +"In <uri link=\"/doc/en/articles/l-redesign-2.xml\">Part 2</uri>, Daniel " +"shows off the new documentation system and sets up a daily CVS-log mailing " +"list (May 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):536 +msgid "" +"In <uri link=\"/doc/en/articles/l-redesign-3.xml\">Part 3</uri>, he creates " +"a new look for the site (July 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):540 +msgid "" +"In <uri link=\"/doc/en/articles/l-redesign-4.xml\">Part 4</uri>, Daniel " +"completes the conversion to XML/XSLT, fixes a host of Netscape 4.x browser " +"compatibility bugs, and adds an auto-generated XML Changelog to the site " +"(Aug 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):527 +msgid "" +"Read the other articles in this developerWorks series about the redesign of " +"the www.gentoo.org Web site using technologies like XML, XSLT, and Python: " +"<placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):548 +msgid "" +"If you haven't started using Python yet, you're only hurting yourself. Find " +"it at <uri>http://www.python.org</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):552 +msgid "" +"Laura Wonnacott's <uri link=\"http://www.infoworld.com/articles/op/" +"xml/01/03/05/010305opsavvy.xml\">Site Savvy</uri> column appears regularly " +"on InfoWorld.com." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):557 +msgid "" +"Check out <uri link=\"http://www.xara.com/\">Xara.com</uri>, the home of " +"Xara X -- an excellent vector drawing package for Windows. With virtually no " +"bloat and blazing speed, it has my personal recommendation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):562 +msgid "Learn more about XSLT at <uri>http://www.xslt.com</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(li):563 +msgid "" +"When you wake up, check out Sablotron, a fast XSLT processor available from " +"<uri link=\"http://www.gingerall.com\">Gingerall</uri>" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-redesign-2.xml.po b/article/gettext/ru/l-redesign-2.xml.po new file mode 100644 index 0000000..f452635 --- /dev/null +++ b/article/gettext/ru/l-redesign-2.xml.po @@ -0,0 +1,491 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(guide:link):5 +msgid "/doc/en/articles/l-redesign-2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):6 +msgid "The gentoo.org redesign, Part 2: A site reborn" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(abstract):12 +msgid "" +"Have you ever woken up in the morning to the realization that your personal " +"development Web site isn't really that great? If so, you're in good company. " +"In this series, Daniel Robbins shares his experiences as he redesigns the " +"www.gentoo.org Web site using technologies like XML, XSLT, and Python. Along " +"the way, you may find some excellent approaches to use in your next Web site " +"redesign. In this, the second installment, Daniel shows off the new " +"documentation system and sets up a daily CVS-log mailing list." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(version):27 +msgid "1.0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(date):28 +msgid "2005-10-10" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):31 +msgid "The doc system" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):35 +msgid "" +"If you've read the <uri link=\"/doc/en/articles/l-redesign-1.xml\">first " +"installment</uri> of my series on the gentoo.org redesign, then you know " +"that I'm the Chief Architect of Gentoo Linux, making me responsible for the " +"Gentoo Linux Web site. And right now, the site leaves a lot to be desired. " +"Yes, it does look somewhat attractive, but when you look beyond the cute " +"graphics you will see that it really doesn't serve the needs of its primary " +"target audience: Gentoo Linux developers, users, and potential users." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):45 +msgid "" +"Last time, I used a user-centric design approach to create a set of " +"priorities for the site, and then used these priorities to create an action " +"plan for revamping gentoo.org. Two things were at the top of the priority " +"list: new developer documentation and a new mailing list to communicate to " +"developers changes made to our CVS repository. While adding the new CVS " +"mailing list was relatively easy (though, as you will see, it was more " +"difficult than I thought), the new developer documentation required a lot of " +"planning and work." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):55 +msgid "" +"Not only did I need to create some actual documentation (a task that I had " +"been ignoring for too long), but I also had to choose an official XML syntax " +"that our new master documentation would use. You see, until a few weeks ago, " +"I was creating the documentation in raw HTML. This was definitely a naughty " +"thing to do, because by doing this content was being mixed (the actual " +"information) with presentation (the display-related HTML tags). And what did " +"I end up with? An inflexible mess, that's what. It was hard to edit the " +"actual documentation and extremely difficult to make site-wide HTML " +"improvements." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):66 +msgid "" +"In this article, I'll proudly demonstrate the site's new flexible XML " +"documentation solution. But first, I'll recap my experiences in adding the " +"CVS log mailing list to our site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):75 +msgid "Adding the CVS log mailing list" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):78 +msgid "" +"The goal of the CVS log mailing list is to inform developers of new commits " +"made to our CVS repository. Since I already had the mailman mailing list " +"manager (see <uri link=\"#resources\">Resources</uri>) installed, I thought " +"that creating this new list would be easy. First, I would simply create the " +"mailing list, then add the proper \"hook\" to the CVS repository so that e-" +"mails would be automatically generated and sent out, describing the changes " +"to our sources as they happened." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):88 +msgid "" +"I first started researching a special file in my repository's CVSROOT called " +"\"loginfo.\" Theoretically, by modifying this file, I could instruct CVS to " +"execute a script when any commit (and thus, modification) was made to the " +"repository. So I created a special loginfo script and plugged it into my " +"existing repository. And it did indeed send out e-mails to the new \"gentoo-" +"cvs\" mailing list whenever modifications were made to our sources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):97 +msgid "" +"Unfortunately, this solution wasn't all I'd hoped it would be. First of all, " +"it generated lots of e-mail messages -- one for each modified file -- and " +"secondly, the messages were cryptic and sometimes even empty! I quickly " +"removed my loginfo script and put the gentoo-cvs mailing list project on " +"hold. It was clear that CVS's loginfo hook wasn't appropriate for my needs, " +"and I had a hard time tracking down any loginfo-related documentation that " +"could help me solve my problem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):110 +msgid "cvs2cl.pl" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):113 +msgid "" +"Several weeks later I started looking for an alternative to loginfo. This " +"time I did the smart thing and headed over to <uri>http://freshmeat.net</" +"uri>. There I quickly found just what I was looking for: the incredibly " +"wonderful <path>cvs2cl.pl</path> perl script available from <uri>http://red-" +"bean.com</uri> (see <uri link=\"#resources\">Resources</uri>). Instead of " +"using the loginfo hook, <path>cvs2cl.pl</path> uses the <c>cvs log</c> " +"command to connect directly to the repository and extract the appropriate " +"relevant log information. Also, rather than spitting out relatively cryptic " +"CVS log messages, it does a great job of reformatting everything into a " +"readable ChangeLog format:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(pre:caption):126 +msgid "Output generated by cvs2cl.pl" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(pre):126 +#, no-wrap +msgid "" +"\n" +"2001-04-09 20:58 drobbins\n" +" * app-doc/gentoo-web/files/xml/dev.xml: new fixes\n" +"2001-04-09 20:47 drobbins\n" +" * app-doc/gentoo-web/: gentoo-web-1.0.ebuild, \n" +" files/pyhtml/index.pyhtml, files/xml/gentoo-howto.xml: new gentoo-howto\n" +" fixes\n" +"2001-04-09 20:03 drobbins\n" +" * app-doc/gentoo-web/files/xml/dev.xml: typo fix\n" +"2001-04-09 20:02 drobbins\n" +" * app-doc/gentoo-web/files/pyhtml/index.pyhtml: little update\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):139 +msgid "" +"<path>cvs2cl.pl</path> can also be instructed to generate output in XML " +"format, and in my next article I'll take advantage of this by incorporating " +"an up-to-date ChangeLog into the new developer section of our site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):148 +msgid "The cvslog.sh script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):151 +msgid "" +"Here's the script I now use to generate the daily ChangeLog e-mails. First, " +"it changes the current working directory to the location of my checked-out " +"CVS repository. Then, it creates $yesterday and $today environment variables " +"that contain the appropriate dates in RFC 822 format. Notice that both date " +"variables have the time set to either \"00:00\" or midnight. These variables " +"are, in turn, used to create a $cvsdate variable that is then passed to " +"cvs2cl.pl to specify the date range that I'm interested in -- the span of " +"time from yesterday at midnight to today at midnight. Thus, the $cvsdate " +"variable contains a datespec that informs <path>cvs2cl.pl</path> to log only " +"changes made yesterday, but not others." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):164 +msgid "" +"In addition, I also created a $nicedate variable (used in the mail subject " +"line) and use the mutt mailer (in mailx compatibility mode [see Resources]) " +"to send the e-mail to the gentoo-cvs mailing list:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(pre:caption):170 +msgid "cvslog.sh script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(pre):170 +#, no-wrap +msgid "" +"\n" +"#!/bin/bash\n" +"cd /usr/portage\n" +"cvs -q update -dP\n" +"yesterday=`date -d \"1 day ago 00:00\" -R`\n" +"today=`date -d \"00:00\" -R`\n" +"cvsdate=-d\\'${yesterday}\\<${today}\\'\n" +"nicedate=`date -d yesterday +\"%d %b %Y %Z (%z)\"`\n" +"/home/drobbins/gentoo/cvs2cl.pl -f /home/drobbins/gentoo/cvslog.txt -l \"${cvsdate}\" \n" +"mutt -x gentoo-cvs -s \"cvs log for $nicedate\" <\\\n" +"/home/drobbins/gentoo/cvslog.txt\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):183 +msgid "" +"Using cron, I run this script every night at midnight. Thanks to " +"<path>cvs2cl.pl</path>, my developers now get accurate and readable daily " +"CVS updates." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):192 +msgid "The documentation project" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):195 +msgid "" +"Now, for the Gentoo Linux documentation project. Our new documentation " +"system involves two groups of people or target audiences: the documentation " +"creators and the documentation readers. The creators need a well-designed " +"XML syntax that doesn't get in their way; the readers, who couldn't care " +"less about the XML, want generated HTML documentation that is both " +"functional and attractive. The implementation challenge is to put together a " +"complete system that addresses the needs of both audiences. Oh, and I " +"suppose there is a third \"audience\" -- me, the webmaster and the person " +"designing the new system. Since I'm going to be interacting with the new doc " +"system whenever the site is upgraded, I need it to be reliable and flexible." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):211 +msgid "The Web-ready HTML" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):214 +msgid "" +"First, let's talk a bit about the Web-ready HTML that'll be generated from " +"my master XML files. To make great, readable documentation, I'll need to " +"have support for the proper XML tags. For example, the ability to insert " +"notes, important messages, and warnings into the body of the document (and " +"have them prominently displayed in the resultant HTML) is a must. Also, I " +"must be able to insert blocks of code, and it would be great if actual user " +"input could somehow be offset from program output. I could even add tags " +"that highlight the source code comments in an alternate color so that the " +"code blocks are more readable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):225 +msgid "" +"The documents should have a table of contents (with hyperlinks to the " +"appropriate chapters), a synopsis, a revision date, version, and an authors " +"list at the top of the document. And, of course, every document should have " +"a header at the extreme top of the page containing a small Gentoo Linux " +"logo. Clicking on this logo should bring you back to the main Gentoo Linux " +"page. Last but not least, every document should have a footer that contains " +"copyright information, along with a contact e-mail address." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):238 +msgid "The spiffy new logo" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):241 +msgid "" +"This was a hefty list of requirements, and I decided to focus on the most " +"entertaining part first, the new Gentoo Linux logo that would appear in the " +"upper-left corner of every Gentoo Linux document. I used the \"g\" from the " +"\"gentoo\" graphic (created using the excellent and free Blender 3D program) " +"on our main page as the basis for the new smaller logo. I tweaked the " +"extrusion settings a bit and then added a chrome environment map. Finally, I " +"positioned the lights and camera just so, and the new logo was complete. " +"After importing it into Xara X (see <uri link=\"#resources\">Resources</" +"uri>) and adding some text, this was the result:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(figure:link):254 +msgid "/images/docs/l-redesign-02.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(figure:caption):254 +msgid "The new Gentoo Linux logo" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):256 +msgid "" +"I used this new logo as inspiration for the rest of the HTML color scheme, " +"using a purplish theme throughout. I made heavy use of cascading style " +"sheets (CSS) to control font attributes and spacing. Once I had a decent " +"HTML prototype in place, I started focusing on the guts of the new " +"documentation -- the new XML syntax. I wanted the syntax to be as simple as " +"possible, so I created just enough XML tags to allow for the proper " +"organization of the document, but no more. Then I started working on the " +"XSLT to transform the XML into the target HTML." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):270 +msgid "The result!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):273 +msgid "" +"After much tweaking and a good amount of feedback from one of my developers, " +"the new documentation system reached the point where it was ready for use. I " +"immediately began work on our first new development guide, \"The Gentoo " +"Linux Documentation Guide\" (xml-guide.html), which contains a complete " +"description of the new XML format. Not only did this allow other developers " +"to begin work on the new-style documentation, but it also served as an " +"excellent example of the new documentation system in action. Be sure to read " +"this guide to get a complete understanding of our new XML syntax." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):287 +msgid "DocBook vs. Guide" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):290 +msgid "" +"If you're working on your own documentation solution, you may also want to " +"consider the DocBook XML and SGML formats (see Resources). DocBook is well-" +"suited for large-scale technical documentation and book projects, is very " +"flexible, and has many (maybe too many) features. In addition, there are a " +"number of existing packages that can be used to convert DocBook XML/SGML to " +"man pages, texinfo files, Postscript, PDF, and, of course, HTML formats." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):299 +msgid "" +"I <e>didn't</e> choose DocBook because a lightweight XML syntax worked best " +"for Gentoo's needs. Right now, our XML guide syntax has around 20 tags and " +"about 10 attributes. The limited tagset makes guide XML easy to transform " +"into other formats such as HTML, and also ensures a certain level of " +"consistency throughout our entire documentation set, since the format is so " +"simple. Because I have my own XML format, I'll be able to extend the format " +"with new tags as needed. I like having that level of control. I view XML as " +"a technology that should be used by people to structure their data in ways " +"that they find most helpful. In other words, the ability to define our own " +"elements and attributes is a precious thing, and I should take full " +"advantage of it. After all, it's the defining feature of XML." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):313 +msgid "" +"Of course, creating your own XML syntax is not always the best solution, " +"especially when data interchange is important to you. Amid all the XML hype, " +"one thing that is often overlooked is that <e>conversion to and from " +"different XML formats can be extremely difficult</e>. In many cases, the two " +"formats won't be 100% compatible, and you'll have the unpleasant choice of " +"either throwing away data and/or metadata, intentionally avoiding use of " +"certain elements or attributes, or creating a \"super-format\" that will " +"accommodate the data and metadata from both XML formats. In the " +"documentation world, DocBook is a pretty good choice as a \"super-format\" " +"because it's so flexible; it can easily accommodate documentation imported " +"from a variety of sources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):326 +msgid "" +"However, DocBook's richness and flexibility can also create problems. For " +"example, there may be hundreds of tags that you may never need, and " +"supporting all these tags in your XSLT can make conversion to other formats " +"more difficult. So, while DocBook is a great container for documentation " +"converted from other formats, your own minimal XML syntax will almost always " +"be easier to convert to other formats." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):335 +msgid "" +"The most important thing is to carefully evaluate any potential solution " +"while keeping the needs of your target audience(s) in mind." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):343 +msgid "Wrapping it up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(p):346 +msgid "" +"With the new doc system in place, I converted all our docs to the new format " +"and posted the new docs on our existing site. In addition, I created a link " +"to the gentoo-cvs mailing list subscription page. The key point here is that " +"I integrated these features into the existing site so that users could " +"benefit from the improvements right away." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(title):359 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):368 +msgid "" +"In <uri link=\"/doc/en/articles/l-redesign-1.xml\">Part 1</uri>, the author " +"creates a user-centric action plan and introduces pytext, an embedded Python " +"interpreter (March 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):373 +msgid "" +"In <uri link=\"/doc/en/articles/l-redesign-3.xml\">Part 3</uri>, he creates " +"a new look for the site (July 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):377 +msgid "" +"In <uri link=\"/doc/en/articles/l-redesign-4.xml\">Part 4</uri>, Daniel " +"completes the conversion to XML/XSLT, fixes a host of Netscape 4.x browser " +"compatibility bugs, and adds an auto-generated XML Changelog to the site " +"(Aug 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):364 +msgid "" +"Read the other articles in this developerWorks series about the redesign of " +"the www.gentoo.org Web site using technologies like XML, XSLT, and Python: " +"<placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):385 +msgid "" +"If you haven't started using <uri link=\"http://www.python.org\">Python</" +"uri> yet, you're only hurting yourself. Go check it out." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):389 +msgid "" +"<uri link=\"http://www.xara.com/\">Xara.com</uri> is the home of Xara X -- " +"an excellent vector drawing package for Windows. With virtually no bloat and " +"blazing speed, it has my personal recommendation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):394 +msgid "Learn more about <uri link=\"http://www.xslt.com\">XSLT</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):395 +msgid "" +"When you wake up, check out Sablotron, a fast XSLT processor available from " +"<uri link=\"http://www.gingerall.com\">Gingerall</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):399 +msgid "" +"You can find the wonderful <uri link=\"http://www.red-bean.com/cvs2cl/" +"\">cvs2cl.pl</uri> CVS-to-ChangeLog script at <uri link=\"http://www.red-" +"bean.com/\">Red-Bean</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):404 +msgid "Learn more about DocBook at <uri>http://www.docbook.org</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):405 +msgid "" +"If you're looking for a great mailing list manager, be sure to take a look " +"at <uri link=\"http://www.list.org/\">Mailman</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(li):409 +msgid "" +"Check out <uri link=\"http://www.mutt.org\">www.mutt.org</uri> for the most " +"current version of the Mutt e-mail client." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-redesign-3.xml.po b/article/gettext/ru/l-redesign-3.xml.po new file mode 100644 index 0000000..48d103a --- /dev/null +++ b/article/gettext/ru/l-redesign-3.xml.po @@ -0,0 +1,534 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(guide:link):5 +msgid "/doc/en/articles/l-redesign-3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):6 +msgid "The gentoo.org redesign, Part 3: A site reborn" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(abstract):12 +msgid "" +"Have you ever woken up one morning and suddenly realized that your cute " +"little personal development Web site isn't really that great? If so, you're " +"in good company. In this series, Daniel Robbins shares his experiences as he " +"redesigns the www.gentoo.org Web site using technologies like XML, XSLT, and " +"Python. Along the way, you may find some excellent approaches to use for " +"your next Web site redesign. In this installment, Daniel creates a new look " +"for the site as a whole." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(version):27 +msgid "1.0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(date):28 +msgid "2005-10-10" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):31 +msgid "The new main pages" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):33 +msgid "The site so far" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):36 +msgid "" +"So far, www.gentoo.org is showing marked improvement. In the <uri link=\"/" +"doc/en/articles/l-redesign-2.xml\">last article</uri>, I designed a new " +"documentation system using XML and XSLT, so all our site documentation is " +"looking great and is serving the needs of our visitors. However, the look of " +"the site as a whole hasn't changed; that's because I haven't really touched " +"the HTML that users see when they initially visit our site. Our main page " +"still looks the same as it did before." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):46 +msgid "" +"Well, it's time for that to change. As I mentioned in the <uri link=\"/doc/" +"en/articles/l-redesign-1.xml\">first article</uri>, our main page is getting " +"too congested and we have no room for expansion. As you can see, I've packed " +"quite a bit of content into <uri link=\"/images/docs/l-redesign-13.gif\">the " +"page</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):54 +msgid "" +"I can't continue piling important links and paragraphs onto the main page -- " +"there isn't any room! Fortunately for us, real estate on the Web is " +"absolutely free." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):60 +msgid "" +"So, to solve this problem, I'll split our single main page (index.html) into " +"several subject-specific category pages (index-about.html, index-download." +"html, etc.) and create a menu system that will allow the user to easily move " +"from one category page to another. The default page that loads when a user " +"visits <b>http://www.gentoo.org</b> will be the \"About Gentoo Linux\" " +"category page. This is an excellent choice because it provides general " +"information about the project that will be of interest to first-time " +"visitors." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):73 +msgid "Site goals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):76 +msgid "" +"Now, I'm going to outline the goals of this new \"category page\" system, as " +"well as some general design goals that you can apply to your own projects. " +"Then, we'll take a look at how the category page redesign meets these goals." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):85 +msgid "Modularity" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):88 +msgid "" +"The new category page system needs to be modular. What does this mean, " +"exactly? Well, at the moment I have \"About Gentoo Linux\" and \"Download/" +"Install\" categories in mind, but in the future I may need to add \"About " +"the Team\" or \"Support\" categories as well. Having the ability to easily " +"add new categories in the future requires that accommodations be put in " +"place during the design stage. I'll have to make sure that there's room for " +"additional category links on my navigation menu, and that the layout of the " +"page is general-purpose enough so that it can be used to present many " +"different kinds of information. Then, adding new categories will be " +"relatively easy and I'll be able to avoid completely redesigning the site, " +"if in a few months I once again find that things don't fit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):102 +msgid "" +"There is a very important second step to modular design -- the use of XML " +"and XSLT to separate presentation from content. If you've read part 2 of " +"this series, then you're at least familiar with this type of design. Once I " +"have the proper XSL template created, I can generate as many category pages " +"as I like by simply providing the proper XML. And unlike the HTML, my XML " +"will contain no display-related information; it's pure content. We'll take a " +"look at the XML/XSLT implementation of the category pages in the fourth and " +"final installment in this series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):116 +msgid "General style guidelines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):119 +msgid "" +"It's also very important that the new category layout be visually appealing. " +"Remember, when a user types in http://www.gentoo.org, the \"About Gentoo " +"Linux\" category page will appear first, so I want this to be an attractive " +"page. Now, the word \"attractive\" means different things to different " +"people, but this article presents a few good general guidelines that I am " +"using during the design of the new category page that should apply to almost " +"any Web site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):131 +msgid "That boxy look" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):134 +msgid "" +"For general page layout, simple is best. If you're going to organize a bunch " +"of complicated information, why not use a master table to split the page " +"into various regions? This will also help to ensure that various parts of " +"the page line up, which makes for a clean, attractive design. For example, " +"this particular type of page layout is generally not very appealing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:link):143 +msgid "/images/docs/l-redesign-03.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:caption):143 +msgid "A sub-optimal page layout" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):145 +msgid "" +"However, if the same information is presented using a common master grid, " +"the site starts looking a lot cleaner:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:link):151 +msgid "/images/docs/l-redesign-04.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:caption):151 +msgid "Aligned to a grid, things become less confusing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):153 +msgid "" +"And remember, the simpler your layout, the more information you'll be able " +"to pack into the page without annoying your visitors" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):161 +msgid "Text and background color" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):164 +msgid "" +"Next, we come to color choice. I have to admit that I happen to find bright " +"green text on a dark blue background very appealing. But let's face it -- no " +"matter how exotic and nifty they may look, dark backgrounds are a poor " +"choice for text regions on a Web site. People expect to see dark text on a " +"light background, and I for one think we should give them what they want." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):172 +msgid "" +"Well, I should clarify my position. Using light text on a dark background is " +"a horrible choice for presenting paragraphs of information, but can be quite " +"attractive and functional for your menu bar, or a small list of links. In " +"other words, inverted text can be a great accent, but go with a traditional " +"color scheme for your main text content areas; you'll thank me later. This " +"will also help to ensure that your site looks good on paper." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):184 +msgid "Contrast" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):187 +msgid "" +"Besides the dark text/light background issue, there aren't many hard rules " +"when it comes to Web site design. If you like dark colors, it's perfectly " +"fine to make the top part of the page dark blue, for example. Now, hear me " +"correctly: If you make the entire page dark blue, you've done a bad thing. " +"If you make a portion of the page (preferably a portion of the page that " +"doesn't have much text in it) dark blue, you might actually be doing a very " +"good thing, because that dark blue will contrast nicely with your white text " +"area and add some additional drama to your new site. In fact, a large " +"portion of your page can contain saturated or dark colors; again, just make " +"sure that your main text content is presented in a traditional fashion." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):203 +msgid "Functional layout" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):206 +msgid "" +"I also want to ensure that the Web page is neither too cluttered nor too " +"sparse. I suppose that all of us struggle with this challenge; some of us " +"have a tendency to pack so much information into a page that it becomes " +"totally unintelligible, while others include so many large margins and " +"useless empty spaces that users are forced to scroll down several pages to " +"find the information they need. For the new category pages, I want to use " +"minimal margins -- just enough to keep things readable would be good, I " +"figure. I'll only use empty spaces on the page if things are truly getting " +"too cluttered. After all, the whole purpose of these category pages is to " +"solve a space problem, and it would be good to concentrate as much " +"information into as small a space as possible, as long as readability isn't " +"compromised in the process." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):220 +msgid "" +"A high information density has another advantage: Users are less likely to " +"need to scroll down to find the information they need. This makes the page " +"significantly more pleasant to use. (If you don't believe me, design a " +"couple of mock-up pages and see for yourself.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):230 +msgid "Content supercedes art" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):233 +msgid "" +"In working on the site layout, I have quickly learned that a Web page " +"redesign should primarily be used as an opportunity to present content " +"(actual information that's useful to my visitors) in a readable and " +"meaningful way, rather than just another occasion to make an artistic " +"statement or to exude large quantities of -- er -- corporate identity. Not " +"that artistic statements are necessarily forbidden, but if by making one I " +"hurt the presentation of my content, then I'm not doing my visitors a favor." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):243 +msgid "" +"Once in a while, it's a good idea to step back and acknowledge that the " +"people who are visiting our site are primarily looking for information " +"rather than zany new approaches to Web design. If this is something you " +"struggle with, be comforted: I, too, am tempted to focus on artsy stuff and " +"leave all other priorities at the wayside." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):254 +msgid "The result" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):257 +msgid "" +"Now that we've covered some of my redesign goals, let's take a look at the " +"new gentoo.org category pages. Here's the new page that you're greeted with " +"when you visit <b>http://www.gentoo.org</b>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:link):264 +msgid "/images/docs/l-redesign-05.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:caption):264 +msgid "The new www.gentoo.org main page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):266 +msgid "" +"I have to say that I'm really pleased with the redesign, and I really like " +"the look of the new site. Notice how tables are used to break the page into " +"four regions: the top left logo area, the black menu area, the gray infobar " +"area, and the white main content area. Also notice that the clean alignment " +"of these four regions makes the design simple yet attractive." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):274 +msgid "" +"Now, look at the colors. As I mentioned earlier, I'm a big fan of extremely " +"dark Web sites. However, because a very dark site is a bad thing, I reached " +"a compromise: Dark parts were limited to the top regions, and inverted text " +"was used only in the menu region, the logo and the title for the floating " +"\"Gentoo Linux Features\" box. Because these parts of the page aren't used " +"to present large quantities of text, I'm not going to annoy my visitors. " +"Instead, they serve as nice accents to the main (white) text content area. " +"Here's a snapshot of the \"Download/Install\" category page:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:link):286 +msgid "/images/docs/l-redesign-06.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(figure:caption):286 +msgid "The www.gentoo.org download/install page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):288 +msgid "" +"Another thing worth commenting on: You have probably noticed that the blue " +"\"flying saucer guy\" and the red \"gentoo\" logo are from my original site. " +"I decided to integrate these graphics into the new design so that the new " +"main index.html page still looks familiar to my regular visitors. However, I " +"omitted the \"flying saucer guy\" on every other page besides the main page " +"so that more information could fit on the screen. The red \"gentoo\" logo " +"was kept on every page because it helps to make the white content area more " +"visually appealing and draws attention to the category title." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):302 +msgid "The nav-menu and title" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):305 +msgid "" +"As you can see, the name of the current page is highlighted in bright green " +"in the navigation menu, thanks to cascading style sheets (or CSS), and the " +"current page name is repeated immediately below the red \"gentoo\" logo in " +"the main content area. While I initially thought that this wasn't necessary, " +"I found that simply highlighting the current page's navigation menu entry in " +"green wasn't enough to provide users with an indication of what page they " +"were on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):314 +msgid "" +"Despite the clean look of the new site, I am cramming quite a bit of " +"information into the page. One advantage to this is that under most display " +"resolutions, a visitor will only need to scroll down to finish reading the " +"main text. However, all hyperlinks should be immediately visible and " +"accessible, requiring no vertical scrolling by the user. This makes the site " +"as a whole easier to navigate -- a big win for usability." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):326 +msgid "Lost in Xara" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):329 +msgid "" +"Just looking at the site doesn't really give you an idea of what the " +"redesign process was like. I actually made a number of major logistical " +"mistakes from the onset of the redesign. My greatest error was to " +"immediately fire up Xara in an attempt to develop the new look for the " +"category pages." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):336 +msgid "" +"Once in Xara, I wasted a lot of time focusing almost exclusively on eye " +"candy rather than on page layout. By doing so, I put the cart before the " +"horse and ended up creating around 20 design prototypes that I eventually " +"had to throw away. In the end, these prototypes were of no use to me because " +"they did not deal with how to present the content." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):344 +msgid "" +"Finally, I regained my senses, exited Xara, fired up a text editor, and " +"wrotes the raw text that would appear on the page. Once the content was " +"written, I developed a general page layout to present this text to the user " +"-- no color schemes or eye candy just yet. Then, and only then, did I return " +"to Xara and finalize the new look for the site, developing a color scheme " +"and enhancing our logo. This time, the graphical design process went " +"smoothly and relatively quickly because I had an existing framework (the " +"text and layout) to direct my steps. Without this structure, I could have " +"spent the rest of my life playing around in Xara, developing thousands of " +"what-if design possibilities for the new site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):357 +msgid "" +"When you redesign your site, remember that content comes first, layout " +"second, and graphical embellishments a distant third. By taking this " +"approach, you'll end up saving yourself a lot of time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):366 +msgid "User-centric IRC" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):369 +msgid "" +"So, I did make a few mistakes during the design process, but I also did a " +"couple of things right, and one of them was to allow the Gentoo Linux " +"developers to review and comment on my work as it progressed. As you may " +"recall from my first article, my action plan identified developers as my " +"highest-priority target audience, so getting our existing developers " +"involved in the design was clearly a wise choice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):378 +msgid "" +"Doing this was easy. I just kept an IRC client running and connected to our " +"IRC channel as I normally do, and then whenever I made any significant " +"progress, I'd generate a .png snapshot of the current site and post it to " +"our Web server. Then, everyone in the channel could take a look and comment " +"on my work in real-time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):386 +msgid "" +"These developers acted as my barometer, letting me know what designs and " +"colors were the most popular, and what types of layouts worked best. If the " +"site design became too crowded or complicated, someone would let me know and " +"I'd adjust the HTML accordingly. When the category page design became more " +"finalized, I started creating tarballs of the site HTML/images so that " +"developers could play with the code and make any necessary fixes. Thus, the " +"IRC channel allowed the HTML to be developed in a truly user-centric way. " +"Last, but not least, the Gentoo Linux developers really helped me to debug " +"the HTML code so that it was rendered optimally in a variety of modern " +"browsers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):401 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(p):404 +msgid "" +"Well, that's it for now. Join me in my <uri link=\"/doc/en/articles/l-" +"redesign-4.xml\">next article</uri> when I finally convert the entire site " +"to a fully-modular XML/XSLT-based system. That should provide some " +"excitement as well as an opportunity to look at a lot of juicy behind-the-" +"scenes XML development details!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(title):417 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):426 +msgid "" +"In <uri link=\"/doc/en/articles/l-redesign-1.xml\">Part 1</uri>, the author " +"creates a user-centric action plan and introduces pytext, an embedded Python " +"interpreter (March 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):431 +msgid "" +"In <uri link=\"/doc/en/articles/l-redesign-2.xml\">Part 2</uri>, Daniel " +"shows off the new documentation system and sets up a daily CVS-log mailing " +"list (May 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):436 +msgid "" +"In <uri link=\"/doc/en/articles/l-redesign-4.xml\">Part 4</uri>, Daniel " +"completes the conversion to XML/XSLT, fixes a host of Netscape 4.x browser " +"compatibility bugs, and adds an auto-generated XML Changelog to the site " +"(Aug 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):422 +msgid "" +"Read the other articles in this developerWorks series about the redesign of " +"the www.gentoo.org Web site using technologies like XML, XSLT, and Python: " +"<placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):444 +msgid "" +"Learn more about cascading style sheets (CSS) by visiting the <uri link=" +"\"http://www.w3.org/Style/CSS/\">CSS page</uri> at the World Wide Web " +"Consortium, or W3C." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):449 +msgid "" +"Check out <uri link=\"http://www.xara.com/\">Xara.com</uri>, the home of " +"Xara X -- an excellent vector drawing package for Windows. With virtually no " +"bloat, and blazing speed, it has my personal recommendation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):454 +msgid "Learn more about XSLT at <uri>http://www.xslt.com</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(li):455 +msgid "" +"When you wake up, check out Sablotron, a nice, fast XSLT processor available " +"from <uri link=\"http://www.gingerall.com/\">Ginger Alliance</uri>" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-3.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-redesign-4.xml.po b/article/gettext/ru/l-redesign-4.xml.po new file mode 100644 index 0000000..c7b4f37 --- /dev/null +++ b/article/gettext/ru/l-redesign-4.xml.po @@ -0,0 +1,641 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(guide:link):5 +msgid "/doc/en/articles/l-redesign-4.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):6 +msgid "The gentoo.org redesign, Part 4: A site reborn" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(abstract):12 +msgid "" +"Have you ever woken up one morning and suddenly realized that your cute " +"little personal development Web site isn't really that great? If so, you're " +"in good company. In this series, Daniel Robbins shares his experiences as he " +"redesigns the Gentoo Linux Web site using technologies like XML, XSLT, and " +"Python. This article: Daniel completes the conversion to XML/XSLT, fixes a " +"host of Netscape 4.x browser compatibility bugs, and adds an auto-generated " +"XML Changelog to the site." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(version):27 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(date):28 +msgid "2005-10-10" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):31 +msgid "The final touch" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):33 +msgid "A new look, but..." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):36 +msgid "" +"At the end of the previous article, the Gentoo Linux Web site had a " +"completely new look, but there are still some things that aren't quite " +"complete. In this article, the final installment in this series, I finally " +"put those finishing touches on the site, resulting in a fully-functional, " +"refined, and modular XML-based site that's ready for the future. Here's what " +"was missing from the site since the last article:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):48 +msgid "Loose ends" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):51 +msgid "" +"First, while the site has a completely new look, only the documentation " +"portion of the site is XML-based. The main \"category\" pages are still in " +"raw HTML and need to be converted to an XML/XSLT solution to make things " +"more maintainable and expandable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):58 +msgid "" +"Also, my developers have found several problems with the raw HTML itself. " +"The site looks particularly bad when viewed under Netscape 4.77 -- " +"obviously, this is a problem. Also, there are a number of other minor " +"rendering problems that appear in more modern browsers, the most annoying of " +"which is a thin vertical black line that does not extend completely down the " +"entire page, ruining the illusion that the main content area is being spoken " +"by our flying-saucer guy. Also, our documentation pages don't completely " +"match the more refined look of our new main category pages -- clearly " +"something worth updating." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):72 +msgid "The goal" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):75 +msgid "" +"Here's the plan for the final rework of the Gentoo Linux site. First, we'll " +"totally rework the main page HTML, keeping the same overall look, but making " +"the page more browser-compatible. At the same time, we'll add a few " +"presentation-related refinements suggested by our visitors, and also fix " +"browser compatibility problems with our existing \"guide\" documentation " +"system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):83 +msgid "" +"Next, we'll completely move the site over to XML and XSLT. By the end of " +"this article, any change made to the site will be made by modifying XML or " +"XSLT rather than directly editing HTML, which will now be generated " +"automatically with the help of xsltproc. This will make the site a whole lot " +"easier to maintain. Because Gentoo Linux is a community-developed project, " +"this will, in turn, allow our developers (and me) to maintain and improve " +"the site as needed. I'm really excited about this since it will save us a " +"bunch of time and ensure that our visitors are greeted with up-to-date " +"content." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):97 +msgid "Compatibility issues" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):100 +msgid "" +"While Netscape 4.x is still a very widely used browser, it is difficult for " +"me to decide exactly how many hoops to jump through in order to make the " +"site look better when viewed through this browser. Should I merely ensure " +"that the site is readable (without any major glitches) or should I do " +"everything I can to make sure the site looks absolutely perfect under " +"Netscape 4.x, even if that means using less or no CSS and adding strange " +"compatibility hacks to the existing HTML?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):110 +msgid "" +"In the end, I decide to make several major changes to the HTML so that the " +"site will still look quite good under Netscape 4.x without focusing too much " +"on minor bug-related table spacing and font-rendering issues. Here are some " +"of the changes made to the site's HTML to get everything 4.x compatible. " +"(The Gentoo Linux development team has submitted several of these fixes.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):118 +msgid "" +"First, Netscape 4.x has a bug that causes CSS background colors of block " +"elements to be displayed incorrectly. For example, here's how a particular " +"portion of a guide document is supposed to be rendered:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:link):125 +msgid "/images/docs/l-redesign-07.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:caption):125 +msgid "A sample guide document in IE5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):127 +msgid "" +"And, here is how Netscape 4.x renders this same portion when background " +"colors are specified using CSS:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:link):133 +msgid "/images/docs/l-redesign-08.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:caption):133 +msgid "A sample guide document in Netscape 4.7; some fixes are needed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):135 +msgid "" +"This is ugly. To fix it, existing block-level elements, such as this one..." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre:caption):139 +msgid "Sample paragraph" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre):139 +#, no-wrap +msgid "" +"\n" +"<p class=\"note\">This paragraph doesn't look so good in 4.x</p>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):143 +msgid "...were replaced with tables, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre:caption):147 +msgid "Sample table" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre):147 +#, no-wrap +msgid "" +"\n" +"<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n" +" <tr>\n" +" <td bgcolor=\"#ddffff\"><p class=\"note\">\n" +" This looks a whole lot better in 4.x</p></td>\n" +" </tr>\n" +"</table>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):156 +msgid "" +"This hack fixes the background-rendering problem. However, this \"fix\" also " +"requires color information to be included in the HTML, which undermines the " +"benefits of using CSS in the first place. This is an unfortunate situation, " +"especially for fans of CSS like myself, but is required for Netscape 4.x " +"compatibility." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):167 +msgid "Rebuilding the HTML" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):170 +msgid "" +"Now it's time to deal with the black vertical line that doesn't always " +"extend all the way to the bottom of the screen. I have been unable to find a " +"solution to this problem that works in both a 4.x and 5.x browser; every 5.x " +"version has triggered bugs in Netscape 4.x, and every 4.x-compatible version " +"looks horrible in a 5.x browser. So, I decide to simply remove the black " +"line entirely: Finally, the site works in all popular browsers. Next, I will " +"to create a guide-like syntax for creating the main pages." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):183 +msgid "Approaching the XML" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):186 +msgid "" +"Instead of implementing a completely new tagset for the main page, I think " +"it would be a good idea to try to use as many of the \"guide\" XML " +"documentation tags as possible (see part 2 of this series for more " +"information on the guide XML format). So, I hack away at some new XSL, using " +"my guide XSL as a template for my work. After an hour or two, I have a fully-" +"functional set of XSL transformations for turning a guide-like syntax into " +"an HTML main page. Revision 2 of the new main page looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:link):197 +msgid "/images/docs/l-redesign-09.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:caption):197 +msgid "The new main page revision" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):199 +msgid "" +"Now that the main page is using a new XML/XSLT backend, I direct my " +"attention to the \"guide\" system's HTML output. Not only do I need to fix a " +"host of Netscape 4.7 compatibility bugs, but I also need to further update " +"the generated HTML and graphics so that they will match those of my newly-" +"revised main page. Then the idea strikes me: Why not simply tweak my new " +"main page XML/XSL just a little bit so that it can also generate HTML for my " +"documentation? After all, I have just added support for nearly every \"guide" +"\" XML tag, so that they can also be used for main page content." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):210 +msgid "" +"This solution turns out to be really easy to implement. I just tweak the new " +"XSLT file so that it will remove the left-hand \"link bar\" and perform a " +"few other minor changes to the output HTML when it processes documentation " +"pages. Since most of the XSLT is still the same, I can use a single set of " +"master XSLT templates for both the guide documentation and the category " +"pages:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:link):218 +msgid "/images/docs/l-redesign-10.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:caption):218 +msgid "How the new XSL works" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):220 +msgid "" +"Not only do I now have a single set of XSLT templates to maintain, but " +"because both flavors of output HTML are based on the same master document, " +"they now share the same CSS stylesheet. This means that there is no need to " +"\"synchronize the look\" between two disparate sets of stylesheets and " +"output HTML. And as you can see, the new documentation HTML is a perfect " +"match for the new main page:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:link):229 +msgid "/images/docs/l-redesign-11.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:caption):229 +msgid "The new documentation pages perfectly match the new main page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):234 +msgid "The XML implementation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):237 +msgid "" +"The actual implementation is quite easy; my existing guide XML syntax " +"requires that every document be part of a single master <guide> " +"element. To add support for main category pages, I create a new master " +"element: <mainpage>. To create a main category page, I place " +"everything inside a <mainpage> element instead of a <guide> " +"element, and the XSLT makes the appropriate changes to the output. Besides " +"this, the only major change required is the addition of an optional <" +"sidebar> element that's used to specify the contents of the floating " +"table on a main category page. The existing <guide> XSLT template " +"looks something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre:caption):249 +msgid "XSLT template" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre):249 +#, no-wrap +msgid "" +"\n" +"<xsl:template match=\"/guide\">\n" +" <html>\n" +" <head>\n" +" guide header goes here\n" +" </head>\n" +" <body>\n" +" top part of guide body HTML content goes here\n" +"<!--next, we insert our content-->\n" +" <xsl:apply-templates select=\"chapter\" />\n" +" bottom part of guide body HTML content goes here\n" +" </body>\n" +" </html>\n" +"</xsl:template>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):265 +msgid "" +"If you're not too familiar with XSLT, this template tells an XSLT processor " +"to replace the <guide> </guide> tags with the shell of an HTML " +"document, as well as recursively applying templates to any <chapter> " +"elements (opening/closing tag pairs) inside the <guide> element and " +"inserting the resultant output into the middle of the HTML shell." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):273 +msgid "" +"So, to add support for the main category pages, I need to specify that a " +"different HTML shell should be used if everything happens to be enclosed in " +"a single <mainpage> element. To do this, I add a new template, as " +"follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre:caption):279 +msgid "The new template" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre):279 +#, no-wrap +msgid "" +"\n" +"<xsl:template match=\"/mainpage\">\n" +" <html>\n" +" <head>\n" +" mainpage header goes here\n" +" </head>\n" +" <body>\n" +" top part of mainpage body HTML content goes here\n" +"<!--next, we insert our content-->\n" +" <xsl:apply-templates select=\"chapter\" />\n" +" bottom part of mainpage body HTML content goes here\n" +" </body>\n" +" </html>\n" +"</xsl:template>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):295 +msgid "" +"Because nearly every other XML element (from <chapter> all the way on " +"down) produces identical HTML output for both guide and main category pages, " +"almost every other XSLT template can be shared for both types of pages. " +"Thus, we can get along just fine with a single XSLT file that specifies two " +"\"HTML shells\" and a common set of XML-to-HTML XSLT templates. As always, " +"code reuse is definitely a good thing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):307 +msgid "The Changelog page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):310 +msgid "" +"You'll remember that in Part 2 of this series I mentioned that the cvs2cl.pl " +"CVS Changelog generation script could produce XML output and that I wanted " +"to eventually use this feature as the basis for a daily CVS Changelog page " +"that would appear on the new Web site. Now, with the new XML backend in " +"place, adding the new Changelog page is a piece of cake. Here's an enhanced " +"version of the <path>cvslog.sh</path> script that also takes care of " +"handling the XML-to-HTML conversion:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre:caption):320 +msgid "Enhanced version of cvslog.sh script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre):320 +#, no-wrap +msgid "" +"\n" +"#!/bin/bash\n" +"#various paths\n" +"HOMEDIR=/home/drobbins\n" +"CVSDIR=${HOMEDIR}/gentoo/gentoo-x86\n" +"OUTLOG=${HOMEDIR}/gentoo/xmlcvslog.txt\n" +"OUTMAIL=${HOMEDIR}/gentoo/cvslog.txt\n" +"WEBDIR=/usr/local/httpd/htdocs\n" +"XSLTP=/opt/gnome/bin/xsltproc\n" +"TMPFILE=${HOMEDIR}/gentoo/xmlcvslog.tmp\n" +"USER=drobbins\n" +"#if $CVSMAIL is undefined, set it to \"yes\"\n" +"if [ -z \"$CVSMAIL\" ]\n" +"then\n" +" export CVSMAIL=\"yes\"\n" +"fi\n" +"#the main script\n" +"cd $CVSDIR \n" +"cvs -q update -dP\n" +"yesterday=`date -d \"1 day ago 00:00\" -R`\n" +"today=`date -d \"00:00\" -R`\n" +"cvsdate=-d\\'${yesterday}\\<${today}\\'\n" +"nicedate=`date -d yesterday +\"%d %b %Y %Z (%z)\"`\n" +"#generate cvs2cl.pl XML output\n" +"/usr/bin/cvs2cl.pl --xml -f $OUTLOG -l \"${cvsdate}\" \n" +"#use sed to remove \"xmlns=\" from cvs2cl.pl output\n" +"/usr/bin/sed -e 's/xmlns=\".*\"//' $OUTLOG > ${OUTLOG}.2\n" +"#convert cvs2cl.pl XML output to guide format using $XLSTP\n" +"$XSLTP ${WEBDIR}/xsl/cvs.xsl ${OUTLOG}.2 > $TMPFILE\n" +"#convert guide XML output to HTML format using $XLSTP\n" +"$XSLTP ${WEBDIR}/xsl/guide-main.xsl \n" +"$TMPFILE > ${WEBDIR}/index-changelog.html\n" +"#fix perms\n" +"chmod 0644 ${WEBDIR}/index-changelog.html\n" +"#automatically send cvs mail if $CVSMAIL is set to \"yes\"\n" +"if [ \"$CVSMAIL\" = \"yes\" ]\n" +"then\n" +" /usr/bin/cvs2cl.pl -f ${OUTMAIL} -l \"${cvsdate}\" \n" +" mutt -x gentoo-cvs -s \"cvs log for $nicedate\" > ${OUTMAIL} \n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):362 +msgid "" +"While this script may look significantly more complicated than the earlier " +"version, it really only contains four or five key additional lines; the rest " +"of the additions are either comments or environment variable definitions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):368 +msgid "" +"Here's how the new XML-related parts of the cvslog.sh script work. First, we " +"call cvs2cl.pl and instruct it to generate an XML-based Changelog containing " +"all the files that were modified yesterday. Then, this XML output is run " +"through sed to remove an unneeded xmlns= attribute from the XML. Next, we " +"hand this slightly tweaked XML over to xsltproc and tell it to apply the " +"processing found in cvs.xsl; these instructions transform the XML output " +"from cvs2cl.pl's into a proper guide XML document. Finally, we again use " +"xsltproc to convert this guide XML document into Web-ready HTML, which is " +"piped into our Web server's htdocs directory. The generated HTML Changelog " +"page is complete, and this is the result:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:link):382 +msgid "/images/docs/l-redesign-12.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(figure:caption):382 +msgid "The automatically generated Changelog page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):384 +msgid "" +"You might be surprised at the simplicity of the XSLT contained in cvs.xsl. " +"In it, we specify three templates for <changelog>, <entry>, and " +"<file>. We also make reference to a few other tags in the source XML, " +"including <date>, <author>, and <msg> (which cvs2cl.pl " +"uses to specify the CVS committer's comments). cvs.xsl does quite a bit " +"considering that it is only around 35 lines long:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre:caption):393 +msgid "The cvs.xsl" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(pre):393 +#, no-wrap +msgid "" +"\n" +"<?xml version='1.0' encoding=\"iso-8859-1\"?>\n" +"<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\n" +"<xsl:output encoding=\"iso-8859-1\" method=\"xml\" indent=\"yes\"/>\n" +"<xsl:template match=\"/changelog\">\n" +" <mainpage id=\"changelog\">\n" +" <title>Gentoo Linux Development Changelog for <xsl:value-of select=\"entry/date\"/></title>\n" +" <author title=\"script\">cvs-xml.xsl</author>\n" +" <standout>\n" +" <title>About the Development Changelog</title>\n" +" <body>\n" +" This page contains a daily Changelog, listing all modifications made to our\n" +" CVS tree on <xsl:value-of select=\"entry/date\"/> (yesterday).\n" +" </body>\n" +" </standout>\n" +" <version>1.0.0</version>\n" +" <date><xsl:value-of select=\"entry/date\"/></date>\n" +" <chapter>\n" +" <xsl:apply-templates select=\"entry\"/>\n" +" </chapter>\n" +" </mainpage>\n" +"</xsl:template>\n" +"<xsl:template match=\"entry\">\n" +" <section>\n" +" <title>Files modified by <xsl:value-of select=\"author\"/> at \n" +" <xsl:value-of select=\"time\"/>\n" +" </title>\n" +" <body>\n" +" <note><xsl:value-of select=\"msg\"/></note>\n" +" <ul>\n" +" <xsl:apply-templates select=\"file\"/>\n" +" </ul>\n" +" </body>\n" +" </section>\n" +"</xsl:template>\n" +"<xsl:template match=\"file\">\n" +" <li><path><xsl:value-of select=\"name\"/></path>, <xsl:value-of select=\"revision\"/></li>\n" +"</xsl:template>\n" +"</xsl:stylesheet>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):437 +msgid "Project complete!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(p):440 +msgid "" +"Since the beginning of the Gentoo Linux Web site redesign, we've created a " +"user-centric action plan, designed a new XML-based documentation system, a " +"new logo, a new look for the site, converted all remaining parts to XML, and " +"added a new XML-based Changelog page. Phew! I hope that you've enjoyed " +"following my progress, and have found ample ideas and inspiration along the " +"way. I've received several requests for more information and code related to " +"the redesign, so I've set up a special <uri link=\"http://www.gentoo.org/" +"proj/en/site.xml\">Gentoo Linux XML Projects</uri> page that contains the " +"most recent XML, XSLT, scripts, and documentation used for www.gentoo.org. " +"In addition to visiting the Projects page, be sure to check out the valuable " +"resources listed below." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(title):459 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):464 +msgid "" +"Check out the <uri link=\"http://www.gentoo.org/proj/en/site.xml\">Gentoo " +"Linux XML Projects</uri> page if you're interested in using the Gentoo Linux " +"guide XML system as a basis for your own projects. All the latest XML/XSLT " +"stuff can be found here." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):474 +msgid "" +"In <uri link=\"/doc/en/articles/l-redesign-1.xml\">Part 1</uri>, the author " +"creates a user-centric action plan and introduces pytext, an embedded Python " +"interpreter (March 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):479 +msgid "" +"In <uri link=\"/doc/en/articles/l-redesign-2.xml\">Part 2</uri>, Daniel " +"shows off the new documentation system and sets up a daily CVS-log mailing " +"list (May 2001)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):484 +msgid "" +"In <uri link=\"/doc/en/articles/l-redesign-3.xml\">Part 3</uri>, he creates " +"a new look for the site (July 2001)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):470 +msgid "" +"Read the other articles in this developerWorks series about the redesign of " +"the www.gentoo.org Web site using technologies like XML, XSLT, and Python: " +"<placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):490 +msgid "" +"Learn more about CSS (cascading style sheets) by visiting the <uri link=" +"\"http://www.w3.org/Style/CSS/\">CSS</uri> page at the World Wide Web " +"Consortium, or W3C. You can find out more about <uri link=\"http://www.w3." +"org/XML\">XML</uri>, <uri link=\"http://www.w3.org/TR/xslt\">XSLT</uri> and " +"a host of other technologies as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):498 +msgid "" +"Check out <uri link=\"http://xara.com\">Xara.com</uri>, the home of Xara X " +"-- an excellent vector drawing package for Windows. With virtually no bloat " +"and blazing speed, it has my personal recommendation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):503 +msgid "Learn even more about XSLT at <uri>http://www.xslt.com</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(li):504 +msgid "" +"When you wake up, check out Sablotron, a nice, fast XSLT processor available " +"from <uri>http://www.gingerall.com</uri>" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-redesign-4.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-sed1.xml.po b/article/gettext/ru/l-sed1.xml.po new file mode 100644 index 0000000..0e5775e --- /dev/null +++ b/article/gettext/ru/l-sed1.xml.po @@ -0,0 +1,692 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:37+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(guide:link):5 +msgid "/doc/en/articles/l-sed1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):6 +msgid "Sed by example, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(abstract):12 +msgid "" +"In this series of articles, Daniel Robbins will show you how to use the very " +"powerful (but often forgotten) UNIX stream editor, sed. Sed is an ideal tool " +"for batch-editing files or for creating shell scripts to modify existing " +"files in powerful ways." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(version):24 +msgid "1.5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(date):25 +msgid "2010-05-14" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):28 +msgid "Get to know the powerful UNIX editor" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):30 +msgid "Pick an editor" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):33 +msgid "" +"In the UNIX world, we have a lot of options when it comes to editing files. " +"Think of it -- vi, emacs, and jed come to mind, as well as many others. We " +"all have our favorite editor (along with our favorite keybindings) that we " +"have come to know and love. With our trusty editor, we are ready to tackle " +"any number of UNIX-related administration or programming tasks with ease." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):40 +msgid "" +"While interactive editors are great, they do have limitations. Though their " +"interactive nature can be a strength, it can also be a weakness. Consider a " +"situation where you need to perform similar types of changes on a group of " +"files. You could instinctively fire up your favorite editor and perform a " +"bunch of mundane, repetitive, and time-consuming edits by hand. But there's " +"a better way." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):52 +msgid "Enter sed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):55 +msgid "" +"It would be nice if we could automate the process of making edits to files, " +"so that we could \"batch\" edit files, or even write scripts with the " +"ability to perform sophisticated changes to existing files. Fortunately for " +"us, for these types of situations, there is a better way -- and the better " +"way is called sed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):62 +msgid "" +"sed is a lightweight stream editor that's included with nearly all UNIX " +"flavors, including Linux. sed has a lot of nice features. First of all, it's " +"very lightweight, typically many times smaller than your favorite scripting " +"language. Secondly, because sed is a stream editor, it can perform edits to " +"data it receives from stdin, such as from a pipeline. So, you don't need to " +"have the data to be edited stored in a file on disk. Because data can just " +"as easily be piped to sed, it's very easy to use sed as part of a long, " +"complex pipeline in a powerful shell script. Try doing that with your " +"favorite editor." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):76 +msgid "GNU sed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):79 +msgid "" +"Fortunately for us Linux users, one of the nicest versions of sed out there " +"happens to be GNU sed, which is currently at version 3.02. Every Linux " +"distribution has GNU sed, or at least should. GNU sed is popular not only " +"because its sources are freely distributable, but because it happens to have " +"a lot of handy, time-saving extensions to the POSIX sed standard. GNU sed " +"also doesn't suffer from many of the limitations that earlier and " +"proprietary versions of sed had, such as a limited line length -- GNU sed " +"handles lines of any length with ease." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):93 +msgid "The newest GNU sed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):96 +msgid "" +"While researching this article, I noticed that several online sed " +"aficionados made reference to a GNU sed 3.02a. Strangely, I couldn't find " +"sed 3.02a on <uri>ftp://ftp.gnu.org</uri> (see <uri link=\"#resources" +"\">Resources</uri> for these links), so I had to go look for it elsewhere. I " +"found it at <uri>ftp://alpha.gnu.org</uri>, in <path>/pub/sed</path>. I " +"happily downloaded it, compiled it, and installed it, only to find minutes " +"later that the most recent version of sed is 3.02.80 -- and you can find its " +"sources right next to those for 3.02a, at <uri>ftp://alpha.gnu.org</uri>. " +"After getting GNU sed 3.02.80 installed, I was finally ready to go." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):111 +msgid "The right sed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):114 +msgid "" +"In this series, we will be using GNU sed 3.02.80. Some (but very few) of the " +"most advanced examples you'll find in my upcoming, follow-on articles in " +"this series will not work with GNU sed 3.02 or 3.02a. If you're using a non-" +"GNU sed, your results may vary. Why not take some time to install GNU sed " +"3.02.80 now? Then, not only will you be ready for the rest of the series, " +"but you'll also be able to use arguably the best sed in existence!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):126 +msgid "Sed examples" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):129 +msgid "" +"Sed works by performing any number of user-specified editing operations " +"(\"commands\") on the input data. Sed is line-based, so the commands are " +"performed on each line in order. And, sed writes its results to standard " +"output (stdout); it doesn't modify any input files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):136 +msgid "" +"Let's look at some examples. The first several are going to be a bit weird " +"because I'm using them to illustrate how sed works rather than to perform " +"any useful task. However, if you're new to sed, it's very important that you " +"understand them. Here's our first example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):143 +msgid "Example of sed usage" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):143 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e 'd' /etc/services</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):147 +msgid "" +"If you type this command, you'll get absolutely no output. Now, what " +"happened? In this example, we called sed with one editing command, <c>d</c>. " +"Sed opened the <path>/etc/services</path> file, read a line into its pattern " +"buffer, performed our editing command (\"delete line\"), and then printed " +"the pattern buffer (which was empty). It then repeated these steps for each " +"successive line. This produced no output, because the <c>d</c> command " +"zapped every single line in the pattern buffer!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):157 +msgid "" +"There are a couple of things to notice in this example. First, <path>/etc/" +"services</path> was not modified at all. This is because, again, sed only " +"reads from the file you specify on the command line, using it as input -- it " +"doesn't try to modify the file. The second thing to notice is that sed is " +"line-oriented. The <c>d</c> command didn't simply tell sed to delete all " +"incoming data in one fell swoop. Instead, sed read each line of /etc/" +"services one by one into its internal buffer, called the pattern buffer. " +"Once a line was read into the pattern buffer, it performed the <c>d</c> " +"command and printed the contents of the pattern buffer (nothing in this " +"example). Later, I'll show you how to use address ranges to control which " +"lines a command is applied to -- but in the absence of addresses, a command " +"is applied to all lines." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):171 +msgid "" +"The third thing to notice is the use of single quotes to surround the <c>d</" +"c> command. It's a good idea to get into the habit of using single quotes to " +"surround your sed commands, so that shell expansion is disabled." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):180 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):188 +msgid "Another sed example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):183 +msgid "" +"Here's an example of how to use sed to remove the first line of the <path>/" +"etc/services</path> file from our output stream:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):188 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e '1d' /etc/services | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):192 +msgid "" +"As you can see, this command is very similar to our first <c>d</c> command, " +"except that it is preceded by a <c>1</c>. If you guessed that the <c>1</c> " +"refers to line number one, you're right. While in our first example, we used " +"<c>d</c> by itself, this time we use the <c>d</c> command preceded by an " +"optional numerical address. By using addresses, you can tell sed to perform " +"edits only on a particular line or lines." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):204 +msgid "Address ranges" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):207 +msgid "" +"Now, let's look at how to specify an address range. In this example, sed " +"will delete lines 1-10 of the output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):212 +msgid "Specifying an adress range" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):212 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e '1,10d' /etc/services | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):216 +msgid "" +"When we separate two addresses by a comma, sed will apply the following " +"command to the range that starts with the first address, and ends with the " +"second address. In this example, the <c>d</c> command was applied to lines " +"1-10, inclusive. All other lines were ignored." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):226 +msgid "Addresses with regular expressions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):229 +msgid "" +"Now, it's time for a more useful example. Let's say you wanted to view the " +"contents of your <path>/etc/services</path> file, but you aren't interested " +"in viewing any of the included comments. As you know, you can place comments " +"in your <path>/etc/services</path> file by starting the line with the '#' " +"character. To avoid comments, we'd like sed to delete lines that start with " +"a '#'. Here's how to do it:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):238 +msgid "Deleting lines starting with #" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):238 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e '/^#/d' /etc/services | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):242 +msgid "" +"Try this example and see what happens. You'll notice that sed performs its " +"desired task with flying colors. Now, let's figure out what happened." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):247 +msgid "" +"To understand the '/^#/d' command, we first need to dissect it. First, let's " +"remove the 'd' -- we're using the same delete line command that we've used " +"previously. The new addition is the '/^#/' part, which is a new kind of " +"regular expression address. Regular expression addresses are always " +"surrounded by slashes. They specify a pattern, and the command that " +"immediately follows a regular expression address will only be applied to a " +"line if it happens to match this particular pattern." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):257 +msgid "" +"So, '/^#/' is a regular expression. But what does it do? Obviously, this " +"would be a good time for a regular expression refresher." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):265 +msgid "Regular expression refresher" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):268 +msgid "" +"We can use regular expressions to express patterns that we may find in the " +"text. If you've ever used the '*' character on the shell command line, " +"you've used something that's similar, but not identical to, regular " +"expressions. Here are the special characters that you can use in regular " +"expressions:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(th):277 +msgid "Character" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(th):278 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(th):311 +msgid "Description" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):281 +msgid "^" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):282 +msgid "Matches the beginning of the line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):285 +msgid "$" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):286 +msgid "Matches the end of the line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):289 +msgid "." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):290 +msgid "Matches any single character" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):293 +msgid "*" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):294 +msgid "Will match zero or more occurrences of the previous character" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):297 +msgid "[ ]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):298 +msgid "Matches all the characters inside the [ ]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):302 +msgid "" +"Probably the best way to get your feet wet with regular expressions is to " +"see a few examples. All of these examples will be accepted by sed as valid " +"addresses to appear on the left side of a command. Here are a few:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(th):310 +msgid "Regular expression" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):314 +msgid "/./" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):315 +msgid "Will match any line that contains at least one character" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):318 +msgid "/../" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):319 +msgid "Will match any line that contains at least two characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):322 +msgid "/^#/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):323 +msgid "Will match any line that begins with a '#'" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):326 +msgid "/^$/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):327 +msgid "Will match all blank lines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):330 +msgid "/}$/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):331 +msgid "Will match any lines that ends with '}' (no spaces)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):334 +msgid "/} *$/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):335 +msgid "Will match any line ending with '}' followed by zero or more spaces" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):338 +msgid "/[abc]/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):339 +msgid "Will match any line that contains a lowercase 'a', 'b', or 'c'" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):342 +msgid "/^[abc]/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(ti):343 +msgid "Will match any line that begins with an 'a', 'b', or 'c'" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):347 +msgid "" +"I encourage you to try several of these examples. Take some time to get " +"familiar with regular expressions, and try a few regular expressions of your " +"own creation. You can use a regexp this way:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):353 +msgid "Proper way of using regexp" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):353 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e '/regexp/d' /path/to/my/test/file | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):357 +msgid "" +"This will cause sed to delete any matching lines. However, it may be easier " +"to get familiar with regular expressions by telling sed to print regexp " +"matches, and delete non-matches, rather than the other way around. This can " +"be done with the following command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):364 +msgid "Printing regexp matches" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):364 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -n -e '/regexp/p' /path/to/my/test/file | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):368 +msgid "" +"Note the new '-n' option, which tells sed to not print the pattern space " +"unless explicitly commanded to do so. You'll also notice that we've replaced " +"the <c>d</c> command with the <c>p</c> command, which as you might guess, " +"explicitly commands sed to print the pattern space. Voila, now only matches " +"will be printed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):379 +msgid "More on addresses" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):382 +msgid "" +"Up till now, we've taken a look at line addresses, line range addresses, and " +"regexp addresses. But there are even more possibilities. We can specify two " +"regular expressions separated by a comma, and sed will match all lines " +"starting from the first line that matches the first regular expression, up " +"to and including the line that matches the second regular expression. For " +"example, the following command will print out a block of text that begins " +"with a line containing \"BEGIN\", and ending with a line that contains \"END" +"\":" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):392 +msgid "Printing out a desired block of text" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):392 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -n -e '/BEGIN/,/END/p' /my/test/file | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):396 +msgid "" +"If \"BEGIN\" isn't found, no data will be printed. And, if \"BEGIN\" is " +"found, but no \"END\" is found on any line below it, all subsequent lines " +"will be printed. This happens because of sed's stream-oriented nature -- it " +"doesn't know whether or not an \"END\" will appear." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):406 +msgid "C source example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):409 +msgid "" +"If you want to print out only the main() function in a C source file, you " +"could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre:caption):414 +msgid "Printing main() function in a C source file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(pre):414 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -n -e '/main[[:space:]]*(/,/^}/p' sourcefile.c | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):418 +msgid "" +"This command has two regular expressions, '/main[[:space:]]*(/' and '/^}/', " +"and one command, <c>p</c>. The first regular expression will match the " +"string \"main\" followed by any number of spaces or tabs, followed by an " +"open parenthesis. This should match the start of your average ANSI C main() " +"declaration." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):425 +msgid "" +"In this particular regular expression, we encounter the '[[:space:]]' " +"character class. This is simply a special keyword that tells sed to match " +"either a TAB or a space. If you wanted, instead of typing '[[:space:]]', you " +"could have typed '[', then a literal space, then Control-V, then a literal " +"tab and a ']' -- The Control-V tells bash that you want to insert a \"real\" " +"tab rather than perform command expansion. It's clearer, especially in " +"scripts, to use the '[[:space:]]' command class." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):435 +msgid "" +"OK, now on to the second regexp. '/^}/' will match a '}' character that " +"appears at the beginning of a new line. If your code is formatted nicely, " +"this will match the closing brace of your main() function. If it's not, it " +"won't -- one of the tricky things about performing pattern matching." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):442 +msgid "" +"The <c>p</c> command does what it always does, explicitly telling sed to " +"print out the line, since we are in '-n' quiet mode. Try running the command " +"on a C source file -- it should output the entire main() { } block, " +"including the initial \"main()\" and the closing '}'." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):452 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(p):455 +msgid "" +"Now that we've touched on the basics, we'll be picking up the pace for the " +"next two articles. If you're in the mood for some meatier sed material, be " +"patient -- it's coming! In the meantime, you might want to check out the " +"following sed and regular expression resources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):467 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(title):469 +msgid "Useful links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):473 +msgid "" +"Read Daniel's other sed articles on developerWorks: Common threads: Sed by " +"example, <uri link=\"l-sed2.xml\">Part 2</uri> and <uri link=\"l-sed3.xml" +"\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):478 +msgid "" +"Check out Eric Pement's excellent <uri link=\"http://sed.sourceforge.net/" +"sedfaq.html\">sed FAQ</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):482 +msgid "" +"You can find the sources to sed at <uri>ftp://ftp.gnu.org/pub/gnu/sed</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):486 +msgid "" +"Eric Pement also has a handy list of <uri link=\"http://sed.sourceforge.net/" +"sed1line.txt\">sed one-liners</uri> that any aspiring sed guru should " +"definitely look at." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):491 +msgid "" +"If you'd like a good old-fashioned book, <uri link=\"http://www.oreilly.com/" +"catalog/sed2/\">O'Reilly's sed & awk, 2nd Edition</uri> would be " +"wonderful choice." +msgstr "" + +#. FIXME BOTH DEAD and not possible to find other locations, sorry +#. <li> +#. Maybe you'd like to read <uri +#. link="http://www.softlab.ntua.gr/unix/docs/sed.txt">7th edition UNIX's sed +#. man page</uri> (circa 1978!). +#. </li> +#. <li> +#. Take Felix von Leitner's short <uri +#. link="http://www.math.fu-berlin.de/~leitner/sed/tutorial.html">sed +#. tutorial</uri>. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):508 +msgid "" +"Read David Mertz's article on <uri link=\"http://www-106.ibm.com/" +"developerworks/linux/library/l-python5.html\">Text processing in Python</" +"uri> on developerWorks." +msgstr "" + +#. Dead link +#. <li> +#. Brush up on <uri link="http://vision.eng.shu.ac.uk/C++/misc/regexp/">using +#. regular expressions</uri> to find and modify patterns in text in this free, +#. dW-exclusive tutorial. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):520 +msgid "" +"See the regular expressions <uri link=\"http://docs.python.org/dev/howto/" +"regex.html\">how-to document</uri> from <uri link=\"http://python.org" +"\">python.org</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(li):525 +msgid "" +"Refer to an <uri link=\"http://www.uky.edu/ArtsSciences/Classics/regex.html" +"\">overview of regular expressions</uri> from the University of Kentucky." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-sed2.xml.po b/article/gettext/ru/l-sed2.xml.po new file mode 100644 index 0000000..e93e9b6 --- /dev/null +++ b/article/gettext/ru/l-sed2.xml.po @@ -0,0 +1,868 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:37+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(guide:link):5 +msgid "/doc/en/articles/l-sed2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):6 +msgid "Sed by example, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(abstract):12 +msgid "" +"Sed is a very powerful and compact text stream editor. In this article, the " +"second in the series, Daniel shows you how to use sed to perform string " +"substitution; create larger sed scripts; and use sed's append, insert, and " +"change line commands." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(version):24 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(date):25 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):28 +msgid "How to further take advantage of the UNIX text editor" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):30 +msgid "Substitution!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):33 +msgid "" +"Let's look at one of sed's most useful commands, the substitution command. " +"Using it, we can replace a particular string or matched regular expression " +"with another string. Here's an example of the most basic use of this command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):39 +msgid "Most basic use of substitution command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):39 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e 's/foo/bar/' myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):43 +msgid "" +"The above command will output the contents of myfile.txt to stdout, with the " +"first occurrence of 'foo' (if any) on each line replaced with the string " +"'bar'. Please note that I said first occurrence on each line, though this is " +"normally not what you want. Normally, when I do a string replacement, I want " +"to perform it globally. That is, I want to replace all occurrences on every " +"line, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):52 +msgid "Replacing all the occurences on every line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):52 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e 's/foo/bar/g' myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):56 +msgid "" +"The additional 'g' option after the last slash tells sed to perform a global " +"replace." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):61 +msgid "" +"Here are a few other things you should know about the <c>s///</c> " +"substitution command. First, it is a command, and a command only; there are " +"no addresses specified in any of the above examples. This means that the " +"<c>s///</c> command can also be used with addresses to control what lines it " +"will be applied to, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):69 +msgid "Specifying lines command will be applied to" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):69 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e '1,10s/enchantment/entrapment/g' myfile2.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):73 +msgid "" +"The above example will cause all occurrences of the phrase 'enchantment' to " +"be replaced with the phrase 'entrapment', but only on lines one through ten, " +"inclusive." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):79 +msgid "Specifying more options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):79 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e '/^$/,/^END/s/hills/mountains/g' myfile3.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):83 +msgid "" +"This example will swap 'hills' for 'mountains', but only on blocks of text " +"beginning with a blank line, and ending with a line beginning with the three " +"characters 'END', inclusive." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):89 +msgid "" +"Another nice thing about the <c>s///</c> command is that we have a lot of " +"options when it comes to those <c>/</c> separators. If we're performing " +"string substitution and the regular expression or replacement string has a " +"lot of slashes in it, we can change the separator by specifying a different " +"character after the 's'. For example, this will replace all occurrences of " +"<path>/usr/local</path> with <path>/usr</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):98 +msgid "Replacing all the occurences of one string with another one" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):98 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e 's:/usr/local:/usr:g' mylist.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(note):102 +msgid "" +"In this example, we're using the colon as a separator. If you ever need to " +"specify the separator character in the regular expression, put a backslash " +"before it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):111 +msgid "Regexp snafus" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):114 +msgid "" +"Up until now, we've only performed simple string substitution. While this is " +"handy, we can also match a regular expression. For example, the following " +"sed command will match a phrase beginning with '<' and ending with " +"'>', and containing any number of characters inbetween. This phrase will " +"be deleted (replaced with an empty string):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):122 +msgid "Deleting specified phrase" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):122 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e 's/<.*>//g' myfile.html</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):126 +msgid "" +"This is a good first attempt at a sed script that will remove HTML tags from " +"a file, but it won't work well, due to a regular expression quirk. The " +"reason? When sed tries to match the regular expression on a line, it finds " +"the longest match on the line. This wasn't an issue in my previous sed " +"article, because we were using the <c>d</c> and <c>p</c> commands, which " +"would delete or print the entire line anyway. But when we use the <c>s///</" +"c> command, it definitely makes a big difference, because the entire portion " +"that the regular expression matches will be replaced with the target string, " +"or in this case, deleted. This means that the above example will turn the " +"following line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):138 +msgid "Sample HTML code" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):138 +#, no-wrap +msgid "" +"\n" +"<b>This</b> is what <b>I</b> meant.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):142 +msgid "Into this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):146 +msgid "Not desired effect" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):146 +#, no-wrap +msgid "" +"\n" +"meant.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):150 +msgid "Rather than this, which is what we wanted to do:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):154 +msgid "Desired effect" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):154 +#, no-wrap +msgid "" +"\n" +"This is what I meant.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):158 +msgid "" +"Fortunately, there is an easy way to fix this. Instead of typing in a " +"regular expression that says \"a '<' character followed by any number of " +"characters, and ending with a '>' character\", we just need to type in a " +"regexp that says \"a '<' character followed by any number of non-'>' " +"characters, and ending with a '>' character\". This will have the effect " +"of matching the shortest possible match, rather than the longest possible " +"one. The new command looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):168 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e 's/<[^>]*>//g' myfile.html</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):172 +msgid "" +"In the above example, the '[^>]' specifies a \"non-'>'\" character, " +"and the '*' after it completes this expression to mean \"zero or more " +"non-'>' characters\". Test this command on a few sample html files, pipe " +"them to more, and review their results." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):182 +msgid "More character matching" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):185 +msgid "" +"The '[ ]' regular expression syntax has some more additional options. To " +"specify a range of characters, you can use a '-' as long as it isn't in the " +"first or last position, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):191 +msgid "Specifying a rangle of characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):191 +#, no-wrap +msgid "" +"\n" +"'[a-x]*'\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):195 +msgid "" +"This will match zero or more characters, as long as all of them are " +"'a','b','c'...'v','w','x'. In addition, the '[:space:]' character class is " +"available for matching whitespace. Here's a fairly complete list of " +"available character classes:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(th):205 +msgid "Character class" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(th):206 +msgid "Description" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):209 +msgid "[:alnum:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):210 +msgid "Alphanumeric [a-z A-Z 0-9]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):213 +msgid "[:alpha:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):214 +msgid "Alphabetic [a-z A-Z]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):217 +msgid "[:blank:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):218 +msgid "Spaces or tabs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):221 +msgid "[:cntrl:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):222 +msgid "Any control characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):225 +msgid "[:digit:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):226 +msgid "Numeric digits [0-9]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):229 +msgid "[:graph:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):230 +msgid "Any visible characters (no whitespace)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):233 +msgid "[:lower:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):234 +msgid "Lower-case [a-z]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):237 +msgid "[:print:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):238 +msgid "Non-control characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):241 +msgid "[:punct:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):242 +msgid "Punctuation characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):245 +msgid "[:space:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):246 +msgid "Whitespace" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):249 +msgid "[:upper:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):250 +msgid "Upper-case [A-Z]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):253 +msgid "[:xdigit:]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(ti):254 +msgid "hex digits [0-9 a-f A-F]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):258 +msgid "" +"It's advantageous to use character classes whenever possible, because they " +"adapt better to nonEnglish speaking locales (including accented characters " +"when necessary, etc.)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):267 +msgid "Advanced substitution stuff" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):270 +msgid "" +"We've looked at how to perform simple and even reasonably complex straight " +"substitutions, but sed can do even more. We can actually refer to either " +"parts of or the entire matched regular expression, and use these parts to " +"construct the replacement string. As an example, let's say you were replying " +"to a message. The following example would prefix each line with the phrase " +"\"ralph said: \":" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):278 +msgid "Prefixing each line with certain string" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):278 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e 's/.*/ralph said: &/' origmsg.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):282 +msgid "The output will look like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):286 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):355 +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):483 +msgid "Output of the above command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):286 +#, no-wrap +msgid "" +"\n" +"ralph said: Hiya Jim,\n" +"ralph said:\n" +"ralph said: I sure like this sed stuff!\n" +"ralph said:\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):293 +msgid "" +"In this example, we use the '&' character in the replacement string, " +"which tells sed to insert the entire matched regular expression. So, " +"whatever was matched by '.*' (the largest group of zero or more characters " +"on the line, or the entire line) can be inserted anywhere in the replacement " +"string, even multiple times. This is great, but sed is even more powerful." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):304 +msgid "Those wonderful backslashed parentheses" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):307 +msgid "" +"Even better than '&', the <c>s///</c> command allows us to define " +"regions in our regular expression, and we can refer to these specific " +"regions in our replacement string. As an example, let's say we have a file " +"that contains the following text:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):314 +msgid "Sample text" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):314 +#, no-wrap +msgid "" +"\n" +"foo bar oni\n" +"eeny meeny miny\n" +"larry curly moe\n" +"jimmy the weasel\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):321 +msgid "" +"Now, let's say we wanted to write a sed script that would replace \"eeny " +"meeny miny\" with \"Victor eeny-meeny Von miny\", etc. To do this, first we " +"would write a regular expression that would match the three strings, " +"separated by spaces:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):327 +msgid "Matching regular expression" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):327 +#, no-wrap +msgid "" +"\n" +"'.* .* .*'\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):331 +msgid "" +"There. Now, we will define regions by inserting backslashed parentheses " +"around each region of interest:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):336 +msgid "Defining regions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):336 +#, no-wrap +msgid "" +"\n" +"'\\(.*\\) \\(.*\\) \\(.*\\)'\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):340 +msgid "" +"This regular expression will work the same as our first one, except that it " +"will define three logical regions that we can refer to in our replacement " +"string. Here's the final script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):346 +msgid "Final script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):346 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e 's/\\(.*\\) \\(.*\\) \\(.*\\)/Victor \\1-\\2 Von \\3/' myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):350 +msgid "" +"As you can see, we refer to each parentheses-delimited region by typing " +"'\\x', where x is the number of the region, starting at one. Output is as " +"follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):355 +#, no-wrap +msgid "" +"\n" +"Victor foo-bar Von oni\n" +"Victor eeny-meeny Von miny\n" +"Victor larry-curly Von moe\n" +"Victor jimmy-the Von weasel\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):362 +msgid "" +"As you become more familiar with sed, you will be able to perform fairly " +"powerful text processing with a minimum of effort. You may want to think " +"about how you'd have approached this problem using your favorite scripting " +"language -- could you have easily fit the solution in one line?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):372 +msgid "Mixing things up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):375 +msgid "" +"As we begin creating more complex sed scripts, we need the ability to enter " +"more than one command. There are several ways to do this. First, we can use " +"semicolons between the commands. For example, this series of commands uses " +"the '=' command, which tells sed to print the line number, as well as the " +"<c>p</c> command, which explicitly tells sed to print the line (since we're " +"in '-n' mode):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):384 +msgid "First method, semicolons" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):384 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -n -e '=;p' myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):388 +msgid "" +"Whenever two or more commands are specified, each command is applied (in " +"order) to every line in the file. In the above example, first the '=' " +"command is applied to line 1, and then the <c>p</c> command is applied. " +"Then, sed proceeds to line 2, and repeats the process. While the semicolon " +"is handy, there are instances where it won't work. Another alternative is to " +"use two -e options to specify two separate commands:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):397 +msgid "Second method, multiple -e" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):397 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -n -e '=' -e 'p' myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):401 +msgid "" +"However, when we get to the more complex append and insert commands, even " +"multiple '-e' options won't help us. For complex multiline scripts, the best " +"way is to put your commands in a separate file. Then, reference this script " +"file with the -f options:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):408 +msgid "Third method, external file with commands" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):408 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -n -f mycommands.sed myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):412 +msgid "This method, although arguably less convenient, will always work." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):419 +msgid "Multiple commands for one address" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):422 +msgid "" +"Sometimes, you may want to specify multiple commands that will apply to a " +"single address. This comes in especially handy when you are performing lots " +"of <c>s///</c> to transform words or syntax in the source file. To perform " +"multiple commands per address, enter your sed commands in a file, and use " +"the '{ }' characters to group commands, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):430 +msgid "Entering multiple commands per address" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):430 +#, no-wrap +msgid "" +"\n" +"1,20{\n" +" s/[Ll]inux/GNU\\/Linux/g\n" +" s/samba/Samba/g\n" +" s/posix/POSIX/g\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):438 +msgid "" +"The above example will apply three substitution commands to lines 1 through " +"20, inclusive. You can also use regular expression addresses, or a " +"combination of the two:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):444 +msgid "Combination of both methods" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):444 +#, no-wrap +msgid "" +"\n" +"1,/^END/{\n" +" s/[Ll]inux/GNU\\/Linux/g \n" +" s/samba/Samba/g \n" +" s/posix/POSIX/g \n" +" p\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):453 +msgid "" +"This example will apply all the commands between '{ }' to the lines starting " +"at 1 and up to a line beginning with the letters \"END\", or the end of file " +"if \"END\" is not found in the source file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):462 +msgid "Append, insert, and change line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):465 +msgid "" +"Now that we're writing sed scripts in separate files, we can take advantage " +"of the append, insert, and change line commands. These commands will insert " +"a line after the current line, insert a line before the current line, or " +"replace the current line in the pattern space. They can also be used to " +"insert multiple lines into the output. The insert line command is used as " +"follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):473 +msgid "Using the insert line command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):473 +#, no-wrap +msgid "" +"\n" +"i\\\n" +"This line will be inserted before each line\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):478 +msgid "" +"If you don't specify an address for this command, it will be applied to each " +"line and produce output that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):483 +#, no-wrap +msgid "" +"\n" +"This line will be inserted before each line\n" +"line 1 here\n" +"This line will be inserted before each line\n" +"line 2 here\n" +"This line will be inserted before each line\n" +"line 3 here\n" +"This line will be inserted before each line\n" +"line 4 here\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):494 +msgid "" +"If you'd like to insert multiple lines before the current line, you can add " +"additional lines by appending a backslash to the previous line, like so:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):499 +msgid "Inserting multiple lines before the current one" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):499 +#, no-wrap +msgid "" +"\n" +"i\\\n" +"insert this line\\\n" +"and this one\\\n" +"and this one\\\n" +"and, uh, this one too.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):507 +msgid "" +"The append command works similarly, but will insert a line or lines after " +"the current line in the pattern space. It's used as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre:caption):512 +msgid "Appending lines after the current one" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(pre):512 +#, no-wrap +msgid "" +"\n" +"a\\\n" +"insert this line after each line. Thanks! :)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):517 +msgid "" +"On the other hand, the \"change line\" command will actually replace the " +"current line in the pattern space, and is used as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):522 +msgid "" +"Because the append, insert, and change line commands need to be entered on " +"multiple lines, you'll want to type them in to text sed scripts and tell sed " +"to source them by using the '-f' option. Using the other methods to pass " +"commands to sed will result in problems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):532 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(p):535 +msgid "" +"Next time, in the final article of this series on sed, I'll show you lots of " +"excellent real-world examples of using sed for many different kinds of " +"tasks. Not only will I show you what the scripts do, but why they do what " +"they do. After you're done, you'll have additional excellent ideas of how to " +"use sed in your various projects. I'll see you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):548 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(title):550 +msgid "Useful links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(li):554 +msgid "" +"Read Daniel's other sed articles from developerWorks: Common threads: Sed by " +"example, <uri link=\"l-sed1.xml\">Part 1</uri> and <uri link=\"l-sed3.xml" +"\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(li):559 +msgid "" +"Check out Eric Pement's excellent <uri link=\"http://sed.sourceforge.net/" +"sedfaq.html\">sed FAQ</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(li):564 +msgid "" +"You can find the sources to sed at <uri>ftp://ftp.gnu.org/pub/gnu/sed</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(li):568 +msgid "" +"Eric Pement also has a handy list of <uri link=\"http://sed.sourceforge.net/" +"sed1line.txt\">sed one-liners</uri> that any aspiring sed guru should " +"definitely look at." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(li):573 +msgid "" +"If you'd like a good old-fashioned book, <uri link=\"http://www.oreilly.com/" +"catalog/sed2/\">O'Reilly's sed & awk, 2nd Edition</uri> would be " +"wonderful choice." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/l-sed3.xml.po b/article/gettext/ru/l-sed3.xml.po new file mode 100644 index 0000000..5c05018 --- /dev/null +++ b/article/gettext/ru/l-sed3.xml.po @@ -0,0 +1,800 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:37+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(guide:link):5 +msgid "/doc/en/articles/l-sed3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):6 +msgid "Sed by example, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(abstract):12 +msgid "" +"In this conclusion of the sed series, Daniel Robbins gives you a true taste " +"of the power of sed. After introducing a handful of essential sed scripts, " +"he'll demonstrate some radical sed scripting by converting a Quicken .QIF " +"file into a text-readable format. This conversion script is not only " +"functional, it also serves as en excellent example of sed scripting power." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(version):25 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(date):26 +msgid "2008-02-14" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):29 +msgid "Taking it to the next level: Data crunching, sed style" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):31 +msgid "Muscular sed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):34 +msgid "" +"In <uri link=\"l-sed2.xml\">my second sed article</uri>, I offered examples " +"that demonstrated how sed works, but very few of these examples actually did " +"anything particularly useful. In this final sed article, it's time to change " +"that pattern and put sed to good use. I'll show you several excellent " +"examples that not only demonstrate the power of sed, but also do some really " +"neat (and handy) things. For example, in the second half of the article, " +"I'll show you how I designed a sed script that converts a .QIF file from " +"Intuit's Quicken financial program into a nicely formatted text file. Before " +"doing that, we'll take a look at some less complicated yet useful sed " +"scripts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):49 +msgid "Text translation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):52 +msgid "" +"Our first practical script converts UNIX-style text to DOS/Windows format. " +"As you probably know, DOS/Windows-based text files have a CR (carriage " +"return) and LF (line feed) at the end of each line, while UNIX text has only " +"a line feed. There may be times when you need to move some UNIX text to a " +"Windows system, and this script will perform the necessary format conversion " +"for you." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):60 +msgid "Format conversion between UNIX and Windows" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):60 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e 's/$/\\r/' myunix.txt > mydos.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):64 +msgid "" +"In this script, the '$' regular expression will match the end of the line, " +"and the '\\r' tells sed to insert a carriage return right before it. Insert " +"a carriage return before a line feed, and presto, a CR/LF ends each line. " +"Please note that the '\\r' will be replaced with a CR only when using GNU " +"sed 3.02.80 or later. If you haven't installed GNU sed 3.02.80 yet, see <uri " +"link=\"l-sed1.xml\">my first sed article</uri> for instructions on how to do " +"this." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):74 +msgid "" +"I can't tell you how many times I've downloaded some example script or C " +"code, only to find that it's in DOS/Windows format. While many programs " +"don't mind DOS/Windows format CR/LF text files, several programs definitely " +"do -- the most notable being bash, which chokes as soon as it encounters a " +"carriage return. The following sed invocation will convert DOS/Windows " +"format text to trusty UNIX format:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):83 +msgid "Converting C code from Windows to UNIX format" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):83 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e 's/.$//' mydos.txt > myunix.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):87 +msgid "" +"The way this script works is simple: our substitution regular expression " +"matches the last character on the line, which happens to be a carriage " +"return. We replace it with nothing, causing it to be deleted from the output " +"entirely. If you use this script and notice that the last character of every " +"line of the output has been deleted, you've specified a text file that's " +"already in UNIX format. No need for that!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):99 +msgid "Reversing lines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):102 +msgid "" +"Here's another handy little script. This one will reverse lines in a file, " +"similar to the \"tac\" command that's included with most Linux " +"distributions. The name \"tac\" may be a bit misleading, because \"tac\" " +"doesn't reverse the position of characters on the line (left and right), but " +"rather the position of lines in the file (up and down). Tacing the following " +"file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):110 +msgid "Sample file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):110 +#, no-wrap +msgid "" +"\n" +"foo\n" +"bar\n" +"oni\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):116 +msgid "....produces the following output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):120 +msgid "Output file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):120 +#, no-wrap +msgid "" +"\n" +"oni\n" +"bar\n" +"foo\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):126 +msgid "We can do the same thing with the following sed script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):130 +msgid "Doing same with script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):130 +#, no-wrap +msgid "" +"\n" +"$ <i>sed -e '1!G;h;$!d' forward.txt > backward.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):134 +msgid "" +"You'll find this sed script useful if you're logged in to a FreeBSD system, " +"which doesn't happen to have a \"tac\" command. While handy, it's also a " +"good idea to know why this script does what it does. Let's dissect it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):143 +msgid "Reversal explained" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):146 +msgid "" +"First, this script contains three separate sed commands, separated by " +"semicolons: '1!G', 'h' and '$!d'. Now, it's time to get an good " +"understanding of the addresses used for the first and third commands. If the " +"first command were '1G', the 'G' command would be applied only to the first " +"line. However, there is an additional '!' character -- this '!' character " +"negates the address, meaning that the 'G' command will apply to all but the " +"first line. For the '$!d' command, we have a similar situation. If the " +"command were '$d', it would apply the 'd' command to only the last line in " +"the file (the '$' address is a simple way of specifying the last line). " +"However, with the '!', '$!d' will apply the 'd' command to all but the last " +"line. Now, all we need to to is understand what the commands themselves do." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):160 +msgid "" +"When we execute our line reversal script on the text file above, the first " +"command that gets executed is 'h'. This command tells sed to copy the " +"contents of the pattern space (the buffer that holds the current line being " +"worked on) to the hold space (a temporary buffer). Then, the 'd' command is " +"executed, which deletes \"foo\" from the pattern space, so it doesn't get " +"printed after all the commands are executed for this line." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):169 +msgid "" +"Now, line two. After \"bar\" is read into the pattern space, the 'G' command " +"is executed, which appends the contents of the hold space (\"foo\\n\") to " +"the pattern space (\"bar\\n\"), resulting in \"bar\\n\\foo\\n\" in our " +"pattern space. The 'h' command puts this back in the hold space for " +"safekeeping, and 'd' deletes the line from the pattern space so that it " +"isn't printed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):177 +msgid "" +"For the last \"oni\" line, the same steps are repeated, except that the " +"contents of the pattern space aren't deleted (due to the '$!' before the " +"'d'), and the contents of the pattern space (three lines) are printed to " +"stdout." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):183 +msgid "Now, it's time to do some powerful data conversion with sed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):190 +msgid "sed QIF magic" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):193 +msgid "" +"For the last few weeks, I've been thinking about purchasing a copy of " +"Quicken to balance my bank accounts. Quicken is a very nice financial " +"program, and would certainly perform the job with flying colors. But, after " +"thinking about it, I decided that I could easily write some software that " +"would balance my checkbook. After all, I reasoned, I'm a software developer!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):201 +msgid "" +"I developed a nice little checkbook balancing program (using awk) that " +"calculates by balance by parsing a text file containing all my transactions. " +"After a bit of tweaking, I improved it so that I could keep track of " +"different credit and debit categories, just like Quicken can. But, there was " +"one more feature I wanted to add. I recently switched my accounts to a bank " +"that has an online Web account interface. One day, I noticed that my bank's " +"Web site allowed me to to download my account information in Quicken's .QIF " +"format. In very little time, I decided that it would be really neat if I " +"could convert this information into text format." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):216 +msgid "A tale of two formats" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):219 +msgid "" +"Before we look at the QIF format, here's what my checkbook.txt format looks " +"like:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):224 +msgid "Sample of QIF format" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):224 +#, no-wrap +msgid "" +"\n" +"28 Aug 2000 food - - Y Supermarket 30.94\n" +"25 Aug 2000 watr - 103 Y Check 103 52.86\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):229 +msgid "" +"In my file, all fields are separated by one or more tabs, with one " +"transaction per line. After the date, the next field lists the type of " +"expense (or \"-\" if this is an income item). The third field lists the type " +"of income (or \"-\" if this is an expense item). Then, there's a check " +"number field (again, \"-\" if empty), a transaction cleared field (\"Y\" or " +"\"N\"), a comment and a dollar amount. Now, we're ready to take a look at " +"the QIF format. When I viewed my downloaded QIF file in a text viewer, this " +"is what I saw:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):239 +msgid "Malformed file output" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):239 +#, no-wrap +msgid "" +"\n" +"!Type:Bank\n" +"D08/28/2000\n" +"T-8.15\n" +"N\n" +"PCHECKCARD SUPERMARKET\n" +"^\n" +"D08/28/2000\n" +"T-8.25\n" +"N\n" +"PCHECKCARD PUNJAB RESTAURANT\n" +"^\n" +"D08/28/2000\n" +"T-17.17\n" +"N\n" +"PCHECKCARD SUPERMARKET\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):257 +msgid "" +"After scanning the file, wasn't very hard to figure out the format -- " +"ignoring the first line, the format is as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):262 +msgid "File format" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):262 +#, no-wrap +msgid "" +"\n" +"D<date>\n" +"T<transaction amount>\n" +"N<check number>\n" +"P<description>\n" +"^\n" +"<comment>(this is the field separator)</comment>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):274 +msgid "Starting the process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):277 +msgid "" +"When you're tackling a significant sed project like this, don't get " +"discouraged -- sed allows you to gradually massage the data into its final " +"form. As you progress, you can continue to refine your sed script until your " +"output appears exactly as intended. You don't need to get it exactly right " +"on the first try." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):284 +msgid "" +"To start off, I created a file called <path>qiftrans.sed</path>, and started " +"massaging the data:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):289 +msgid "qiftrans.sed" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):289 +#, no-wrap +msgid "" +"\n" +"1d\n" +"/^^/d\n" +"s/[[:cntrl:]]//g\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):295 +msgid "" +"The first '1d' command deletes the first line, and the second command " +"removes those pesky '^' characters from the output. The last line removes " +"any control characters that may exist in the file. Since I'm dealing with a " +"foreign file format, I want to eliminate the risk of encountering any " +"control characters along the way. So far, so good. Now, it's time to add " +"some processing punch to this basic script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):304 +msgid "Improved basic script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):304 +#, no-wrap +msgid "" +"\n" +"1d\n" +"/^^/d\n" +"s/[[:cntrl:]]//g\n" +"/^D/ {\n" +" s/^D\\(.*\\)/\\1\\tOUTY\\tINNY\\t/\n" +" s/^01/Jan/\n" +" s/^02/Feb/\n" +" s/^03/Mar/\n" +" s/^04/Apr/\n" +" s/^05/May/\n" +" s/^06/Jun/\n" +" s/^07/Jul/\n" +" s/^08/Aug/\n" +" s/^09/Sep/\n" +" s/^10/Oct/\n" +" s/^11/Nov/\n" +" s/^12/Dec/\n" +" s:^\\(.*\\)/\\(.*\\)/\\(.*\\):\\2 \\1 \\3: \n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):326 +msgid "" +"First, I add a '/^D/' address so that sed will only begin processing when it " +"encounters the first character of the QIF date field, 'D'. All of the " +"commands in the curly braces will execute in order as soon as sed reads such " +"a line into its pattern space." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):333 +msgid "" +"The first line in the curly braces will transform a line that looks like:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):337 +msgid "First line before change" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):337 +#, no-wrap +msgid "" +"\n" +"D08/28/2000\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):341 +msgid "into one that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):345 +msgid "First line after change" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):345 +#, no-wrap +msgid "" +"\n" +"08/28/2000 OUTY INNY\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):349 +msgid "" +"Of course, this format isn't perfect right now, but that's OK. We'll " +"gradually refine the contents of the pattern space as we go. The next 12 " +"lines have the net effect of transforming the date to a three-letter format, " +"with the last line removing the three slashes from the date. We end up with " +"this line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):356 +msgid "Final look of the line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):356 +#, no-wrap +msgid "" +"\n" +"Aug 28 2000 OUTY INNY\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):360 +msgid "" +"The OUTY and INNY fields are serving as placeholders and will get replaced " +"later. I can't specify them just yet, because if the dollar amount is " +"negative, I'll want to set OUTY and INNY to \"misc\" and \"-\", but if the " +"dollar amount is positive, I'll want to change them to \"-\" and \"inco\" " +"respectively. Since the dollar amount hasn't been read yet, I need to use " +"placeholders for the time being." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):372 +msgid "Refinement" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):375 +msgid "Now, it's time for some further refinement:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):379 +msgid "Further refinement" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):379 +#, no-wrap +msgid "" +"\n" +"1d \n" +"/^^/d\n" +"s/[[:cntrl:]]//g \n" +"/^D/ { \n" +" s/^D\\(.*\\)/\\1\\tOUTY\\tINNY\\t/ \n" +" s/^01/Jan/ \n" +" s/^02/Feb/ \n" +" s/^03/Mar/ \n" +" s/^04/Apr/ \n" +" s/^05/May/ \n" +" s/^06/Jun/ \n" +" s/^07/Jul/ \n" +" s/^08/Aug/ \n" +" s/^09/Sep/ \n" +" s/^10/Oct/ \n" +" s/^11/Nov/ \n" +" s/^12/Dec/ \n" +" s:^\\(.*\\)/\\(.*\\)/\\(.*\\):\\2 \\1 \\3: \n" +" N \n" +" N \n" +" N \n" +" s/\\nT\\(.*\\)\\nN\\(.*\\)\\nP\\(.*\\)/NUM\\2NUM\\t\\tY\\t\\t\\3\\tAMT\\1AMT/ \n" +" s/NUMNUM/-/ \n" +" s/NUM\\([0-9]*\\)NUM/\\1/ \n" +" s/\\([0-9]\\),/\\1/ \n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):408 +msgid "" +"The next seven lines are a bit complicated, so we'll cover them in detail. " +"First, we have three 'N' commands in a row. The 'N' command tells sed to " +"read in the next line in the input and append it to our current pattern " +"space. The three 'N' commands cause the next three lines to be appended to " +"our current pattern space buffer, and now our line looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):416 +msgid "New look of our lines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):416 +#, no-wrap +msgid "" +"\n" +"28 Aug 2000 OUTY INNY \\nT-8.15\\nN\\nPCHECKCARD SUPERMARKET\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):420 +msgid "" +"Sed's pattern space got ugly -- we need to remove the extra newlines and " +"perform some additional formatting. To do this, we'll use the substitution " +"command. The pattern we want to match is:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):426 +msgid "Removing extra lines and applying some additional formatting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):426 +#, no-wrap +msgid "" +"\n" +"'\\nT.*\\nN.*\\nP.*'\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):430 +msgid "" +"This will match a newline, followed by a 'T', followed by zero or more " +"characters, followed by a newline, followed by an 'N', followed by any " +"number of characters and a newline, followed by a 'P', followed by any " +"number of characters. Phew! This regexp will match the entire contents of " +"the three lines we just appended to the pattern space. But we want to " +"reformat this region, not replace it entirely. The dollar amount, check " +"number (if any) and description need to reappear in our replacement string. " +"To do this, we surround those \"interesting parts\" with backslashed " +"parentheses, so that we can refer to them in our replacement string (using " +"'\\1', '\\2\\, and '\\3' to tell sed where to insert them). Here is the " +"final command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):443 +msgid "The final command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):443 +#, no-wrap +msgid "" +"\n" +"s/\\nT\\(.*\\)\\nN\\(.*\\)\\nP\\(.*\\)/NUM\\2NUM\\t\\tY\\t\\t\\3\\tAMT\\1AMT/\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):447 +msgid "This command transforms our line into:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):451 +msgid "Result of the above command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):451 +#, no-wrap +msgid "" +"\n" +"28 Aug 2000 OUTY INNY NUMNUM Y CHECKCARD SUPERMARKET AMT-8.15AMT\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):455 +msgid "" +"While this line is getting better, there are a few things that at first " +"glance appear a bit...er...interesting. The first is that silly \"NUMNUM\" " +"string -- what purpose does that serve? You'll find out as you inspect the " +"next two lines of the sed script, which will replace \"NUMNUM\" with a \"-" +"\", while \"NUM\"<number>\"NUM\" will be replaced with <number>. " +"As you can see, surrounding the check number with a silly tag allows us to " +"conveniently insert a \"-\" if the field is empty." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):468 +msgid "Finishing touches" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):471 +msgid "" +"The last line removes a comma following a number. This converts dollar " +"amounts like \"3,231.00\" to \"3231.00\", which is the format I use. Now, " +"it's time to take a look at the final, production script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):477 +msgid "The final, production script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):477 +#, no-wrap +msgid "" +"\n" +"1d\n" +"/^^/d\n" +"s/[[:cntrl:]]//g\n" +"/^D/ {\n" +" s/^D\\(.*\\)/\\1\\tOUTY\\tINNY\\t/\n" +" s/^01/Jan/\n" +" s/^02/Feb/\n" +" s/^03/Mar/\n" +" s/^04/Apr/\n" +" s/^05/May/\n" +" s/^06/Jun/\n" +" s/^07/Jul/\n" +" s/^08/Aug/\n" +" s/^09/Sep/\n" +" s/^10/Oct/\n" +" s/^11/Nov/\n" +" s/^12/Dec/\n" +" s:^\\(.*\\)/\\(.*\\)/\\(.*\\):\\2 \\1 \\3:\n" +" N\n" +" N\n" +" N\n" +" s/\\nT\\(.*\\)\\nN\\(.*\\)\\nP\\(.*\\)/NUM\\2NUM\\t\\tY\\t\\t\\3\\tAMT\\1AMT/\n" +" s/NUMNUM/-/\n" +" s/NUM\\([0-9]*\\)NUM/\\1/\n" +" s/\\([0-9]\\),/\\1/\n" +" /AMT-[0-9]*.[0-9]*AMT/b fixnegs\n" +" s/AMT\\(.*\\)AMT/\\1/\n" +" s/OUTY/-/\n" +" s/INNY/inco/\n" +" b done\n" +":fixnegs\n" +" s/AMT-\\(.*\\)AMT/\\1/\n" +" s/OUTY/misc/\n" +" s/INNY/-/\n" +":done\n" +"}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):516 +msgid "" +"The additional eleven lines use substitution and some branching " +"functionality to perfect the output. We'll want to take a look at this line " +"first:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):521 +msgid "First line worth looking at" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):521 +#, no-wrap +msgid "" +"\n" +" /AMT-[0-9]*.[0-9]*AMT/b fixnegs \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):525 +msgid "" +"This line contains a branch command, which is of the format \"/regexp/b label" +"\". If the pattern space matches the regexp, sed will branch to the fixnegs " +"label. You should be able to easily spot this label, which appears as \":" +"fixnegs\" in the code. If the regexp doesn't match, processing continues as " +"normal with the next command." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):533 +msgid "" +"Now that you understand the workings of the command itself, let's take a " +"look at the branches. If you look at the branch regular expression, you'll " +"see that it will match the string 'AMT', followed by a '-', followed by any " +"number of digits, a '.', any number of digits and 'AMT'. As I'm sure you've " +"figured out, this regexp deals specifically with a negative dollar amount. " +"Earlier, we surrounded our dollar amount with 'AMT' strings so we could " +"easily find it later. Because the regexp only matches dollar amounts that " +"begin with a '-', our branch will only happen if we happen to be dealing " +"with a debit. If we are dealing with a debit, OUTY should be set to 'misc', " +"INNY should be set to '-', and the negative sign in front of the debit " +"amount should be removed. If you follow the code, you'll see that this is " +"exactly what happens. If the branch isn't executed, OUTY gets replaced with " +"'-', and INNY gets replaced with 'inco'. We're finished! Our output line is " +"now perfect:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre:caption):549 +msgid "The perfect output line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(pre):549 +#, no-wrap +msgid "" +"\n" +"28 Aug 2000 misc - - Y CHECKCARD SUPERMARKET -8.15\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(title):556 +msgid "Don't get confused" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(p):559 +msgid "" +"As you can see, converting data using sed isn't all that hard, as long as " +"you approach the problem incrementally. Don't try to do everything with a " +"single sed command, or all at once. Instead, gradually work your way toward " +"the goal, and continue to enhance your sed script until your output looks " +"just the way you want it to. Sed packs a lot of punch, and I hope that " +"you've become very familiar with its inner workings and that you'll continue " +"to grow in your sed mastery!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(li):570 +msgid "" +"Read Daniel's other sed articles from developerWorks: Common threads: Sed by " +"example, <uri link=\"l-sed1.xml\">Part 1</uri> and <uri link=\"l-sed2.xml" +"\">Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(li):575 +msgid "" +"Check out Eric Pement's excellent <uri link=\"http://sed.sourceforge.net/" +"sedfaq.html\">sed FAQ</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(li):579 +msgid "" +"You can find the latest sources to sed at <uri> ftp://ftp.gnu.org/pub/gnu/" +"sed</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(li):583 +msgid "" +"Eric Pement also has a handy list of <uri link=\"http://sed.sourceforge.net/" +"sed1line.txt\">sed one-liners</uri> that any aspiring sed guru should " +"definitely look at." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/l-sed3.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/linux-24-stateful-fw-design.xml.po b/article/gettext/ru/linux-24-stateful-fw-design.xml.po new file mode 100644 index 0000000..9954058 --- /dev/null +++ b/article/gettext/ru/linux-24-stateful-fw-design.xml.po @@ -0,0 +1,1479 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(guide:link):5 +msgid "/doc/en/articles/linux-24-stateful-fw-design.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):6 +msgid "Linux 2.4 stateful firewall design" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(abstract):12 +msgid "" +"This tutorial shows you how to use netfilter to set up a powerful Linux " +"stateful firewall." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(version):22 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(date):23 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):26 +msgid "About this tutorial" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):28 +msgid "Should I take this tutorial?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):31 +msgid "" +"This tutorial shows you how to use netfilter to set up a powerful Linux " +"stateful firewall. All you need is an existing Linux system that's currently " +"using a Linux 2.4 kernel. A laptop, workstation, router or server with a " +"Linux 2.4 kernel will do." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):38 +msgid "" +"You should be reasonably familiar with standard network terminology like IP " +"addresses, source and destination port numbers, TCP, UDP and ICMP, etc. By " +"the end of the tutorial, you'll understand how Linux stateful firewalls are " +"put together and you'll have several example configurations to use in your " +"own projects." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):49 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):52 +msgid "" +"For technical questions about the content of this tutorial, contact the " +"author, Daniel Robbins, at <mail link=\"drobbins@gentoo.org" +"\">drobbins@gentoo.org</mail>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):57 +msgid "" +"Residing in Albuquerque, New Mexico, Daniel Robbins was the President/CEO of " +"Gentoo Technologies, Inc., the creator of Gentoo Linux, an advanced Linux " +"for the PC, and the Portage system, a next-generation ports system for " +"Linux. He has also served as a contributing author for the Macmillan books " +"Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. " +"Daniel has been involved with computers in some fashion since the second " +"grade, when he was first exposed to the Logo programming language as well as " +"a potentially dangerous dose of Pac Man. This probably explains why he has " +"since served as a Lead Graphic Artist at SONY Electronic Publishing/" +"Psygnosis. Daniel enjoys spending time with his wife, Mary, and his new baby " +"daughter, Hadassah." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):75 +msgid "First steps" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):77 +msgid "Defining our goal" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):80 +msgid "" +"In this tutorial, we're going to put together a Linux stateful firewall. Our " +"firewall is going to run on a Linux laptop, workstation, server, or router; " +"its primary goal is to allow only certain types of network traffic to pass " +"through. To increase security, we're going to configure the firewall to drop " +"or reject traffic that we're not interested in, as well as traffic that " +"could pose a security threat." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):92 +msgid "Getting the tools" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):95 +msgid "" +"Before we start designing a firewall, we need to do two things. First, we " +"need to make sure that the <c>iptables</c> command is available. As root, " +"type <c>iptables</c> and see if it exists. If it doesn't, then we'll need to " +"get it installed first. Here's how we do that:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):102 +msgid "Installing necessary tools" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):102 +#, no-wrap +msgid "" +"\n" +"# <i>emerge iptables</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):109 +msgid "Kernel configuration" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):112 +msgid "" +"Once installed, you should have an <c>iptables</c> command available for " +"use, as well as the handy iptables man page (<c>man iptables</c>). Great; " +"now all we need is to make sure that we have the necessary functionality " +"built into the kernel. This tutorial assumes that you compile your own " +"kernels. Head over to <path>/usr/src/linux</path>, and type <c>make " +"menuconfig</c> or <c>make xconfig</c>; we're going to enable some kernel " +"network functionality." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):121 +msgid "" +"Under the \"Networking options\" section, make sure that you enable at least " +"the following options:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):126 +msgid "Necessary kernel options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):126 +#, no-wrap +msgid "" +"\n" +"<*> Packet socket\n" +"[*] Network packet filtering (replaces ipchains)\n" +"<*> Unix domain sockets\n" +"[*] TCP/IP networking\n" +"[*] IP: advanced router\n" +"[*] IP: policy routing\n" +"[*] IP: use netfilter MARK value as routing key\n" +"[*] IP: fast network address translation\n" +"[*] IP: use TOS value as routing key\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):138 +msgid "" +"Then, under the \"IP: Netfilter Configuration ->\" menu, enable every " +"option so that we'll have full netfilter functionality. We won't use all the " +"netfilter features, but it's good to enable them so that you can do some " +"experimentation later on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):145 +msgid "" +"There's one networking option under the \"Networking options\" category that " +"you <e>shouldn't</e> enable: explicit congestion notification. Leave this " +"option disabled:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):151 +msgid "Option we have to disable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):151 +#, no-wrap +msgid "" +"\n" +"[ ] IP: TCP Explicit Congestion Notification support\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):155 +msgid "" +"If this option is enabled, your Linux machine won't be able to carry on " +"network communications with 8% of the Internet. When ECN is enabled, some " +"packets that your Linux box sends out will have the ECN bit set; however, " +"this bit freaks out a number of Internet routers, so it's very important " +"that ECN is disabled." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):162 +msgid "" +"OK, now that the kernel's configured correctly for our needs, compile a new " +"one, install it, and reboot. Time to start playing with netfilter :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):170 +msgid "Firewall design basics" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):173 +msgid "" +"In putting together our firewall, the <c>iptables</c> command is our friend. " +"It's what we use to interact with the network packet filtering rules in the " +"kernel. We'll use the <c>iptables</c> command to create new rules, list " +"existing rules, flush rules, and set default packet handling policies. This " +"means that to create our firewall, we're going to enter a series of iptables " +"commands, and here's the first one we're going to take a look at (please " +"don't type this in just yet!)..." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):183 +msgid "Changing chain policy to DROP" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):183 +#, no-wrap +msgid "" +"\n" +"# <i>iptables -P INPUT DROP</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):187 +msgid "" +"You're looking at an almost \"perfect\" firewall. If you type in this " +"command, you'll be incredibly well protected against any form of incoming " +"malicious attack. That's because this command tells the kernel to drop all " +"incoming network packets. While this firewall is extremely secure, it's a " +"bit silly. But before moving on, let's take a look at exactly how this " +"command does what it does." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):199 +msgid "Setting chain policy" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):202 +msgid "" +"An <c>iptables -P</c> command is used to set the default policy for a chain " +"of packet filtering rules. In this example, <c>iptables -P</c> is used to " +"set the default policy for the INPUT chain, a built-in chain of rules that's " +"applied to every incoming packet. By setting the default policy to DROP, we " +"tell the kernel that any packets that reach the end of the INPUT rule chain " +"should be dropped (that is, discarded). And, since we haven't added any " +"rules to the INPUT chain, all packets reach the end of the chain, and all " +"packets are dropped." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):212 +msgid "" +"Again, by itself this command is totally useless. However, it demonstrates a " +"good strategy for firewall design. We'll start by dropping all packets by " +"default, and then gradually start opening up our firewall so that it meets " +"our needs. This will ensure that our firewall is as secure as possible." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):224 +msgid "Defining rules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):226 +msgid "A (small) improvement" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):229 +msgid "" +"In this example, let's assume that we're designing a firewall for a machine " +"with two network interfaces, eth0 and eth1. The eth0 network card is " +"connected to our LAN, while the eth1 network card is attached to our DSL " +"router, our connection to the Internet. For such a situation, we could " +"improve our \"ultimate firewall\" by adding one more line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):237 +msgid "Improving our ultimate firewall" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):237 +#, no-wrap +msgid "" +"\n" +"# <i>iptables -P INPUT DROP</i>\n" +"# <i>iptables -A INPUT -i ! eth1 -j ACCEPT</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):242 +msgid "" +"This additional <c>iptables -A</c> line adds a new packet filtering rule to " +"the end of our INPUT chain. After this rule is added, our INPUT chain " +"consists of a single rule and a drop-by-default policy. Now, let's take a " +"look at what our semi-complete firewall does." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):252 +msgid "Following the INPUT chain" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):255 +msgid "" +"When a packet comes in on any interface (lo, eth0, or eth1), the netfilter " +"code directs it to the INPUT chain and checks to see if the packet matches " +"the first rule. If it does, the packet is accepted, and no further " +"processing is performed. If not, the INPUT chain's default policy is " +"enforced, and the packet is discarded (dropped)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):263 +msgid "" +"That's the conceptual overview. Specifically, our first rule matches all " +"packets coming in from eth0 and lo, immediately allowing them in. Any " +"packets coming in from eth1 are dropped. So, if we enable this firewall on " +"our machine, it'll be able to interact with our LAN but be effectively " +"disconnected from the Internet. Let's look at a couple of ways to enable " +"Internet traffic." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):274 +msgid "Traditional firewalls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):277 +msgid "" +"Obviously, for our firewall to be useful, we need to selectively allow some " +"incoming packets to reach our machine via the Internet. There are two " +"approaches to opening up our firewall to the point where it is useful: one " +"uses static rules, and the other uses dynamic, stateful rules." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):284 +msgid "" +"Let's take downloading Web pages as an example. If we want our machine to be " +"able to download Web pages from the Internet, we can add a static rule that " +"will always be true for every incoming http packet, regardless of origin:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):290 +msgid "Accepting all the incoming http packets" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):290 +#, no-wrap +msgid "" +"\n" +"# <i>iptables -A INPUT --sport 80 -j ACCEPT</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):294 +msgid "" +"Since all standard Web traffic originates from a source port of 80, this " +"rule effectively allows our machine to download Web pages. However, this " +"traditional approach, while marginally acceptable, suffers from a bunch of " +"problems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):303 +msgid "Traditional firewall bummers" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):306 +msgid "" +"Here's a problem: while most Web traffic originates from port 80, some " +"doesn't. So, while this rule would work most of the time, there would be " +"rare instances where this rule wouldn't work. For example, maybe you've seen " +"a URL that looks like this: \"http://www.foo.com:81\". This example URL " +"points to a Web site on port 81 rather than the default port 80, and would " +"be unviewable from behind our current firewall. Taking into account all " +"these special cases can quickly turn a fairly secure firewall into swiss " +"cheese and quickly fill our INPUT chain with a bunch of rules to handle the " +"occasional oddball Web site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):317 +msgid "" +"However, the major problem with this rule is security related. Sure, it's " +"true that only traffic with a source port of 80 will be allowed through our " +"firewall. But the source port of a packet is not something that we have any " +"control over, and it can be easily altered by an intruder. For example, if " +"an intruder knew how our firewall were designed, he could bypass our " +"firewall by simply making sure that all his incoming connections originated " +"from port 80 on one of his machines! Because this static firewall rule is so " +"easy to exploit, a more secure dynamic approach is needed. Thankfully, " +"iptables and kernel 2.4 provide everything we need to enable dynamic, " +"stateful filtering." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):334 +msgid "Stateful firewalls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):336 +msgid "State basics" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):339 +msgid "" +"Rather than opening up holes in our firewall based on static protocol " +"characteristics, we can use Linux's new connection tracking functionality to " +"make firewall decisions based on the dynamic connection state of packets. " +"Conntrack works by associating every packet with an individual bidirectional " +"communications channel, or connection." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):347 +msgid "" +"For example, consider what happens when you use telnet or ssh to connect to " +"a remote machine. If you view your network traffic at the packet level, all " +"you see is a bunch of packets zipping from one machine to another. However, " +"at a higher level, this exchange of packets is actually a bidirectional " +"communications channel between your local machine and a remote machine. " +"Traditional (old-fashioned) firewalls only look at the individual packets, " +"not recognizing that they're actually part of a larger whole, a connection." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):360 +msgid "Inside conntrack" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):363 +msgid "" +"That's where connection tracking technology comes in. Linux's conntrack " +"functionality can \"see\" the higher-level connections that are taking " +"place, recognizing your ssh session as a single logical entity. Conntrack " +"can even recognize UDP and ICMP packet exchanges as logical \"connections\", " +"even though UDP and ICMP are connectionless in nature; this is very helpful " +"because it allows us to use conntrack to handle ICMP and UDP packet " +"exchanges." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):372 +msgid "" +"If you've already rebooted and are using your new netfilter-enabled kernel, " +"you can view a list of active network connections that your machine is " +"participating in by typing <c>cat /proc/net/ip_conntrack</c>. Even with no " +"firewall configured, Linux's conntrack functionality is working behind the " +"scenes, keeping track of the connections that your machine is participating " +"in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):383 +msgid "The NEW connection state" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):386 +msgid "" +"Conntrack doesn't just recognize connections, it also classifies every " +"packet that it sees into one of four connection states. The first state that " +"we're going to talk about is called NEW. When you type <c>ssh remote.host." +"com</c>, the initial packet or burst of packets that originate from your " +"machine and are destined for remote.host.com are in the NEW state. However, " +"as soon as you receive even just a single reply packet from remote.host.com, " +"any further packets you send to remote.host.com as part of this connection " +"aren't considered NEW packets anymore. So, a packet is only considered NEW " +"when it's involved in establishing a new connection, and no traffic has yet " +"been received from the remote host (as part of this particular connection, " +"of course)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):399 +msgid "" +"I've described outgoing NEW packets, but it's also very possible (and " +"common) to have incoming NEW packets. Incoming NEW packets generally " +"originate from a remote machine, and are involved in initiating a connection " +"with you. The initial packet(s) your Web server receives as part of a HTTP " +"request would be considered incoming NEW packets; however, once you reply to " +"just a single incoming NEW packet, any additional packets you receive that " +"are related to this particular connection are no longer in the NEW state." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):412 +msgid "The ESTABLISHED state" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):415 +msgid "" +"Once a connection has seen traffic in both directions, additional packets " +"relating to this connection are considered to be in an ESTABLISHED state. " +"The distinction between NEW and ESTABLISHED is an important one, as we'll " +"see in a minute." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):425 +msgid "The RELATED state" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):428 +msgid "" +"The third connection state category is called RELATED. RELATED packets are " +"those that are starting a new connection, but are related to another " +"currently existing connection. The RELATED state can be used to regulate " +"connections that are part of a multi-connection protocol, such as ftp, as " +"well as error packets related to existing connections (such as ICMP error " +"packets related to an existing connection)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):440 +msgid "The INVALID state" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):443 +msgid "" +"Finally, there are INVALID packets: those that can't be classified into one " +"of the above three categories. It's important to note that if a packet is " +"considered INVALID, it isn't automatically discarded; it's still up to you " +"to insert the appropriate rules and set chain policy so that they're handled " +"correctly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):454 +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):463 +msgid "Adding a stateful rule" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):457 +msgid "" +"OK, now that we have a good understanding of connection tracking, it's time " +"to take a look at a single additional rule that transforms our non-" +"functional firewall into something quite useful:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):463 +#, no-wrap +msgid "" +"\n" +"# <i>iptables -P INPUT DROP</i>\n" +"# <i>iptables -A INPUT -i ! eth1 -j ACCEPT</i>\n" +"# <i>iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):472 +msgid "How the rule works" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):475 +msgid "" +"This single rule, when inserted at the end of our existing INPUT chain, will " +"allow us to establish connections with remote machines. It works as follows. " +"Let's say we want to ssh over to remote.host.com. After typing <c>ssh remote." +"host.com</c>, our machine sends out a packet to initiate the connection. " +"This particular packet is in the NEW state, and our firewall allows it out, " +"because we're only blocking packets coming in to our firewall, not going out." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):484 +msgid "" +"When we get a reply packet from remote.host.com, this packet trickles " +"through our INPUT chain. It doesn't match our first rule (since it comes in " +"on eth1), so it moves on to our next, and final rule. If it matches this " +"rule, it will be accepted, and if it doesn't, it will fall off the end of " +"the INPUT chain and the default policy will be applied to the packet (DROP). " +"So, is this incoming reply packet accepted or dropped on the floor?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):493 +msgid "" +"Answer: accepted. When the kernel inspects this incoming packet, it first " +"recognizes that it's part of an already existing connection. Then, the " +"kernel needs to decide whether this is a NEW or ESTABLISHED packet. Since " +"this is an incoming packet, it checks to see if this connection has had any " +"outgoing traffic, and finds that it has (our initial NEW packet that we sent " +"out). Therefore, this incoming packet is categorized as ESTABLISHED, as are " +"any further packets we receive or send that are associated with this " +"connection." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):506 +msgid "Incoming NEW packets" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):509 +msgid "" +"Now, let's consider what happens if someone on a remote machine tries to ssh " +"in to us. The initial packet we receive is classified as NEW, and doesn't " +"match rule 1, so it advances to rule 2. Because this packet isn't in an " +"ESTABLISHED or RELATED state, it falls off the end of the INPUT chain and " +"the default policy, DROP, is applied. Our incoming ssh connection request is " +"dropped to the floor without so much as a reply (or TCP reset) from us." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):521 +msgid "A near-perfect firewall" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):524 +msgid "" +"So, what kind of firewall do we have so far? An excellent one for a laptop " +"or a workstation where you don't want anyone from the Internet connecting to " +"you, but where you need to connect to sites on the Internet. You'll be able " +"to use Netscape, konqueror, ftp, ping, perform DNS lookups, and more. Any " +"connection that you initiate will get back in through the firewall. However, " +"any unsolicited connection that comes in from the Internet will be dropped, " +"unless it's related to an existing connection that you initiated. As long as " +"you don't need to provide any network services to the outside, this is a " +"near-perfect firewall." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):539 +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):547 +msgid "A basic firewall script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):542 +msgid "" +"Here's a simple script that can be used to set up/tear down our first basic " +"workstation firewall:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):547 +#, no-wrap +msgid "" +"\n" +"#!/bin/bash\n" +"<comment># A basic stateful firewall for a workstation or laptop that isn't running any</comment>\n" +"<comment># network services like a web server, SMTP server, ftp server, etc.</comment>\n" +"\n" +"if [ \"$1\" = \"start\" ]\n" +"then\n" +" echo \"Starting firewall...\"\n" +" iptables -P INPUT DROP\n" +" iptables -A INPUT -i ! eth1 -j ACCEPT\n" +" iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\n" +"elif [ \"$1\" = \"stop\" ]\n" +"then\n" +" echo \"Stopping firewall...\"\n" +" iptables -F INPUT\n" +" iptables -P INPUT ACCEPT\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):569 +msgid "Using the script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):572 +msgid "" +"Using this script, you can bring down the firewall by typing <c>./firewall " +"stop</c>, and bring it back up again by typing <c>./firewall start</c>. To " +"bring down the firewall, we flush our rules out of the INPUT chain with a " +"<c>iptables -F INPUT</c>, and then switch the default INPUT policy back to " +"ACCEPT with a <c>iptables -P INPUT ACCEPT</c> command. Now, let's look at a " +"bunch of improvements that we can make to our existing workstation firewall. " +"Once I've explained every improvement, I'll present a final workstation " +"firewall script. Then, we'll start customizing our firewall for servers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):588 +msgid "Stateful improvements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):590 +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):602 +msgid "Explicitly turn off ECN" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):593 +msgid "" +"I mentioned earlier that it's important to turn off ECN (explicit congestion " +"notification) so that Internet communications will work properly. While you " +"may have disabled ECN in the kernel per my suggestion, it's possible that in " +"the future, you'll forget to do so. Or, possibly, you'll pass your firewall " +"script along to someone who has ECN enabled. For these reasons, it's a good " +"idea to use the <path>/proc</path> interface to explicitly disable ECN, as " +"follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):602 +#, no-wrap +msgid "" +"\n" +"if [ -e /proc/sys/net/ipv4/tcp_ecn ]\n" +"then\n" +" echo 0 > /proc/sys/net/ipv4/tcp_ecn\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):612 +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):624 +msgid "Forwarding" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):615 +msgid "" +"If you're using your Linux machine as a router, then you'll want to enable " +"IP forwarding, which will give the kernel permission to allow packets to " +"travel between eth0 and eth1, and vice versa. In our example configuration, " +"where eth0 is connected to our LAN, and eth1 is connected to the Internet, " +"enabling IP forwarding is a necessary step in allowing our LAN to connect to " +"the Internet via our Linux box. To enable IP forwarding, use this line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):624 +#, no-wrap +msgid "" +"\n" +"# <i>echo 1 > /proc/sys/net/ipv4/ip_forward</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):631 +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):652 +msgid "Handling rejection" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):634 +msgid "" +"So far, we've been dropping all unsolicited traffic coming in from the " +"Internet. While this is an effective way to deter unwanted network activity, " +"it does have some drawbacks. The biggest problem with this approach is that " +"it's easy for an intruder to detect that we're running a firewall, since our " +"machine isn't replying with the standard TCP reset and ICMP port-unreachable " +"responses: the responses that a normal machine would send back to indicate a " +"failed connection attempt to a non-existent service." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):644 +msgid "" +"Rather than let potential intruders know that we're running a firewall (and " +"thus tip them off to the fact that we may be running some valuable services " +"that they can't get to), it would be to our advantage to make it appear as " +"if we aren't running any services at all. By adding these two rules to the " +"end of our INPUT chain, we can successfully accomplish this task:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):652 +#, no-wrap +msgid "" +"\n" +"# <i>iptables -A INPUT -p tcp -i eth1 -j REJECT --reject-with tcp-reset</i>\n" +"# <i>iptables -A INPUT -p udp -i eth1 -j REJECT --reject-with icmp-port-unreachable</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):657 +msgid "" +"Our first rule takes care of correctly zapping TCP connections, while the " +"second handles UDP. With these two rules in place, it becomes very difficult " +"for an intruder to detect that we're actually running a firewall; hopefully, " +"this will cause the intruder to leave our machine and search for other " +"targets with more potential for abuse." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):665 +msgid "" +"In addition to making our firewall more \"stealthy\", these rules also " +"eliminate the delay involved in connecting to certain ftp and irc servers. " +"This delay is caused by the server performing an ident lookup to your " +"machine (connecting to port 113) and eventually (after about 15 seconds) " +"timing out. Now, our firewall will return a TCP reset and the ident lookup " +"will fail immediately instead of retrying for 15 seconds (while you're " +"patiently waiting for a response from the server)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):678 +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):693 +msgid "Spoof protection" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):681 +msgid "" +"In many distributions, when the network interface(s) are brought up, several " +"old ipchains rules are also added to the system. These special rules were " +"added by the creators of the distribution to deal with a problem called " +"spoofing, in which the source address of packets have been tweaked so that " +"they contains an invalid value (something that script kiddies do). While we " +"can create similar iptables rules that will also block spoofed packets, " +"there's an easier way. These days, the kernel has the built-in ability to " +"dropped spoofed packets; all we need to do is enable it via a simple <path>/" +"proc</path> interface. Here's how." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):693 +#, no-wrap +msgid "" +"\n" +"for x in lo eth0 eth1\n" +"do\n" +" echo 1 > /proc/sys/net/ipv4/conf/${x}/rp_filter\n" +"done\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):700 +msgid "" +"This shell script will tell the kernel to drop any spoofed packets on " +"interfaces lo, eth0, and eth1. You can either add these lines to your " +"firewall script, or add them to the script that brings up your lo, eth0, and " +"eth1 interfaces." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):709 +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):720 +msgid "Masquerading" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):712 +msgid "" +"NAT (network address translation) and IP masquerading, while not directly " +"related to firewalls, are often used in conjunction with them. We're going " +"to look at two common NAT/masquerading configurations that you may need to " +"use. This first rule would take care of situations where you have a dialup " +"link to the Internet (ppp0) that uses a dynamic IP:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):720 +#, no-wrap +msgid "" +"\n" +"# <i>iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):724 +msgid "" +"If you're in this situation, you'll also want to convert my firewall scripts " +"so that all references to \"eth1\" (our example DSL router) are changed to " +"\"ppp0\". And it's perfectly fine to add firewalling rules that refer to " +"\"ppp0\" when the ppp0 interface doesn't yet exist. As soon as ppp0 is up, " +"everything will work perfectly. Make sure you enable IP forwarding as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):735 +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):762 +msgid "SNAT" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):738 +msgid "" +"If you're using DSL to connect to the Internet, you probably have one of two " +"possible configurations. One possibility is that your DSL router or modem " +"has its own IP number and performs network address translation for you. If " +"you're in this situation, you don't need Linux to perform NAT for you since " +"your DSL router is taking care of it already." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):746 +msgid "" +"However, if you want to have more control over your NAT functionality, you " +"may want to talk to your ISP about configuring your DSL connection so that " +"your DSL router is in \"bridged mode\". In bridged mode, your firewall " +"becomes an official part of your ISP's network, and your DSL router " +"transparently forwards IP traffic back and forth between your ISP and your " +"Linux box without letting anyone know that it's there. It no longer has an " +"IP number; instead, eth1 (in our example) sports the IP. If someone pings " +"your IP from the Internet, they get a reply back from your Linux box, rather " +"than your router." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):757 +msgid "" +"With this kind of setup, you'll want to use SNAT (source NAT) rather than " +"masquerading. Here's the line you should add to your firewall:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):762 +#, no-wrap +msgid "" +"\n" +"# <i>iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 1.2.3.4</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):766 +msgid "" +"In this example, eth1 should be changed to the ethernet interface connected " +"directly to your DSL router, and 1.2.3.4 should be changed to your static IP " +"(the IP of your ethernet interface). Again, remember to enable IP forwarding." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):775 +msgid "NAT issues" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):778 +msgid "" +"Fortunately for us, NAT and masquerading get along just fine with a " +"firewall. When writing your firewall filtering rules, just ignore the fact " +"that you're using NAT. Your rules should accept, drop, or reject packets " +"based on their \"real\" source and destination addresses. The firewall " +"filtering code sees the original source address for a packet, and the final " +"destination address. This is great for us, because it allows our firewall to " +"continue working properly even if we temporarily disable NAT or masquerading." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):791 +msgid "Understanding tables" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):794 +msgid "" +"In the above NAT/masquerading examples, we're appending rules to a chain, " +"but we're also doing something a bit different. Notice the \"-t\" option. " +"The \"-t\" option allows us to specify the table that our chain belongs to. " +"When omitted, the default table defaults to \"filter\". So, all our previous " +"non-NAT related commands were modifying the INPUT chain that's part of the " +"\"filter\" table. The \"filter\" table contains all the rules associated " +"with accepting or rejecting packets, while the \"nat\" table (as you would " +"assume) contains rules relating to network address translation. There are " +"also other built-in iptables chains and they are described in detail in the " +"iptables man page, as well as in Rusty's HOWTOs (see the <uri link=" +"\"#resources\">Resources</uri> section at the end of this tutorial for " +"links)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):811 +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):819 +msgid "Our enhanced script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):814 +msgid "" +"Now that we've taken a look at a bunch of possible enhancements, it's time " +"to take a look at a second more flexible firewall up/down script:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):819 +#, no-wrap +msgid "" +"\n" +"\n" +"#!/bin/bash\n" +"\n" +"<comment># An enhanced stateful firewall for a workstation, laptop or router that isn't</comment>\n" +"<comment># running any network services like a web server, SMTP server, ftp server, etc.</comment>\n" +"\n" +"<comment># Change this to the name of the interface that provides your \"uplink\"</comment>\n" +"<comment># (connection to the Internet)</comment>\n" +"\n" +"UPLINK=\"eth1\"\n" +"\n" +"<comment># If you're a router (and thus should forward IP packets between interfaces),</comment>\n" +"<comment># you want ROUTER=\"yes\"; otherwise, ROUTER=\"no\"</comment>\n" +"\n" +"ROUTER=\"yes\"\n" +"\n" +"<comment># Change this next line to the static IP of your uplink interface for static SNAT, or</comment>\n" +"<comment># \"dynamic\" if you have a dynamic IP. If you don't need any NAT, set NAT to \"\" to</comment>\n" +"<comment># disable it.</comment>\n" +"\n" +"NAT=\"1.2.3.4\"\n" +"\n" +"<comment># Change this next line so it lists all your network interfaces, including lo</comment>\n" +"\n" +"INTERFACES=\"lo eth0 eth1\"\n" +"\n" +"if [ \"$1\" = \"start\" ]\n" +"then\n" +" echo \"Starting firewall...\"\n" +" iptables -P INPUT DROP\n" +" iptables -A INPUT -i ! ${UPLINK} -j ACCEPT\n" +" iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\n" +" iptables -A INPUT -p tcp -i ${UPLINK} -j REJECT --reject-with tcp-reset\n" +" iptables -A INPUT -p udp -i ${UPLINK} -j REJECT --reject-with icmp-port-unreachable\n" +"\n" +" <comment># Explicitly disable ECN</comment>\n" +" if [ -e /proc/sys/net/ipv4/tcp_ecn ]\n" +" then\n" +" echo 0 > /proc/sys/net/ipv4/tcp_ecn\n" +" fi\n" +"\n" +" <comment># Disable spoofing on all interfaces</comment>\n" +" for x in ${INTERFACES}\n" +" do\n" +" echo 1 > /proc/sys/net/ipv4/conf/${x}/rp_filter\n" +" done\n" +"\n" +" if [ \"$ROUTER\" = \"yes\" ]\n" +" then\n" +" <comment># We're a router of some kind, enable IP forwarding</comment>\n" +" echo 1 > /proc/sys/net/ipv4/ip_forward\n" +" if [ \"$NAT\" = \"dynamic\" ]\n" +" then\n" +" <comment># Dynamic IP address, use masquerading</comment>\n" +" echo \"Enabling masquerading (dynamic ip)...\"\n" +" iptables -t nat -A POSTROUTING -o ${UPLINK} -j MASQUERADE\n" +" elif [ \"$NAT\" != \"\" ]\n" +" then\n" +" <comment># Static IP, use SNAT</comment>\n" +" echo \"Enabling SNAT (static ip)...\"\n" +" iptables -t nat -A POSTROUTING -o ${UPLINK} -j SNAT --to ${UPIP}\n" +" fi\n" +" fi\n" +"\n" +"elif [ \"$1\" = \"stop\" ]\n" +"then\n" +" echo \"Stopping firewall...\"\n" +" iptables -F INPUT\n" +" iptables -P INPUT ACCEPT\n" +" <comment># Turn off NAT/masquerading, if any</comment>\n" +" iptables -t nat -F POSTROUTING\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):899 +msgid "Stateful servers" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):901 +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):910 +msgid "Viewing rules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):904 +msgid "" +"Before we start making customizations to our firewall so that it can be used " +"on a server, I need to show you how to list your currently active firewall " +"rules. To view the rules in the filter table's INPUT chain, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):910 +#, no-wrap +msgid "" +"\n" +"# <i>iptables -v -L INPUT</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):914 +msgid "" +"The -v option gives us a verbose output, so that we can see the total " +"packets and bytes transferred per rule. We can also look at our nat " +"POSTROUTING table with the following command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):920 +msgid "Viewing POSTROUTING table rules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):920 +#, no-wrap +msgid "" +"\n" +"# <i>iptables -t nat -v -L POSTROUTING</i>\n" +"Chain POSTROUTING (policy ACCEPT 399 packets, 48418 bytes)\n" +"pkts bytes target prot opt in out source destination\n" +"2728 170K SNAT all -- any eth1 anywhere anywhere\n" +"to:215.218.215.2\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):931 +msgid "Getting ready for service" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):934 +msgid "" +"Right now, our firewall doesn't allow the general public to connect to " +"services on our machine because it only accepts incoming ESTABLISHED or " +"RELATED packets. Because it drops any incoming NEW packets, any connection " +"attempt is rejected unconditionally. However, by selectively allowing some " +"incoming traffic to cross our firewall, we can allow the general public to " +"connect to the services that we specify." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):946 +msgid "Stateful HTTP" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):949 +msgid "" +"While we want to accept some incoming connections, we probably don't want to " +"accept every kind of incoming connection. It makes sense to start with a " +"\"deny by default\" policy (as we have now) and begin opening up access to " +"those services that we'd like people to be able to connect to. For example, " +"if we're running a Web server, we'll allow NEW packets into our machine, as " +"long as they are headed for port 80 (HTTP). That's all we need to do. Once " +"we allow the NEW packets in, we've allowed a connection to be established. " +"Once the connection is established, our existing rule allowing incoming " +"ESTABLISHED and RELATED packets kicks in, allowing the HTTP connection to " +"proceed unhindered." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):964 +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):972 +msgid "Stateful HTTP example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):967 +msgid "" +"Let's take a look at the \"heart\" of our firewall and the new rule that " +"allows incoming HTTP connections:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):972 +#, no-wrap +msgid "" +"\n" +"iptables -P INPUT DROP\n" +"iptables -A INPUT -i ! ${UPLINK} -j ACCEPT\n" +"iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\n" +"<comment># Our new rule follows</comment>\n" +"iptables -A INPUT -p tcp --dport http -m state --state NEW -j ACCEPT\n" +"iptables -A INPUT -p tcp -i ${UPLINK} -j REJECT --reject-with tcp-reset\n" +"iptables -A INPUT -p udp -i ${UPLINK} -j REJECT --reject-with\n" +"icmp-port-unreachable\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):983 +msgid "" +"This new rule allows incoming NEW TCP packets destined for our machine's " +"port 80 (http) to come in. Notice the placement of this rule. It's important " +"that it appears before our REJECT rules. Since iptables will apply the first " +"matching rule, putting it after our REJECT lines would cause this rule to " +"have no effect." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):993 +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):1001 +msgid "Our final firewall script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):996 +msgid "" +"Now, let's take a look at our final firewall script, one that can be used on " +"a laptop, workstation, router, or server (or some combination thereof!)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):1001 +#, no-wrap +msgid "" +"\n" +"\n" +"#!/bin/bash\n" +"\n" +"<comment># Our complete stateful firewall script. This firewall can be customized for</comment>\n" +"<comment># a laptop, workstation, router or even a server. :)</comment>\n" +"\n" +"<comment># Change this to the name of the interface that provides your \"uplink\"</comment>\n" +"<comment># (connection to the Internet)</comment>\n" +"\n" +"UPLINK=\"eth1\"\n" +"\n" +"<comment># If you're a router (and thus should forward IP packets between interfaces),</comment>\n" +"<comment># you want ROUTER=\"yes\"; otherwise, ROUTER=\"no\"</comment>\n" +"\n" +"ROUTER=\"yes\"\n" +"\n" +"<comment># Change this next line to the static IP of your uplink interface for static SNAT, or</comment>\n" +"<comment># \"dynamic\" if you have a dynamic IP. If you don't need any NAT, set NAT to \"\" to</comment>\n" +"<comment># disable it.</comment>\n" +"\n" +"NAT=\"1.2.3.4\"\n" +"\n" +"<comment># Change this next line so it lists all your network interfaces, including lo</comment>\n" +"\n" +"INTERFACES=\"lo eth0 eth1\"\n" +"\n" +"<comment># Change this line so that it lists the assigned numbers or symbolic names (from</comment>\n" +"<comment># /etc/services) of all the services that you'd like to provide to the general</comment>\n" +"<comment># public. If you don't want any services enabled, set it to \"\"</comment>\n" +"\n" +"SERVICES=\"http ftp smtp ssh rsync\"\n" +"\n" +"if [ \"$1\" = \"start\" ]\n" +"then\n" +" echo \"Starting firewall...\"\n" +" iptables -P INPUT DROP\n" +" iptables -A INPUT -i ! ${UPLINK} -j ACCEPT\n" +" iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\n" +"\n" +" <comment># Enable public access to certain services</comment>\n" +" for x in ${SERVICES}\n" +" do\n" +" iptables -A INPUT -p tcp --dport ${x} -m state --state NEW -j ACCEPT\n" +" done\n" +"\n" +" iptables -A INPUT -p tcp -i ${UPLINK} -j REJECT --reject-with tcp-reset\n" +" iptables -A INPUT -p udp -i ${UPLINK} -j REJECT --reject-with icmp-port-unreachable\n" +"\n" +" <comment># Explicitly disable ECN</comment>\n" +" if [ -e /proc/sys/net/ipv4/tcp_ecn ]\n" +" then\n" +" echo 0 > /proc/sys/net/ipv4/tcp_ecn\n" +" fi\n" +"\n" +" <comment># Disable spoofing on all interfaces</comment>\n" +" for x in ${INTERFACES}\n" +" do\n" +" echo 1 > /proc/sys/net/ipv4/conf/${x}/rp_filter\n" +" done\n" +"\n" +" if [ \"$ROUTER\" = \"yes\" ]\n" +" then\n" +" <comment># We're a router of some kind, enable IP forwarding</comment>\n" +" echo 1 > /proc/sys/net/ipv4/ip_forward\n" +" if [ \"$NAT\" = \"dynamic\" ]\n" +" then\n" +" <comment># Dynamic IP address, use masquerading</comment>\n" +" echo \"Enabling masquerading (dynamic ip)...\"\n" +" iptables -t nat -A POSTROUTING -o ${UPLINK} -j MASQUERADE\n" +" elif [ \"$NAT\" != \"\" ]\n" +" then\n" +" <comment># Static IP, use SNAT</comment>\n" +" echo \"Enabling SNAT (static ip)...\"\n" +" iptables -t nat -A POSTROUTING -o ${UPLINK} -j SNAT --to ${UPIP}\n" +" fi\n" +" fi\n" +"\n" +"elif [ \"$1\" = \"stop\" ]\n" +"then\n" +" echo \"Stopping firewall...\"\n" +" iptables -F INPUT\n" +" iptables -P INPUT ACCEPT\n" +" <comment># Turn off NAT/masquerading, if any</comment>\n" +" iptables -t nat -F POSTROUTING\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1094 +msgid "Building a better server firewall" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1096 +msgid "Server improvements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1099 +msgid "" +"It's often possible to make a firewall just an eensy bit \"better\". Of " +"course, what \"better\" means depends on your specific needs. Our existing " +"script could meet yours exactly, or maybe some additional tweaking is in " +"order. This section is intended to serve as a cookbook of ideas, " +"demonstrating ways to enhance your existing stateful firewall." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1110 +msgid "Logging techniques" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1113 +msgid "" +"So far, we haven't discussed how to go about logging anything. There's a " +"special target called LOG that you can use to log things. Along with LOG, " +"there's a special option called <c>--log-prefix</c> that allows you to " +"specify some text that will appear alongside the packet dump in the system " +"logs. Here's an example log rule:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):1121 +msgid "Example log rule" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):1121 +#, no-wrap +msgid "" +"\n" +"# <i> iptables -A INPUT -j LOG --log-prefix \"bad input:\"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1125 +msgid "" +"You wouldn't want to add this as the first rule in your INPUT chain, as it " +"would cause a log entry to be recorded for every packet that you receive! " +"Instead, place log rules further down in your INPUT chain with the intention " +"of logging strange packets and other anomalies." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1132 +msgid "" +"Here's an important note about the LOG target. Normally, when a rule " +"matches, a packet is either accepted, rejected, or dropped, and no further " +"rules are processed. However, when a log rule matches, the packet is logged. " +"However, it is not accepted, rejected, or dropped. Instead, the packet " +"continues on to the next rule, or the default chain policy is applied if the " +"log rule is the last on the chain." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1141 +msgid "" +"The LOG target can also be combined with the \"limit\" module (described in " +"the iptables man page) to minimize duplicate log entries. Here's an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre:caption):1146 +msgid "Limiting log entries" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(pre):1146 +#, no-wrap +msgid "" +"\n" +"# <i>iptables -A INPUT -m state --state INVALID -m limit --limit 5/minute -j LOG --log-prefix \"INVALID STATE:\"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1153 +msgid "Creating your own chains" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1156 +msgid "" +"<c>iptables</c> allows you to create your own user-defined chains that can " +"be specified as targets in your rules. If you want to learn how to do this, " +"spend some time going through the Packet filtering HOWTO at the netfilter/" +"iptables project home page (<uri>http://www.netfilter.org/</uri>)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1166 +msgid "Enforcing network usage policy" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1169 +msgid "" +"Firewalls offer a lot of power for those who want to enforce a network usage " +"policy for a corporate or academic LAN. You can control what packets your " +"machine forwards by adding rules to and setting policy for the FORWARD " +"chain. By adding rules to the OUTPUT chain, you can also control what " +"happens to packets that are generated locally, by users on the Linux box " +"itself. iptables also has the incredible ability to filter locally-created " +"packets based on owner (uid or gid). For more information on this, search " +"for \"owner\" in the iptables man page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1182 +msgid "Other security angles" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1185 +msgid "" +"In our example firewall, we've assumed that all internal LAN traffic is " +"trustworthy, and that only incoming Internet traffic must be carefully " +"monitored. Depending on your particular network, that may or may not be the " +"case. There's certainly nothing stopping you from configuring your firewall " +"to provide protection from incoming LAN traffic. Consider other \"angles\" " +"of your network that you may want to protect. It may also be appropriate to " +"configure two separate LAN security \"zones\", each with its own security " +"policy." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1200 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1202 +msgid "tcpdump" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1205 +msgid "" +"In this section, I'll point out a number of resources that you'll find " +"helpful as you put together your own stateful firewall. Let's start with an " +"important tool..." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1211 +msgid "" +"<uri link=\"http://www.tcpdump.org/\">tcpdump</uri> is an essential tool for " +"exploring low-level packet exchanges and verifying that your firewall is " +"working correctly. If you don't have it, get it. If you've got it, start " +"using it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1220 +msgid "netfilter.kernelnotes.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1223 +msgid "" +"Visit the netfilter/iptables project home page (<uri>http://www.netfilter." +"org</uri>). You'll find many resources at this site, including the iptables " +"sources and a <uri link=\"http://www.netfilter.org/documentation/index." +"html#documentation-faq\">netfilter FAQ</uri>. Also <uri link=\"http://people." +"netfilter.org/~rusty/unreliable-guides/index.html\">Rusty's Remarkably " +"Guides</uri> are excellent, and include a basic networking concepts HOWTO, a " +"netfilter (iptables) HOWTO, a NAT HOWTO, and a netfilter hacking HOWTO for " +"developers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1238 +msgid "iptables man page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1241 +msgid "" +"Thankfully, there are a lot of good online netfilter resources; however, " +"don't forget the basics. The iptables man page is very detailed and is a " +"shining example of what a man page should be. It's actually an enjoyable " +"read." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1250 +msgid "Advanced Linux routing and traffic control HOWTO" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1253 +msgid "" +"There's now an <uri link=\"http://www.ds9a.nl/2.4Routing/\">Advanced Linux " +"Routing and Traffic Control HOWTO</uri> available. There's a good section " +"that shows how to use iptables to mark packets, and then use Linux routing " +"functionality to route the packets based on these marks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(note):1260 +msgid "" +"This HOWTO contains references to Linux's traffic control (quality of " +"service) functionality (accessed through the new <c>tc</c> command). This " +"new functionality, although very cool, is very poorly documented, and " +"attempting to figure out all aspects of Linux traffic control can be a very " +"frustrating task at this point." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1270 +msgid "Mailing lists" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1273 +msgid "" +"Users who have questions on netfilter/iptables usage, setup, or " +"configuration, or who want to help other users by sharing their experience " +"and knowledge, can contact the <uri link=\"http://www.netfilter.org/" +"mailinglists.html#ml-user\">netfilter user mailing list</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1281 +msgid "" +"Netfilter/iptables developers who have questions, suggestions, or " +"contributions to netfilter/iptables development can contact the <uri link=" +"\"http://www.netfilter.org/mailinglists.html#ml-devel\">netfilter developer " +"mailing list</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1288 +msgid "You can also browse the list archives at these URLs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1295 +msgid "Building Internet Firewalls, Second Edition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1298 +msgid "" +"In June 2000, O'Reilly released an excellent book -- <uri link=\"http://www." +"oreilly.com/catalog/fire2/\">Building Internet Firewalls, Second Edition</" +"uri>. It's great reference book, especially for those times when you want to " +"configure your firewall to accept (or flat-out reject) a little-known " +"protocol that you're unfamiliar with." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1306 +msgid "" +"Well, that's it for our resources list, and our tutorial is complete. I hope " +"that this tutorial has been helpful to you, and I look forward to your " +"feedback." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(title):1314 +msgid "Your feedback" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(p):1317 +msgid "" +"We look forward to getting your feedback on this tutorial. Additionally, you " +"are welcome to contact the author, Daniel Robbins, at <mail link=" +"\"drobbins@gentoo.org\">drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-24-stateful-fw-design.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/linux-kernel-compiling.xml.po b/article/gettext/ru/linux-kernel-compiling.xml.po new file mode 100644 index 0000000..2b20c5c --- /dev/null +++ b/article/gettext/ru/linux-kernel-compiling.xml.po @@ -0,0 +1,725 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(guide:link):5 +msgid "/doc/en/articles/linux-kernel-compiling.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):6 +msgid "Compiling the Linux kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by: Joshua Saddler (nightmorph@gentoo.org) +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(abstract):13 +msgid "" +"Daniel Robbins introduces the Linux kernel, and then walks you through " +"locating and downloading sources, configuring the kernel, compiling and " +"installing the kernel, and boot configuration." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(version):24 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(date):25 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):28 +msgid "Introducing the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):30 +msgid "The kernel is... Linux!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):33 +msgid "" +"What do you think of when you hear the word \"Linux\"? When I hear it, I " +"typically think of an entire Linux distribution and all the cooperating " +"programs that make the distribution work." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):39 +msgid "" +"However, you may be surprised to find out that, technically, Linux is a " +"kernel, and a kernel only. While the other parts of what we commonly call " +"\"Linux\" (such as a shell and compiler) are essential parts of a " +"distribution, they are technically separate from Linux (the kernel). While " +"many people use the word \"Linux\" to mean \"Linux-based distribution,\" " +"everyone can at least agree that the Linux kernel is the <e>heart</e> of " +"every distribution." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):51 +msgid "Interfacing with hardware" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):54 +msgid "" +"The primary role of the Linux kernel is to interface directly with the " +"hardware in your system. The kernel provides a <e>layer of abstraction</e> " +"between the raw hardware and application programs. This way, the programs " +"themselves do not need to know the details of your specific motherboard " +"chipset or disk controller -- they can instead operate at the higher level " +"of reading and writing files to disk, for example." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):66 +msgid "CPU abstraction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):69 +msgid "" +"The Linux kernel also provides a level of abstraction on top of the processor" +"(s) in your system -- allowing for multiple programs to appear to run " +"simultaneously. Linux does this by allowing several UNIX <e>processes</e> to " +"run at once -- and the kernel takes care of giving each one a fair share of " +"the processor(s)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):77 +msgid "" +"A Linux kernel can support either a single or multiple CPUs -- and the " +"kernel that you are using now is either uniprocessor-aware (UP-aware) or " +"symmetric multiprocessor-aware (SMP-aware). If you happen to have an SMP " +"motherboard, but you're using a UP kernel, Linux won't \"see\" your extra " +"processors! To fix this, you'll want to compile a special SMP kernel for " +"your hardware. Currently, SMP kernels will also work on uniprocessor " +"systems, but at a slight performance hit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):90 +msgid "Abstracting I/O" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):93 +msgid "" +"The kernel also handles the much-needed task of abstracting all forms of " +"file I/O. Imagine what would happen if every program had to interface with " +"your particular hardware directly -- if you changed disk controllers, all " +"your programs would stop working! Fortunately, the Linux kernel follows the " +"UNIX model of providing a simple abstraction of disk I/O that all programs " +"can use. That way, your favorite database doesn't need to be concerned " +"whether it is storing data on an IDE disk, a SCSI RAID array, or a network-" +"mounted file system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):107 +msgid "Networking Central" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):110 +msgid "" +"One of Linux's main claims to fame is its robust networking, especially TCP/" +"IP support. And, if you guessed that the TCP/IP stack is in the Linux " +"kernel, you're right! The kernel provides a nice, high-level interface for " +"programs that want to send data over the network. Behind the scenes, the " +"Linux kernel interfaces directly with your particular ethernet card or " +"modem, and handles the low-level Internet communication details." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):122 +msgid "Networking goodies" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):125 +msgid "" +"One of the greatest things about Linux is all of the useful features that " +"are available in the kernel, especially those related to networking. For " +"example, you can configure a kernel that will allow your entire home network " +"to access the Internet via your Linux modem -- this is called IP " +"Masquerading, or IP NAT (network address translating)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):133 +msgid "" +"Additionally, the Linux kernel can be configured to export or mount network-" +"based NFS file systems, allowing for other UNIX machines on your LAN to " +"easily share data with your Linux system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):142 +msgid "Booting, part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):145 +msgid "" +"When you turn on your Linux-based system, the kernel is loaded from disk to " +"memory by a boot loader, such as LILO. At this point, the kernel takes " +"control of your system. The first thing it does is detect and initialize all " +"the hardware that it finds -- and it has been compiled to support. Once the " +"hardware has been initialized properly, it is then ready to run processes. " +"The first process it runs is called <c>init</c>, which is located in <path>/" +"sbin</path>. Then, <c>init</c> starts additional processes, as specified in " +"<path>/etc/inittab</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):159 +msgid "Booting, part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):162 +msgid "" +"<c>init</c> typically starts several copies of a program called <c>getty</" +"c>, which waits for logins from the console. After <c>getty</c> successfully " +"processes a login request, your default shell is loaded (which is typically " +"<c>bash</c>). Once you're in bash, you have the power to launch any program " +"you'd like." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):170 +msgid "" +"While all these new processes are started, the kernel is still in control, " +"carefully time-slicing the CPU so that each process has a fair share. In " +"addition, the kernel continues to provide hardware abstraction and " +"networking services for the various running processes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):180 +msgid "Introducing... modules!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):183 +msgid "" +"All recent Linux kernels support kernel modules. Kernel modules are really " +"neat things -- they're pieces of the kernel that reside on disk, until " +"needed. As soon as the kernel needs the functionality of a particular " +"module, it's loaded from disk, automatically integrated with the kernel, and " +"available for use. In addition, if a kernel module hasn't been used for " +"several minutes, the kernel can voluntarily unload it from memory -- " +"something that's called \"autocleaning.\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):196 +msgid "Modules, part deux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):199 +msgid "" +"Kernel modules live in <path>/lib/modules</path>, and each module has a " +"<path>.o</path> or <path>.ko</path> at the end of its name. As you may " +"guess, modules each represent a particular component of kernel functionality " +"-- one module may provide FAT filesystem support, while another may support " +"a particular ISA ethernet card." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):207 +msgid "" +"Modules allow you to have a low kernel memory footprint. You can create a " +"kernel that contains only the features necessary for booting your computer, " +"and all other features can be loaded from modules on demand. Because the " +"kernel autocleans any modules it loads, your system's memory can be put to " +"good use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):217 +msgid "Modules -- important stuff!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):220 +msgid "" +"You can't put <e>everything</e> in a module. Because modules are stored on " +"disk, your bootable kernel image needs to have compiled-in support for your " +"disk controller as well as for your native file system (typically the ext2 " +"filesystem). If you don't have these essential components compiled into your " +"kernel image (but compile them as modules instead), then your kernel won't " +"have the necessary ability to load these modules from disk -- creating a " +"rather ugly chicken-and-egg problem!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):235 +msgid "Locating and downloading sources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):237 +msgid "Kernel versions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):240 +msgid "" +"To compile a recent kernel, you need to download the sources first. But " +"before you download the kernel sources, you need to know what you're looking " +"for. The first question to ask yourself is this -- do you want to use a " +"stable or <e>experimental</e> kernel?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):247 +msgid "" +"Stable kernels always have an even second digit -- for example, 2.0.38, " +"2.2.15, 2.2.18, and 2.4.1 are all considered \"stable\" kernels (due to the " +"0, 2, 2, and 4, respectively.) If you'd like to test out an experimental " +"kernel, you'll typically look for the highest-numbered kernel that has an " +"odd second number. For example, 2.3.99 and 2.1.38 are both experimental " +"kernels (due to their 3 and 1, respectively)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):259 +msgid "Kernel version history" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):262 +msgid "" +"The 2.2 series is considered a modern, stable kernel. If \"modern\" and " +"\"stable\" are things that sound good to you, look for a 2.2 kernel with the " +"highest third number you can find (2.2.16 is the most recent version at the " +"moment)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):268 +msgid "" +"While the 2.2 series kernel was being developed, the 2.3 series began. This " +"series was created to serve as a testing ground for new, advanced features " +"that would eventually show up in the stable 2.4 series. As of right now, the " +"2.3 series has already reached 2.3.99, and 2.3 development has stopped. " +"These days, developers are working on getting the 2.4.0 <e>test</e> kernels " +"into shape. If you'd like to be on the cutting-edge, you'll want to try the " +"most recent 2.4.0-test kernel you can get your hands on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):281 +msgid "2.4 kernel warning" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):284 +msgid "" +"Once a <e>real</e> 2.4 series kernel comes out (like 2.4.0), don't assume " +"that the kernel is ready for use on a mission-critical system like a server. " +"Even though 2.4 is supposed to be a stable series, early 2.4 kernels are " +"likely to be not quite up to snuff. As is often the case in the computer " +"industry, the first version of anything can have fairly sizable bugs. While " +"this may not be a problem if you're testing the kernel on your home " +"workstation, it is a risk you may want to avoid when you machine provides " +"valuable services to others." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):297 +msgid "Downloading the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):300 +msgid "" +"If you simply want to compile a new version of your installed kernel (for " +"example, to enable SMP support), then no downloading is necessary -- skip " +"past this and the next section." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):306 +msgid "" +"You can find kernels at <uri>http://www.kernel.org/pub/linux/kernel</uri>. " +"When you go there, you'll find the kernel sources organized into several " +"different directories, based on kernel version (v2.2, v2.3, etc.) Inside " +"each directory, you'll find files labelled \"<path>linux-x.y.z.tar.gz</path>" +"\" and \"<path>linux-x.y.z.tar.bz2</path>\". These are the Linux kernel " +"sources. You'll also see files labelled \"<path>patch-x.y.z.gz</path>\" and " +"\"<path>patch-x.y.z.bz2</path>\". These files are patches that can be used " +"to update the previous version of complete kernel sources. If you want to " +"compile a new kernel release, you'll need to download one of the \"linux\" " +"files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):321 +msgid "Unpacking the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):324 +msgid "" +"If you downloaded a new kernel from kernel.org, now it's time to unpack it. " +"To do so, <c>cd</c> into <path>/usr/src</path>. If there is an existing " +"<path>linux</path> directory there, move it to <path>linux.old</path> (<c>mv " +"linux linux.old</c>, as root.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):331 +msgid "" +"Now, it's time to extract the new kernel. While still in <path>/usr/src</" +"path>, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre:caption):336 +msgid "Extracting with gzip" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre):336 +#, no-wrap +msgid "" +"\n" +"# <i>tar -xzvf /path/to/my/kernel-x.y.z.tar.gz</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):340 +msgid "or" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre:caption):344 +msgid "Extracting with bzip2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre):344 +#, no-wrap +msgid "" +"\n" +"# <i>tar -xvjf /path/to/my/kernel-x.y.z.tar.bz2</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):348 +msgid "" +"Depending on whether your sources are compressed with <c>gzip</c> or " +"<c>bzip2</c>. After typing this, your new kernel sources will be extracted " +"into a new <path>linux</path> directory. Beware: the full kernel sources " +"typically occupy more than 50 megabytes on disk!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):360 +msgid "Configuring the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):362 +msgid "Let's talk configuration" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):365 +msgid "" +"Before you compile your kernel, you need to configure it. Configuration is " +"your opportunity to control exactly what kernel features are enabled (and " +"disabled) in your new kernel. You'll also be in control of what parts get " +"compiled into the kernel binary image (which gets loaded at boot-time), and " +"what parts get compiled into load-on-demand kernel module files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):373 +msgid "" +"The old-fashioned way of configuring a kernel was a tremendous pain, and " +"involved entering <path>/usr/src/linux</path> and typing <c>make config</c>. " +"While <c>make config</c> still works, please don't try to use this method to " +"configure your kernel -- unless you like answering hundreds (yes, hundreds!) " +"of yes/no questions on the command line." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):384 +msgid "The New Way to configure" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):387 +msgid "" +"We more modern folks, instead of typing <c>make config</c>, type either " +"<c>make menuconfig</c> or <c>make xconfig</c>. If you'd like to configure " +"your kernel, type one of these options. If you type <c>make menuconfig</c>, " +"you'll get a nice text-based color menu system that you can use to configure " +"the kernel. If you type <c>make xconfig</c>, you'll get a very nice X-based " +"GUI that can be used to configure various kernel options. Here's a " +"screenshot of <c>make menuconfig</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(figure:link):397 +msgid "/images/docs/l-kernel.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(figure:caption):397 +msgid "menuconfig in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):399 +msgid "" +"When using <c>make menuconfig</c>, options that have a <c>< ></c> to " +"their left can be compiled as a module. When the option is highlighted, hit " +"the space bar to toggle whether the option is deselected (<c>< ></c>), " +"selected to be compiled into the kernel image (<c><*></c>) or selected " +"to be compiled as a module (<c><M></c>)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):410 +msgid "Configuration tips" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):413 +msgid "" +"There are tons of kernel options, and there's no room to explain them all " +"here -- so please take advantage of the kernel's built-in help " +"functionality. Almost every option is described in at least some detail, and " +"each one normally contains the line \"If you don't know what this means, " +"type Y (or N).\" These hints keep you out of trouble if you happen to have " +"no clue what a particular option actually does. To access help, highlight " +"the option you have a question about and press the \"?\" key." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):428 +msgid "Compiling and installing the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):430 +msgid "make dep; make clean" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):433 +msgid "" +"Once your kernel is configured, it's time to get it compiled. Before we can " +"compile it, we need to generate dependency information and also clean out " +"any old \"compiled stuff.\" This can be accomplished by typing: <c>make dep; " +"make clean</c> while in <path>/usr/src/linux</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):443 +msgid "Make bzImage" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):446 +msgid "" +"Now, it's time to compile the actual binary kernel image. Type <c>make " +"bzImage</c>. After several minutes, compilation will complete and you'll " +"find the bzImage file in <path>/usr/src/linux/arch/i386/boot</path> (for an " +"x86 PC kernel). We'll show you how to install the new kernel image in a bit, " +"but now it's time for the modules." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):457 +msgid "Compiling modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):460 +msgid "" +"Now that the bzImage is done, it's time to compile the modules. Even if you " +"didn't enable any modules when you configured the kernel, don't skip this " +"step -- it's good to get into the habit of compiling modules immediately " +"after a bzImage. And, if you really have no modules enabled for compilation, " +"this step will go really quickly. Type <c>make modules; make " +"modules_install</c>. This will cause the modules to be compiled and then " +"installed into <path>/usr/lib/<kernelversion></path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):470 +msgid "" +"Congratulations! Your kernel is now fully compiled, and your modules are all " +"compiled and installed. Now, it's time to reconfigure LILO so that you can " +"boot the new kernel." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):481 +msgid "Boot configuration" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):483 +msgid "LILO introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):486 +msgid "" +"It's finally time to reconfigure LILO so that it loads the new kernel. LILO " +"is the most popular Linux boot loader, and is used by all popular Linux " +"distributions. The first thing you'll want to do is take a look at your " +"<path>/etc/lilo.conf</path> file. It will contain a line that says something " +"like <c>image=/vmlinuz</c> This line tells LILO where it should look for the " +"kernel." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):498 +msgid "Boot configuration, part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):501 +msgid "" +"To configure LILO to boot the new kernel, you have two options. The first is " +"to overwrite your existing kernel -- this is risky unless you have some kind " +"of emergency boot method, such a boot disk with this particular kernel on it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):507 +msgid "" +"The safer option is to configure LILO so that it can boot either the new or " +"the old kernel. LILO can be configured to boot the new kernel by default, " +"but still provide a way for you to select your older kernel if you happen to " +"run into problems. This is the recommended option, and the one we'll show " +"you how to perform." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):518 +msgid "Boot configuration, part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):521 +msgid "Your <path>lilo.conf</path> may look like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre:caption):525 +msgid "/etc/lilo.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre):525 +#, no-wrap +msgid "" +"\n" +"boot=/dev/hda\n" +"delay=20\n" +"vga=normal\n" +"root=/dev/hda1\n" +"read-only\n" +"\n" +"image=/vmlinuz\n" +"label=linux\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):536 +msgid "" +"To add a new boot entry to your <path>lilo.conf</path>, do the following. " +"First, copy <path>/usr/src/linux/arch/i386/boot/bzImage</path> to a file on " +"your root partition, such as <path>/vmlinuz2</path>. Once it's there, " +"duplicate the last three lines of your <path>lilo.conf</path> and add them " +"again to the end of the file... we're almost there..." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):547 +msgid "Boot configuration, part 4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):550 +msgid "Now, your <path>lilo.conf</path> should look like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre:caption):554 +msgid "the new lilo.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre):554 +#, no-wrap +msgid "" +"\n" +"boot=/dev/hda\n" +"delay=20\n" +"vga=normal\n" +"root=/dev/hda1\n" +"read-only\n" +"\n" +"image=/vmlinuz\n" +"label=linux\n" +"\n" +"image=/vmlinuz\n" +"label=linux\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):568 +msgid "" +"Now, change the first <c>image=</c> line to read <c>image=/vmlinuz2</c>. " +"Next, change the <e>second</e><c>label=</c> line to read <c>label=oldlinux</" +"c>. Also, make sure there is a <c>delay=20</c> line near the top of the file " +"-- if not, add one. If there is, make sure the number is at least twenty." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):578 +msgid "Boot configuration, part 5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):581 +msgid "" +"Your <e>final</e><path>lilo.conf</path> file will look something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre:caption):585 +msgid "The final lilo.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(pre):585 +#, no-wrap +msgid "" +"\n" +"boot=/dev/hda\n" +"delay=20\n" +"vga=normal\n" +"root=/dev/hda1\n" +"read-only\n" +"\n" +"image=/vmlinuz2\n" +"label=linux\n" +"\n" +"image=/vmlinuz\n" +"label=oldlinux\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):599 +msgid "" +"After doing all this, you'll need to run <c>lilo</c> as root. This is very " +"important! If you don't do this, the booting process won't work. Running " +"<c>lilo</c> will give it an opportunity to update its boot map." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):608 +msgid "Boot configuration, an explanation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):611 +msgid "" +"Now for an explanation of our changes. This <path>lilo.conf</path> file was " +"set up to allow you to boot two different kernels. It'll allow you to boot " +"your original kernel, located at <path>/vmlinuz</path>. It'll also allow you " +"to boot your new kernel, located at <path>/vmlinuz2</path>. By default, it " +"will try to boot your new kernel (because the image/label lines for the new " +"kernel appear first in the configuration file)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):620 +msgid "" +"If, for some reason, you need to boot the old kernel, simply reboot your " +"computer and hold down the Shift key. LILO will detect this, and allow you " +"to type in the label of the image you'd like to boot. To boot your old " +"kernel, you'd type <c>oldlinux</c>, and hit enter. To see a list of possible " +"labels, you'd hit TAB." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(title):633 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(p):637 +msgid "" +"Congratulations on compiling your own kernel! I hope everything went well. " +"Here are some related resources where you can learn more about kernel " +"compilation:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(li):643 +msgid "" +"<uri link=\"http://www.tldp.org/HOWTO/Kernel-HOWTO/\">The Linux Kernel " +"HOWTO</uri>, another good resource for kernel compilation instructions." +msgstr "" + +#. not accessible <li> +#. <uri link="http://www.tldp.org/HOWTO/LILO-crash-rescue-HOWTO/">The LILO, +#. Linux Crash Rescue HOW-TO</uri>, which shows you how to create an emergency +#. Linux boot disk. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(li):652 +msgid "" +"<uri link=\"http://www.kernel.org\">www.kernel.org</uri>, the site that " +"hosts the Linux Kernel archives." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/linux-kernel-compiling.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/lpi-101-administration-p2.xml.po b/article/gettext/ru/lpi-101-administration-p2.xml.po new file mode 100644 index 0000000..720007f --- /dev/null +++ b/article/gettext/ru/lpi-101-administration-p2.xml.po @@ -0,0 +1,2769 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(guide:link):5 +msgid "/doc/en/articles/lpi-101-administration-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):6 +msgid "LPI certification 101 (release 2) exam prep, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(author:title):8 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(author:title):11 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(author:title):14 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(mail:link):12 +msgid "chouser@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(mail):12 +msgid "Chris Houser" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(author):14 +msgid "Aron Griffis" +msgstr "" + +#. <author title="Editor"> +#. <mail link="smithj@gentoo.org">Jonathan Smith</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(abstract):21 +msgid "" +"In this tutorial, you will learn how to use regular expressions to search " +"files for text patterns, how to locate files on your system, and how to take " +"full control of Linux processes. You'll even get a whirlwind introduction to " +"shell pipelines, redirection, and text processing commands. By the end of " +"this tutorial, you'll have a solid grounding in basic Linux administration " +"and will be ready to begin learning more advanced Linux system " +"administration skills in the follow-on tutorial." +msgstr "" + +#. The original version of this article was published on IBM developerWorks, +#. and is property of Westtech Information Services. This document is an updated +#. version of the original article, and contains various improvements made by the +#. Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(version):36 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(date):37 +msgid "2007-06-20" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):40 +msgid "Before You Start" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):42 +msgid "About this tutorial" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):45 +msgid "" +"Welcome to \"Basic administration,\" the second of four tutorials designed " +"to prepare you for the Linux Professional Institute's 101 exam. In this " +"tutorial, we'll show you how to use regular expressions to search files for " +"text patterns. Next, we'll introduce you to the Filesystem Hierarchy " +"Standard (FSH), and then show you how to locate files on your system. Then, " +"we'll show you how to take full control of Linux processes by running them " +"in the background, listing processes, detaching processes from the terminal, " +"and more. Next, we'll give you a whirlwind introduction to shell pipelines, " +"redirection, and text processing commands. Finally, we'll introduce you to " +"Linux kernel modules." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):57 +msgid "" +"This particular tutorial (Part 2) is ideal for those who have a good basic " +"knowledge of bash and want to receive a solid introduction to basic Linux " +"administration tasks. If you are new to Linux, we recommend that you " +"complete Part 1 of this tutorial series first before continuing. For some, " +"much of this material will be new, but more experienced Linux users may find " +"this tutorial to be a great way of \"rounding out\" their basic Linux " +"administration skills." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):66 +msgid "" +"For those who have taken the release 1 version of this tutorial for reasons " +"other than LPI exam preparation, you probably don't need to take this one. " +"However, if you do plan to take the exams, you should strongly consider " +"reading this revised tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):76 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):79 +msgid "" +"Residing in Albuquerque, New Mexico, Daniel Robbins is the Chief Architect " +"of Gentoo Linux an advanced ports-based Linux meta distribution. He also " +"writes articles, tutorials, and tips for the IBM developerWorks Linux zone " +"and Intel Developer Services and has also served as a contributing author " +"for several books, including Samba Unleashed and SuSE Linux Unleashed. " +"Daniel enjoys spending time with his wife, Mary, and his daughter, Hadassah. " +"You can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):89 +msgid "" +"Chris Houser, known to his friends as \"Chouser,\" has been a UNIX proponent " +"since 1994 when he joined the administration team for the computer science " +"network at Taylor University in Indiana, where he earned his Bachelor's " +"degree in Computer Science and Mathematics. Since then, he has gone on to " +"work in Web application programming, user interface design, professional " +"video software support, and now Tru64 UNIX device driver programming at " +"Compaq. He has also contributed to various free software projects, most " +"recently to Gentoo Linux). He lives with his wife and two cats in New " +"Hampshire. You can contact Chris at chouser@gentoo.org." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):101 +msgid "" +"Aron Griffis graduated from Taylor University with a degree in Computer " +"Science and an award that proclaimed, \"Future Founder of a Utopian UNIX " +"Commune.\" Working towards that goal, Aron is employed by Compaq writing " +"network drivers for Tru64 UNIX, and spending his spare time plunking out " +"tunes on the piano or developing Gentoo Linux. He lives with his wife Amy " +"(also a UNIX engineer) in Nashua, New Hampshire." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):115 +msgid "Regular Expressions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):117 +msgid "What is a regular expression?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):120 +msgid "" +"A regular expression (also called a \"regex\" or \"regexp\") is a special " +"syntax used to describe text patterns. On Linux systems, regular expressions " +"are commonly used to find patterns of text, as well as to perform search-and-" +"replace operations on text streams." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):130 +msgid "Glob comparison" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):133 +msgid "" +"As we take a look at regular expressions, you may find that regular " +"expression syntax looks similar to the filename \"globbing\" syntax that we " +"looked at in Part 1. However, don't let this fool you; their similarity is " +"only skin deep. Both regular expressions and filename globbing patterns, " +"while they may look similar, are fundamentally different beasts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):144 +msgid "The simple substring" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):147 +msgid "" +"With that caution, let's take a look at the most basic of regular " +"expressions, the simple substring. To do this, we're going to use <c>grep</" +"c>, a command that scans the contents of a file for a particular regular " +"expression. grep prints every line that matches the regular expression, and " +"ignores every line that doesn't:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):155 +msgid "grep in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):155 +#, no-wrap +msgid "" +"\n" +"$ <i>grep bash /etc/passwd</i>\n" +"operator:x:11:0:operator:/root:/bin/bash\n" +"root:x:0:0::/root:/bin/bash\n" +"ftp:x:40:1::/home/ftp:/bin/bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):162 +msgid "" +"Above, the first parameter to <c>grep</c> is a regex; the second is a " +"filename. <c>grep</c> read each line in /etc/passwd and applied the simple " +"substring regex bash to it, looking for a match. If a match was found, " +"<c>grep</c> printed out the entire line; otherwise, the line was ignored." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):172 +msgid "Understanding the simple substring" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):175 +msgid "" +"In general, if you are searching for a substring, you can just specify the " +"text verbatim without supplying any \"special\" characters. The only time " +"you'd need to do anything special would be if your substring contained a " +"+, ., *, [, ], or \\, in which case these characters would need to be " +"enclosed in quotes and preceded by a backslash. Here are a few more examples " +"of simple substring regular expressions:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):185 +msgid "/tmp (scans for the literal string /tmp)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):186 +msgid "\"\\[box\\]\" (scans for the literal string [box])" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):187 +msgid "\"\\*funny\\*\" (scans for the literal string *funny*)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):188 +msgid "\"ld\\.so\" (scans for the literal string ld.so)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):194 +msgid "Metacharacters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):197 +msgid "" +"With regular expressions, you can perform much more complex searches than " +"the examples we've looked at so far by taking advantage of metacharacters. " +"One of these metacharacters is the . (a period), which matches any single " +"character:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):203 +msgid "The period metacharacter" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):203 +#, no-wrap +msgid "" +"\n" +"$ <i>grep dev.hda /etc/fstab</i>\n" +"/dev/hda3 / reiserfs noatime,ro 1 1\n" +"/dev/hda1 /boot reiserfs noauto,noatime,notail 1 2\n" +"/dev/hda2 swap swap sw 0 0\n" +"#/dev/hda4 /mnt/extra reiserfs noatime,rw 1 1\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):211 +msgid "" +"In this example, the literal text dev.hda didn't appear on any of the lines " +"in /etc/fstab. However, grep wasn't scanning them for the literal dev.hda " +"string, but for the dev.hda pattern. Remember that the . will match any " +"single character. As you can see, the . metacharacter is functionally " +"equivalent to how the ? metacharacter works in \"glob\" expansions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):222 +msgid "Using []" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):225 +msgid "" +"If we wanted to match a character a bit more specifically than ., we could " +"use [ and ] (square brackets) to specify a subset of characters that should " +"be matched:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):231 +msgid "Brackets in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):231 +#, no-wrap +msgid "" +"\n" +"$ <i>grep dev.hda[12] /etc/fstab</i>\n" +"/dev/hda1 /boot reiserfs noauto,noatime,notail 1 2\n" +"/dev/hda2 swap swap sw 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):237 +msgid "" +"As you can see, this particular syntactical feature works identically to the " +"[] in \"glob\" filename expansions. Again, this is one of the tricky things " +"about learning regular expressions -- the syntax is similar but not " +"identical to \"glob\" filename expansion syntax, which often makes regexes a " +"bit confusing to learn." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):248 +msgid "Using [^]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):251 +msgid "" +"You can reverse the meaning of the square brackets by putting a ^ " +"immediately after the [. In this case, the brackets will match any character " +"that is <e>not</e> listed inside the brackets. Again, note that we use [^] " +"with regular expressions, but [!] with globs:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):258 +msgid "Brackets with negation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):258 +#, no-wrap +msgid "" +"\n" +"$ <i>grep dev.hda[^12] /etc/fstab</i>\n" +"/dev/hda3 / reiserfs noatime,ro 1 1\n" +"#/dev/hda4 /mnt/extra reiserfs noatime,rw 1 1\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):267 +msgid "Differing syntax" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):270 +msgid "" +"It's important to note that the syntax inside square brackets is " +"fundamentally different from that in other parts of the regular expression. " +"For example, if you put a . inside square brackets, it allows the square " +"brackets to match a literal ., just like the 1 and 2 in the examples above. " +"In comparison, a literal . outside the square brackets is interpreted as a " +"metacharacter unless prefixed by a \\. We can take advantage of this fact to " +"print a list of all lines in <path>/etc/fstab</path> that contain the " +"literal string dev.hda by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):281 +msgid "Printing literals using brackets" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):281 +#, no-wrap +msgid "" +"\n" +"$ <i>grep dev[.]hda /etc/fstab</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):285 +msgid "Alternately, we could also type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):289 +msgid "Printing literals using escaping" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):289 +#, no-wrap +msgid "" +"\n" +"$ <i>grep \"dev\\.hda\" /etc/fstab</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):293 +msgid "" +"Neither regular expression is likely to match any lines in your <path>/etc/" +"fstab</path> file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):301 +msgid "The \"*\" metacharacter" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):304 +msgid "" +"Some metacharacters don't match anything in themselves, but instead modify " +"the meaning of a previous character. One such metacharacter is * (asterisk), " +"which is used to match zero or more repeated occurrences of the previous " +"character. Note that this means that the * has a different meaning in a " +"regex than it does with globs. Here are some examples, and play close " +"attention to instances where these regex matches differ from globs:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):314 +msgid "" +"ab*c matches abbbbc but not abqc (if a glob, it would match both strings -- " +"can you figure out why?)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):318 +msgid "" +"ab*c matches abc but not abbqbbc (again, if a glob, it would match both " +"strings)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):322 +msgid "" +"ab*c matches ac but not cba (if a glob, ac would not be matched, nor would " +"cba)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):326 +msgid "b[cq]*e matches bqe and be (if a glob, it would match bqe but not be)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):329 +msgid "" +"b[cq]*e matches bccqqe but not bccc (if a glob, it would match the first but " +"not the second as well)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):333 +msgid "" +"b[cq]*e matches bqqcce but not cqe (if a glob, it would match the first but " +"not the second as well)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):337 +msgid "b[cq]*e matches bbbeee (this would not be the case with a glob)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):340 +msgid "" +".* will match any string. (if a glob, it would match any string starting " +"with .)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):344 +msgid "" +"foo.* will match any string that begins with foo (if a glob, it would match " +"any string starting with the four literal characters foo..)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):350 +msgid "" +"Now, for a quick brain-twisting review: the line ac matches the regex ab*c " +"because the asterisk also allows the preceding expression (b) to appear " +"<e>zero</e> times. Again, it's critical to note that the * regex " +"metacharacter is interpreted in a fundamentally different way than the * " +"glob character." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):360 +msgid "Beginning and end of line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):363 +msgid "" +"The last metacharacters we will cover in detail here are the ^ and $ " +"metacharacters, used to match the beginning and end of line, respectively. " +"By using a ^ at the beginning of your regex, you can cause your pattern to " +"be \"anchored\" to the start of the line. In the following example, we use " +"the ^# regex to match any line beginning with the # character:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):371 +msgid "Lines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):371 +#, no-wrap +msgid "" +"\n" +"$ <i>grep ^# /etc/fstab</i>\n" +"# /etc/fstab: static file system information.\n" +"#\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):380 +msgid "Full-line regexes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):383 +msgid "" +"^ and $ can be combined to match an entire line. For example, the following " +"regex will match a line that starts with the # character and ends with the . " +"character, with any number of other characters in between:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):389 +msgid "Matching an entire line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):389 +#, no-wrap +msgid "" +"\n" +"$ <i>grep '^#.*\\.$' /etc/fstab</i>\n" +"# /etc/fstab: static file system information.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):394 +msgid "" +"In the above example, we surrounded our regular expression with single " +"quotes to prevent $ from being interpreted by the shell. Without the single " +"quotes, the $ will disappear from our regex before grep even has a chance to " +"take a look at it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):406 +msgid "FHS and finding files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):408 +msgid "Filesystem Hierarchy Standard" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):411 +msgid "" +"The Filesystem Hierarchy Standard is a document that specifies the layout of " +"directories on a Linux system. The FHS was devised to provide a common " +"layout to simplify distribution-independent software development -- so that " +"stuff is in generally the same place across Linux distributions. The FHS " +"specifies the following directory tree (taken directly from the FHS " +"specification):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):420 +msgid "/ (the root directory)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):421 +msgid "/boot (static files of the boot loader)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):422 +msgid "/dev (device files)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):423 +msgid "/etc (host-specific system configuration)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):424 +msgid "/lib (essential shared libraries and kernel modules)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):425 +msgid "/mnt (mount point for mounting a filesystem temporarily)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):426 +msgid "/opt (add-on application software packages)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):427 +msgid "/sbin (essential system binaries)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):428 +msgid "/tmp (temporary files)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):429 +msgid "/usr (secondary hierarchy)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(li):430 +msgid "/var (variable data)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):436 +msgid "The two independent FHS categories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):439 +msgid "" +"The FHS bases its layout specification on the idea that there are two " +"independent categories of files: shareable vs. unshareable, and variable vs. " +"static. Shareable data can be shared between hosts; unshareable data is " +"specific to a given host (such as configuration files). Variable data can be " +"modified; static data is not modified (except at system installation and " +"maintenance)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):448 +msgid "" +"The following grid summarizes the four possible combinations, with examples " +"of directories that would fall into those categories. Again, this table is " +"straight from the FHS specification:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):454 +msgid "FHS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):454 +#, no-wrap +msgid "" +"\n" +"+---------+-----------------+-------------+\n" +"| | shareable | unshareable |\n" +"+---------+-----------------+-------------+\n" +"|static | /usr | /etc |\n" +"| | /opt | /boot |\n" +"+---------+-----------------+-------------+\n" +"|variable | /var/mail | /var/run |\n" +"| | /var/spool/news | /var/lock |\n" +"+---------+-----------------+-------------+\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):469 +msgid "Secondary hierarchy at /usr" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):472 +msgid "" +"Under <path>/usr</path> you'll find a secondary hierarchy that looks a lot " +"like the root filesystem. It isn't critical for <path>/usr</path> to exist " +"when the machine powers up, so it can be shared on a network (shareable), or " +"mounted from a CD-ROM (static). Most Linux setups don't make use of sharing " +"<path>/usr</path>, but it's valuable to understand the usefulness of " +"distinguishing between the primary hierarchy at the root directory and the " +"secondary hierarchy at <path>/usr</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):482 +msgid "" +"This is all we'll say about the Filesystem Hierarchy Standard. The document " +"itself is quite readable, so you should go take a look at it. You'll " +"understand a lot more about the Linux filesystem if you read it. Find it at " +"<uri>http://www.pathname.com/fhs/</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):492 +msgid "Finding files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):495 +msgid "" +"Linux systems often contain hundreds of thousands of files. Perhaps you are " +"savvy enough to never lose track of any of them, but it's more likely that " +"you will occasionally need help finding one. There are a few different tools " +"on Linux for finding files. This introduction will help you choose the right " +"tool for the job." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):506 +msgid "The PATH" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):509 +msgid "" +"When you run a program at the command line, bash actually searches through a " +"list of directories to find the program you requested. For example, when you " +"type <c>ls</c>, <c>bash</c> doesn't intrinsically know that the ls program " +"lives in <path>/usr/bin</path>. Instead, bash refers to an environment " +"variable called PATH, which is a colon-separated list of directories. We can " +"examine the value of PATH:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):518 +msgid "Viewing your path" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):518 +#, no-wrap +msgid "" +"\n" +"$ <i>echo $PATH</i>\n" +"/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):523 +msgid "" +"Given this value of PATH (yours may differ,) bash would first check <path>/" +"usr/local/bin</path>, then <path>/usr/bin</path> for the <c>ls</c> program. " +"Most likely, <c>ls</c> is kept in <path>/usr/bin</path>, so bash would stop " +"at that point." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):533 +msgid "Modifying PATH" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):536 +msgid "You can augment your PATH by assigning to it on the command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):540 +msgid "Editing PATH" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):540 +#, no-wrap +msgid "" +"\n" +"$ <i>PATH=$PATH:~/bin</i>\n" +"$ <i>echo $PATH</i>\n" +"/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/home/agriffis/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):546 +msgid "" +"You can also remove elements from PATH, although it isn't as easy since you " +"can't refer to the existing $PATH. Your best bet is to simply type out the " +"new PATH you want:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):552 +msgid "Removing entries from PATH" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):552 +#, no-wrap +msgid "" +"\n" +"$ <i>PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:~/bin</i>\n" +"$ <i>echo $PATH</i>\n" +"/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/agriffis/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):558 +msgid "" +"To make your PATH changes available to any future processes you start from " +"this shell, export your changes using the export command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):563 +msgid "Exporting PATH (or any variable, for that matter)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):563 +#, no-wrap +msgid "" +"\n" +"$ <i>export PATH</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):570 +msgid "All about \"which\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):573 +msgid "" +"You can check to see if there's a given program in your PATH by using " +"<c>which</c>. For example, here we find out that our Linux system has no " +"(common) sense:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):579 +msgid "Looking for sense" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):579 +#, no-wrap +msgid "" +"\n" +"$ which <i>sense</i>\n" +"which: no sense in (/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):584 +msgid "In this example, we successfully locate <c>ls</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):588 +msgid "Looking for ls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):588 +#, no-wrap +msgid "" +"\n" +"$ <i>which ls</i>\n" +"/usr/bin/ls\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):596 +msgid "\"which -a\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):599 +msgid "" +"Finally, you should be aware of the <c>-a</c> flag, which causes <c>which</" +"c> to show you all of the instances of a given program in your PATH:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):604 +msgid "Finding all instances of a program in your PATH" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):604 +#, no-wrap +msgid "" +"\n" +"$ <i>which -a ls</i>\n" +"/usr/bin/ls\n" +"/bin/ls\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):613 +msgid "whereis" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):616 +msgid "" +"If you're interested in finding more information than purely the location of " +"a program, you might try the <c>whereis</c> program:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):621 +msgid "Using whereis" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):621 +#, no-wrap +msgid "" +"\n" +"$ <i>whereis ls</i>\n" +"ls: /bin/ls /usr/bin/ls /usr/share/man/man1/ls.1.gz\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):626 +msgid "" +"Here we see that <c>ls</c> occurs in two common binary locations, <path>/" +"bin</path> and <path>/usr/bin</path>. Additionally, we are informed that " +"there is a manual page located in <path>/usr/share/man</path>. This is the " +"man-page you would see if you were to type <c>man ls</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):633 +msgid "" +"The <c>whereis</c> program also has the ability to search for sources, to " +"specify alternate search paths, and to search for unusual entries. Refer to " +"the whereis man-page for further information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):642 +msgid "find" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):645 +msgid "" +"The <c>find</c> command is another handy tool for your toolbox. With find " +"you aren't restricted to programs; you can search for any file you want, " +"using a variety of search criteria. For example, to search for a file by the " +"name of README, starting in <path>/usr/share/doc</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):652 +msgid "Using find" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):652 +#, no-wrap +msgid "" +"\n" +"$ <i>find /usr/share/doc -name README</i>\n" +"/usr/share/doc/ion-20010523/README\n" +"/usr/share/doc/bind-9.1.3-r6/dhcp-dynamic-dns-examples/README\n" +"/usr/share/doc/sane-1.0.5/README\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):662 +msgid "find and wildcards" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):665 +msgid "" +"You can use \"glob\" wildcards in the argument to -name, provided that you " +"quote them or backslash-escape them (so they get passed to find intact " +"rather than being expanded by bash). For example, we might want to search " +"for README files with extensions:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):672 +msgid "Using find with wildcards" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):672 +#, no-wrap +msgid "" +"\n" +"$ <i>find /usr/share/doc -name README\\*</i>\n" +"/usr/share/doc/iproute2-2.4.7/README.gz\n" +"/usr/share/doc/iproute2-2.4.7/README.iproute2+tc.gz\n" +"/usr/share/doc/iproute2-2.4.7/README.decnet.gz\n" +"/usr/share/doc/iproute2-2.4.7/examples/diffserv/README.gz\n" +"/usr/share/doc/pilot-link-0.9.6-r2/README.gz\n" +"/usr/share/doc/gnome-pilot-conduits-0.8/README.gz\n" +"/usr/share/doc/gimp-1.2.2/README.i18n.gz\n" +"/usr/share/doc/gimp-1.2.2/README.win32.gz\n" +"/usr/share/doc/gimp-1.2.2/README.gz\n" +"/usr/share/doc/gimp-1.2.2/README.perl.gz\n" +"[578 additional lines snipped]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):690 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):697 +msgid "Ignoring case with find" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):693 +msgid "Of course, you might want to ignore case in your search:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):697 +#, no-wrap +msgid "" +"\n" +"$ <i>find /usr/share/doc -name '[Rr][Ee][Aa][Dd][Mm][Ee]*'</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):701 +msgid "Or, more simply:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):705 +msgid "Another method" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):705 +#, no-wrap +msgid "" +"\n" +"$ <i>find /usr/share/doc -iname readme\\*</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):709 +msgid "" +"As you can see, you can use <c>-iname</c> to do case-insensitive searching." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):716 +msgid "find and regular expressions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):719 +msgid "" +"If you're familiar with regular expressions, you can use the <c>-regex</c> " +"option to limit the output to filenames that match a pattern. And similar to " +"the <c>-iname</c> option, there is a corresponding <c>-iregex</c> option " +"that ignores case in the pattern. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):726 +msgid "Regex and find" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):726 +#, no-wrap +msgid "" +"\n" +"$ <i>find /etc -iregex '.*xt.*'</i>\n" +"/etc/X11/xkb/types/extra\n" +"/etc/X11/xkb/semantics/xtest\n" +"/etc/X11/xkb/compat/xtest\n" +"/etc/X11/app-defaults/XTerm\n" +"/etc/X11/app-defaults/XTerm-color\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):735 +msgid "" +"Note that unlike many programs, <c>find</c> requires that the regex " +"specified matches the entire path, not just a part of it. For that reason, " +"specifying the leading and trailing .* is necessary; purely using xt as the " +"regex would not be sufficient." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):745 +msgid "find and types" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):748 +msgid "" +"The <c>-type</c> option allows you to find filesystem objects of a certain " +"type. The possible arguments to -type are <c>b</c> (block device), <c>c</c> " +"(character device), <c>d</c> (directory), <c>p</c> (named pipe), <c>f</c> " +"(regular file), <c>l</c> (symbolic link), and <c>s</c> (socket). For " +"example, to search for symbolic links in <path>/usr/bin</path> that contain " +"the string vim:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):757 +msgid "Restricting find by type" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):757 +#, no-wrap +msgid "" +"\n" +"$ <i>find /usr/bin -name '*vim*' -type l</i>\n" +"/usr/bin/rvim\n" +"/usr/bin/vimdiff\n" +"/usr/bin/gvimdiff\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):767 +msgid "find and mtimes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):770 +msgid "" +"The <c>-mtime</c> option allows you to select files based on their last " +"modification time. The argument to mtime is in terms of 24-hour periods, and " +"is most useful when entered with either a plus sign (meaning \"after\") or a " +"minus sign (meaning \"before\"). For example, consider the following " +"scenario:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):777 +msgid "Scenario" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):777 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -l ?</i>\n" +"-rw------- 1 root root 0 Jan 7 18:00 a\n" +"-rw------- 1 root root 0 Jan 6 18:00 b\n" +"-rw------- 1 root root 0 Jan 5 18:00 c\n" +"-rw------- 1 root root 0 Jan 4 18:00 d\n" +"$ <i>date</i>\n" +"Mon May 7 18:14:52 EST 2003\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):787 +msgid "You could search for files that were created in the past 24 hours:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):791 +msgid "Files created in the last 24 hours" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):791 +#, no-wrap +msgid "" +"\n" +"$ <i>find . -name \\? -mtime -1</i>\n" +"./a\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):796 +msgid "" +"Or you could search for files that were created prior to the current 24-hour " +"period:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):801 +msgid "Files created before the last 24 hours" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):801 +#, no-wrap +msgid "" +"\n" +"$ <i>find . -name \\? -mtime +0</i>\n" +"./b\n" +"./c\n" +"./d\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):811 +msgid "The -daystart option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):814 +msgid "" +"If you additionally specify the <c>-daystart</c> option, then the periods of " +"time start at the beginning of today rather than 24 hours ago. For example, " +"here is a set of files created yesterday and the day before:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):820 +msgid "Using -daystart" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):820 +#, no-wrap +msgid "" +"\n" +"$ <i>find . -name \\? -daystart -mtime +0 -mtime -3</i>\n" +"./b\n" +"./c\n" +"$ ls -l b c\n" +"-rw------- 1 root root 0 May 6 18:00 b\n" +"-rw------- 1 root root 0 May 5 18:00 c\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):832 +msgid "The -size option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):835 +msgid "" +"The <c>-size</c> option allows you to find files based on their size. By " +"default, the argument to <c>-size</c> is 512-byte blocks, but adding a " +"suffix can make things easier. The available suffixes are <c>b</c> (512-byte " +"blocks), <c>c</c> (bytes), <c>k</c> (kilobytes), and <c>w</c> (2-byte " +"words). Additionally, you can prepend a plus sign (\"larger than\") or minus " +"sign (\"smaller than\")." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):844 +msgid "" +"For example, to find regular files in <path>/usr/bin</path> that are smaller " +"than 50 bytes:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):849 +msgid "-size in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):849 +#, no-wrap +msgid "" +"\n" +"$ <i>find /usr/bin -type f -size -50c</i>\n" +"/usr/bin/krdb\n" +"/usr/bin/run-nautilus\n" +"/usr/bin/sgmlwhich\n" +"/usr/bin/muttbug\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):860 +msgid "Processing found files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):863 +msgid "" +"You may be wondering what you can do with all these files that you find! " +"Well, <c>find</c> has the ability to act on the files that it finds by using " +"the <c>-exec</c> option. This option accepts a command line to execute as " +"its argument, terminated with ;, and it replaces any occurrences of {} with " +"the filename. This is best understood with an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):871 +msgid "Using -exec" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):871 +#, no-wrap +msgid "" +"\n" +"$ <i>find /usr/bin -type f -size -50c -exec ls -l '{}' ';'</i>\n" +"-rwxr-xr-x 1 root root 27 Oct 28 07:13 /usr/bin/krdb\n" +"-rwxr-xr-x 1 root root 35 Nov 28 18:26 /usr/bin/run-nautilus\n" +"-rwxr-xr-x 1 root root 25 Oct 21 17:51 /usr/bin/sgmlwhich\n" +"-rwxr-xr-x 1 root root 26 Sep 26 08:00 /usr/bin/muttbug\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):879 +msgid "" +"As you can see, <c>find</c> is a very powerful command. It has grown through " +"the years of UNIX and Linux development. There are many other useful options " +"to find. You can learn about them in the find manual page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):888 +msgid "locate" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):891 +msgid "" +"We have covered <c>which</c>, <c>whereis</c>, and <c>find</c>. You might " +"have noticed that <c>find</c> can take a while to execute, since it needs to " +"read each directory that it's searching. It turns out that the <c>locate</c> " +"command can speed things up by relying on an external database generated by " +"<c>updatedb</c> (which we'll cover in the next panel.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):899 +msgid "" +"The <c>locate</c> command matches against any part of a pathname, not just " +"the file itself. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):904 +msgid "locate in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):904 +#, no-wrap +msgid "" +"\n" +"$ <i>locate bin/ls</i>\n" +"/var/ftp/bin/ls\n" +"/bin/ls\n" +"/sbin/lsmod\n" +"/sbin/lspci\n" +"/usr/bin/lsattr\n" +"/usr/bin/lspgpot\n" +"/usr/sbin/lsof\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):918 +msgid "Using updatedb" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):921 +msgid "" +"Most Linux systems have a \"cron job\" to update the database periodically. " +"If your <c>locate</c> returned an error such as the following, then you will " +"need to run <c>updatedb</c> as root to generate the search database:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):927 +msgid "updating your locate database" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):927 +#, no-wrap +msgid "" +"\n" +"$ <i>locate bin/ls</i>\n" +"locate: /var/spool/locate/locatedb: No such file or directory\n" +"$ <i>su -</i>\n" +"Password:\n" +"# <i>updatedb</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):935 +msgid "" +"The <c>updatedb</c> command may take a long time to run. If you have a noisy " +"hard disk, you will hear a lot of racket as the entire filesystem is " +"indexed. :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):945 +msgid "slocate" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):948 +msgid "" +"On many Linux distributions, the <c>locate</c> command has been replaced by " +"<c>slocate</c>. There is typically a symbolic link to <c>locate</c>, so that " +"you don't need to remember which you have. <c>slocate</c> stands for " +"\"secure locate.\" It stores permissions information in the database so that " +"normal users can't pry into directories they would otherwise be unable to " +"read. The usage information for <c>slocate</c> is essentially the same as " +"for <c>locate</c>, although the output might be different depending on the " +"user running the command." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):963 +msgid "Process Control" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):965 +msgid "Staring xeyes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):968 +msgid "" +"To learn about process control, we first need to start a process. Make sure " +"that you have X running and execute the following command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):973 +msgid "Starting a Process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):973 +#, no-wrap +msgid "" +"\n" +"$ <i>xeyes -center red</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):977 +msgid "" +"You will notice that an xeyes window pops up, and the red eyeballs follow " +"your mouse around the screen. You may also notice that you don't have a new " +"prompt in your terminal." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):986 +msgid "Stopping a process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):989 +msgid "" +"To get a prompt back, you could type Control-C (often written as Ctrl-C or " +"^C):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):993 +msgid "" +"You get a new bash prompt, but the xeyes window disappeared. In fact, the " +"entire process has been killed. Instead of killing it with Control-C, we " +"could have just stopped it with Control-Z:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):999 +msgid "Stopping a Process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):999 +#, no-wrap +msgid "" +"\n" +"$ <i>xeyes -center red</i>\n" +"<i>Control-Z</i>\n" +"[1]+ Stopped xeyes -center red\n" +"$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1006 +msgid "" +"This time you get a new bash prompt, and the xeyes windows stays up. If you " +"play with it a bit, however, you will notice that the eyeballs are frozen in " +"place. If the xeyes window gets covered by another window and then uncovered " +"again, you will see that it doesn't even redraw the eyes at all. The process " +"isn't doing anything. It is, in fact, \"Stopped.\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1017 +msgid "fg and bg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1020 +msgid "" +"To get the process \"un-stopped\" and running again, we can bring it to the " +"foreground with the bash built-in <c>fg</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1025 +msgid "using fg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1025 +#, no-wrap +msgid "" +"\n" +"$ <i>fg</i>\n" +"<comment>(test it out, then stop the process again)</comment>\n" +"<i>Control-Z</i>\n" +"[1]+ Stopped xeyes -center red\n" +"$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1033 +msgid "Now continue it in the background with the bash built-in <c>bg</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1037 +msgid "using bg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1037 +#, no-wrap +msgid "" +"\n" +"$ <i>bg</i>\n" +"[1]+ xeyes -center red &\n" +"$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1043 +msgid "" +"Great! The xeyes process is now running in the background, and we have a " +"new, working bash prompt." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1051 +msgid "Using \"&\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1054 +msgid "" +"If we wanted to start xeyes in the background from the beginning (instead of " +"using Control-Z and bg), we could have just added an \"&\" (ampersand) " +"to the end of xeyes command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1060 +msgid "Using ampersands to background processes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1060 +#, no-wrap +msgid "" +"\n" +"$ <i>xeyes -center blue &</i>\n" +"[2] 16224\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1068 +msgid "Multiple background processes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1071 +msgid "" +"Now we have both a red and a blue xeyes running in the background. We can " +"list these jobs with the bash built-in <c>jobs</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1076 +msgid "Using jobs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1076 +#, no-wrap +msgid "" +"\n" +"$ <i>jobs -l</i>\n" +"[1]- 16217 Running xeyes -center red &\n" +"[2]+ 16224 Running xeyes -center blue &\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1082 +msgid "" +"The numbers in the left column are the job numbers bash assigned when they " +"were started. Job 2 has a + (plus) to indicate that it's the \"current job," +"\" which means that typing <c>fg</c> will bring it to the foreground. You " +"could also foreground a specific job by specifying its number; for example, " +"<c>fg 1</c> would make the red xeyes the foreground task. The next column is " +"the process id or pid, included in the listing courtesy of the -l option to " +"jobs. Finally, both jobs are currently \"Running,\" and their command lines " +"are listed to the right." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1096 +msgid "Introducing signals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1099 +msgid "" +"To kill, stop, or continue processes, Linux uses a special form of " +"communication called \"signals.\" By sending a certain signal to a process, " +"you can get it to terminate, stop, or do other things. This is what you're " +"actually doing when you type Control-C, Control-Z, or use the <c>bg</c> or " +"<c>fg</c> built-ins -- you're using bash to send a particular signal to the " +"process. These signals can also be sent using the <c>kill</c> command and " +"specifying the pid (process id) on the command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1109 +msgid "Using kill" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1109 +#, no-wrap +msgid "" +"\n" +"$ <i>kill -s SIGSTOP 16224</i>\n" +"$ <i>jobs -l</i>\n" +"[1]- 16217 Running xeyes -center red &\n" +"[2]+ 16224 Stopped (signal) xeyes -center blue\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1116 +msgid "" +"As you can see, kill doesn't necessarily \"kill\" a process, although it " +"can. Using the \"-s\" option, <c>kill</c> can send any signal to a process. " +"Linux kills, stops or continues processes when they are sent the SIGINT, " +"SIGSTOP, or SIGCONT signals respectively. There are also other signals that " +"you can send to a process; some of these signals may be interpreted in an " +"application-dependent way. You can learn what signals a particular process " +"recognizes by looking at its man-page and searching for a SIGNALS section." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1129 +msgid "SIGTERM and SIGINT" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1132 +msgid "" +"If you want to kill a process, you have several options. By default, kill " +"sends SIGTERM, which is not identical to SIGINT of Control-C fame, but " +"usually has the same results:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1138 +msgid "Using kill to terminate a process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1138 +#, no-wrap +msgid "" +"\n" +"$ <i>kill 16217</i>\n" +"$ <i>jobs -l</i>\n" +"[1]- 16217 Terminated xeyes -center red\n" +"[2]+ 16224 Stopped (signal) xeyes -center blue\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1148 +msgid "The big kill" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1151 +msgid "" +"Processes can ignore both SIGTERM and SIGINT, either by choice or because " +"they are stopped or somehow \"stuck.\" In these cases it may be necessary to " +"use the big hammer, the SIGKILL signal. A process cannot ignore SIGKILL:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1157 +msgid "Using kill to obliterate a process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1157 +#, no-wrap +msgid "" +"\n" +"$ <i>kill 16224</i>\n" +"$ <i>jobs -l</i>\n" +"[2]+ 16224 Stopped (signal) xeyes -center blue\n" +"$ <i>kill -s SIGKILL</i>\n" +"$ <i>jobs -l</i>\n" +"[2]+ 16224 Interrupt xeyes -center blue\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1169 +msgid "nohup" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1172 +msgid "" +"The terminal where you start a job is called the job's controlling terminal. " +"Some shells (not bash by default), will deliver a SIGHUP signal to " +"backgrounded jobs when you logout, causing them to quit. To protect " +"processes from this behavior, use the nohup when you start the process:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1179 +msgid "nohup in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1179 +#, no-wrap +msgid "" +"\n" +"$ <i>nohup make &</i>\n" +"[1] 15632\n" +"$ <i>exit</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1188 +msgid "Using ps to list processes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1191 +msgid "" +"The <c>jobs</c> command we were using earlier only lists processes that were " +"started from your bash session. To see all the processes on your system, use " +"<c>ps</c> with the <c>a</c> and <c>x</c> options together:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1197 +msgid "ps with ax" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1197 +#, no-wrap +msgid "" +"\n" +"$ <i>ps ax</i>\n" +" PID TTY STAT TIME COMMAND\n" +" 1 ? S 0:04 init [3]\n" +" 2 ? SW 0:11 [keventd]\n" +" 3 ? SWN 0:13 [ksoftirqd_CPU0]\n" +" 4 ? SW 2:33 [kswapd]\n" +" 5 ? SW 0:00 [bdflush]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1207 +msgid "" +"I've only listed the first few because it is usually a very long list. This " +"gives you a snapshot of what the whole machine is doing, but is a lot of " +"information to sift through. If you were to leave off the <c>ax</c>, you " +"would see only processes that are owned by you, and that have a controlling " +"terminal. The command <c>ps x</c> would show you all your processes, even " +"those without a controlling terminal. If you were to use <c>ps a</c>, you " +"would get the list of everybody's processes that are attached to a terminal." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1220 +msgid "Seeing the forest and the trees" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1223 +msgid "" +"You can also list different information about each process. The <c>--forest</" +"c> option makes it easy to see the process hierarchy, which will give you an " +"indication of how the various processes on your system interrelate. When a " +"process starts a new process, that new process is called a \"child\" " +"process. In a <c>--forest</c> listing, parents appear on the left, and " +"children appear as branches to the right:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1232 +msgid "Using forest" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1232 +#, no-wrap +msgid "" +"\n" +"$ <i>ps x --forest</i>\n" +" PID TTY STAT TIME COMMAND\n" +" 927 pts/1 S 0:00 bash\n" +" 6690 pts/1 S 0:00 \\_ bash\n" +"26909 pts/1 R 0:00 \\_ ps x --forest\n" +"19930 pts/4 S 0:01 bash\n" +"25740 pts/4 S 0:04 \\_ vi processes.txt\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1245 +msgid "The \"u\" and \"l\" ps options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1248 +msgid "" +"The <c>u</c> or <c>l</c> options can also be added to any combination of " +"<c>a</c> and <c>x</c> in order to include more information about each " +"process:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1253 +msgid "Option au" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1253 +#, no-wrap +msgid "" +"\n" +"$ <i>ps au</i>\n" +"USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND\n" +"agriffis 403 0.0 0.0 2484 72 tty1 S 2001 0:00 -bash\n" +"chouser 404 0.0 0.0 2508 92 tty2 S 2001 0:00 -bash\n" +"root 408 0.0 0.0 1308 248 tty6 S 2001 0:00 /sbin/agetty 3\n" +"agriffis 434 0.0 0.0 1008 4 tty1 S 2001 0:00 /bin/sh /usr/X\n" +"chouser 927 0.0 0.0 2540 96 pts/1 S 2001 0:00 bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1263 +msgid "Option al" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1263 +#, no-wrap +msgid "" +"\n" +"$ <i>ps al</i>\n" +" F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND\n" +"100 1001 403 1 9 0 2484 72 wait4 S tty1 0:00 -bash\n" +"100 1000 404 1 9 0 2508 92 wait4 S tty2 0:00 -bash\n" +"000 0 408 1 9 0 1308 248 read_c S tty6 0:00 /sbin/ag\n" +"000 1001 434 403 9 0 1008 4 wait4 S tty1 0:00 /bin/sh\n" +"000 1000 927 652 9 0 2540 96 wait4 S pts/1 0:00 bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1276 +msgid "Using top" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1279 +msgid "" +"If you find yourself running ps several times in a row, trying to watch " +"things change, what you probably want is <c>top</c>. <c>top</c> displays a " +"continuously updated process listing, along with some useful summary " +"information:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1286 +msgid "top" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1286 +#, no-wrap +msgid "" +"\n" +"$ <i>top</i>\n" +" 10:02pm up 19 days, 6:24, 8 users, load average: 0.04, 0.05, 0.00\n" +"75 processes: 74 sleeping, 1 running, 0 zombie, 0 stopped\n" +"CPU states: 1.3% user, 2.5% system, 0.0% nice, 96.0% idle\n" +"Mem: 256020K av, 226580K used, 29440K free, 0K shrd, 3804K buff\n" +"Swap: 136544K av, 80256K used, 56288K free 101760K cached\n" +"\n" +" PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND\n" +" 628 root 16 0 213M 31M 2304 S 0 1.9 12.5 91:43 X\n" +"26934 chouser 17 0 1272 1272 1076 R 0 1.1 0.4 0:00 top\n" +" 652 chouser 11 0 12016 8840 1604 S 0 0.5 3.4 3:52 gnome-termin\n" +" 641 chouser 9 0 2936 2808 1416 S 0 0.1 1.0 2:13 sawfish\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1304 +msgid "nice" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1307 +msgid "" +"Each processes has a priority setting that Linux uses to determine how CPU " +"timeslices are shared. You can set the priority of a process by starting it " +"with the <c>nice</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1313 +msgid "nicing a process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1313 +#, no-wrap +msgid "" +"\n" +"$ <i>nice -n 10 oggenc /tmp/song.wav</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1317 +msgid "" +"Since the priority setting is called <c>nice</c>, it should be easy to " +"remember that a higher value will be nice to other processes, allowing them " +"to get priority access to the CPU. By default, processes are started with a " +"setting of 0, so the setting of 10 above means oggenc will readily give up " +"the CPU to other processes. Generally, this means that oggenc will allow " +"other processes to run at their normal speed, regardless of how CPU-hungry " +"oggenc happens to be. You can see these niceness levels under the NI column " +"in the ps and top listings above." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1331 +msgid "renice" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1334 +msgid "" +"The <c>nice</c> command can only change the priority of a process when you " +"start it. If you want to change the niceness setting of a running process, " +"use <c>renice</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1340 +msgid "using renice" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1340 +#, no-wrap +msgid "" +"\n" +"$ <i>ps l 641</i>\n" +" F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND\n" +"000 1000 641 1 9 0 5876 2808 do_sel S ? 2:14 sawfish\n" +"$ <i>renice 10 641</i>\n" +"641: old priority 0, new priority 10\n" +"$ <i>ps l 641</i>\n" +" F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND\n" +"000 1000 641 1 9 10 5876 2808 do_sel S ? 2:14 sawfish\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1356 +msgid "Text processing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1358 +msgid "Redirection revisited" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1361 +msgid "" +"Earlier in this tutorial series, we saw an example of how to use the <c>>" +"</c> operator to redirect the output of a command to a file, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1366 +msgid "Use of the > operator" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1366 +#, no-wrap +msgid "" +"\n" +"$ <i>echo \"firstfile\" > copyme</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1370 +msgid "" +"In addition to redirecting output to a file, we can also take advantage of a " +"powerful shell feature called pipes. Using pipes, we can pass the output of " +"one command to the input of another command. Consider the following example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1376 +msgid "Introducing pipes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1376 +#, no-wrap +msgid "" +"\n" +"$ <i>echo \"hi there\" | wc</i>\n" +" 1 2 9\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1381 +msgid "" +"The <c>|</c> character is used to connect the output of the command on the " +"left to the input of the command on the right. In the example above, the " +"<c>echo</c> command prints out the string \"hi there\" followed by a " +"linefeed. That output would normally appear on the terminal, but the pipe " +"redirects it into the <c>wc</c> command, which displays the number of lines, " +"words, and characters in its input." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1393 +msgid "A pipe example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1396 +msgid "Here is another simple example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1400 +msgid "pipes in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1400 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -s | sort -n</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1404 +msgid "" +"In this case, <c>ls -s</c> would normally print a listing of the current " +"directory on the terminal, preceding each file with its size. But instead " +"we've piped the output into <c>sort -n</c>, which sorts the output " +"numerically. This is a really useful way to find large files in your home " +"directory!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1411 +msgid "" +"The following examples are more complex, but they demonstrate the power that " +"can be harnessed using pipes. We're going to throw out some commands we " +"haven't covered yet, but don't let that slow you down. Concentrate instead " +"on understanding how pipes work so you can employ them in your daily Linux " +"tasks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1421 +msgid "The decompression pipeline" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1424 +msgid "Normally to decompress and untar a file, you might do the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1428 +msgid "Untarring a file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1428 +#, no-wrap +msgid "" +"\n" +"$ <i>bzip2 -d linux-2.4.16.tar.bz2</i>\n" +"$ <i>tar xvf linux-2.4.16.tar</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1433 +msgid "" +"The downside of this method is that it requires the creation of an " +"intermediate, uncompressed file on your disk. Since <c>tar</c> has the " +"ability to read directly from its input (instead of specifying a file), we " +"could produce the same end-result using a pipeline:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1440 +msgid "untarring using a pipeline" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1440 +#, no-wrap +msgid "" +"\n" +"$ <i>bzip2 -dc linux-2.4.16.tar.bz2 | tar xvf -</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1444 +msgid "" +"Woo hoo! Our compressed tarball has been extracted and we didn't need an " +"intermediate file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1452 +msgid "A longer pipeline" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1455 +msgid "Here's another pipeline example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1459 +msgid "Longer pipelines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1459 +#, no-wrap +msgid "" +"\n" +"$ <i>cat myfile.txt | sort | uniq | wc -l</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1463 +msgid "" +"We use <c>cat</c> to feed the contents of <path>myfile.txt</path> to the " +"<c>sort</c> command. When the <c>sort</c> command receives the input, it " +"sorts all input lines so that they are in alphabetical order, and then sends " +"the output to <c>uniq</c>. <c>uniq</c> removes any duplicate lines (and " +"requires its input to be sorted, by the way,) sending the scrubbed output to " +"<c>wc -l</c>. We've seen the <c>wc</c> command earlier, but without command-" +"line options. When given the <c>-l</c> option, it only prints the number of " +"lines in its input, instead of also including words and characters. You'll " +"see that this pipeline will print out the number of unique (non-identical) " +"lines in a text file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1476 +msgid "" +"Try creating a couple of test files with your favorite text editor and use " +"this pipeline to see what results you get." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1484 +msgid "The text processing whirlwind begins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1487 +msgid "" +"Now we embark on a whirlwind tour of the standard Linux text processing " +"commands. Because we're covering a lot of material in this tutorial, we " +"don't have the space to provide examples for every command. Instead, we " +"encourage you to read each command's man page (by typing <c>man echo</c>, " +"for example) and learn how each command and it's options work by spending " +"some time playing with each one. As a rule, these commands print the results " +"of any text processing to the terminal rather than modifying any specified " +"files. After we take our whirlwind tour of the standard Linux text " +"processing commands, we'll take a closer look at output and input " +"redirection. So yes, there is light at the end of the tunnel :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1500 +msgid "" +"<c>echo</c> prints its arguments to the terminal. Use the <c>-e</c> option " +"if you want to embed backslash escape sequences; for example <c>echo -e \"foo" +"\\nfoo\"</c> will print foo, then a newline, and then foo again. Use the <c>-" +"n</c> option to tell echo to omit the trailing newline that is appended to " +"the output by default." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1508 +msgid "" +"<c>cat</c> will print the contents of the files specified as arguments to " +"the terminal. Handy as the first command of a pipeline, for example, <c>cat " +"foo.txt | blah</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1514 +msgid "" +"<c>sort</c> will print the contents of the file specified on the command " +"line in alphabetical order. Of course, <c>sort</c> also accepts piped input. " +"Type <c>man sort</c> to familiarize yourself with its various options that " +"control sorting behavior." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1521 +msgid "" +"<c>uniq</c> takes an <e>already-sorted</e> file or stream of data (via a " +"pipeline) and removes duplicate lines." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1526 +msgid "" +"<c>wc</c> prints out the number of lines, words, and bytes in the specified " +"file or in the input stream (from a pipeline). Type <c>man wc</c> to learn " +"how to fine-tune what counts are displayed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1532 +msgid "" +"<c>head</c> prints out the first ten lines of a file or stream. Use the <c>-" +"n</c> option to specify how many lines should be displayed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1537 +msgid "" +"<c>tail</c> prints out the last ten lines of a file or stream. Use the <c>-" +"n</c> option to specify how many lines should be displayed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1542 +msgid "" +"<c>tac</c> is like <c>cat</c>, but prints all lines in reverse order; in " +"other words, the last line is printed first." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1547 +msgid "" +"<c>expand</c> converts input tabs to spaces. Use the <c>-t</c> option to " +"specify the tabstop." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1552 +msgid "" +"<c>unexpand</c> converts input spaces to tabs. Use the <c>-t</c> option to " +"specify the tabstop." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1557 +msgid "" +"<c>cut</c> is used to extract character-delimited fields from each line of " +"an input file or stream." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1562 +msgid "" +"The <c>nl</c> command adds a line number to every line of input. Useful for " +"printouts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1567 +msgid "" +"<c>pr</c> is used to break files into multiple pages of output; typically " +"used for printing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1572 +msgid "" +"<c>tr</c> is a character translation tool; it's used to map certain " +"characters in the input stream to certain other characters in the output " +"stream." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1577 +msgid "" +"<c>sed</c> is a powerful stream-oriented text editor. You can learn more " +"about sed in the following IBM developerWorks articles:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):1583 +msgid "/doc/en/articles/l-sed1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):1583 +msgid "Sed by example, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):1584 +msgid "/doc/en/articles/l-sed2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):1584 +msgid "Sed by example, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):1585 +msgid "/doc/en/articles/l-sed3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):1585 +msgid "Sed by example, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1588 +msgid "" +"If you're planning to take the LPI exam, be sure to read the first two " +"articles of this series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1593 +msgid "" +"<c>awk</c> is a handy line-oriented text-processing language. To learn more " +"about awk, read the following IBM developerWorks articles:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):1599 +msgid "/doc/en/articles/l-awk1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):1599 +msgid "Awk by example, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):1600 +msgid "/doc/en/articles/l-awk2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):1600 +msgid "Awk by example, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):1601 +msgid "/doc/en/articles/l-awk3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):1601 +msgid "Awk by example, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1605 +msgid "" +"<c>od</c> is designed to transform the input stream into a octal or hex " +"\"dump\" format." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1610 +msgid "" +"<c>split</c> is a command used to split a larger file into many smaller-" +"sized, more manageable chunks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1615 +msgid "" +"<c>fmt</c> will reformat paragraphs so that wrapping is done at the margin. " +"These days it's less useful since this ability is built into most text " +"editors, but it's still a good one to know." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1621 +msgid "" +"<c>paste</c> takes two or more files as input, concatenates each sequential " +"line from the input files, and outputs the resulting lines. It can be useful " +"to create tables or columns of text." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1627 +msgid "" +"<c>join</c> is similar to paste, but it uses a field (by default the first) " +"in each input line to match up what should be combined on a single line." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1632 +msgid "" +"<c>tee</c> prints its input both to a file and to the screen. This is useful " +"when you want to create a log of something, but you also want to see it on " +"the screen." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1641 +msgid "Whirlwind over! Redirection" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1644 +msgid "" +"Similar to using <c>></c> on the bash command line, you can also use " +"<c><</c> to redirect a file into a command. For many commands, you can " +"simply specify the filename on the command line, however some commands only " +"work from standard input." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1651 +msgid "" +"Bash and other shells support the concept of a \"herefile.\" This allows you " +"to specify the input to a command in the lines following the command " +"invocation, terminating it with a sentinal value. This is easiest shown " +"through an example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1657 +msgid "Redirection in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1657 +#, no-wrap +msgid "" +"\n" +"$ <i>sort <<END</i>\n" +"apple\n" +"cranberry\n" +"banana\n" +"END\n" +"apple\n" +"banana\n" +"cranberry\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1668 +msgid "" +"In the example above, we typed the words apple, cranberry and banana, " +"followed by \"END\" to signify the end of the input. The <c>sort</c> program " +"then returned our words in alphabetical order." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1677 +msgid "Using >>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1680 +msgid "" +"You would expect <c>>></c> to be somehow analogous to <c><<</c>, " +"but it isn't really. It simply means to append the output to a file, rather " +"than overwrite as <c>></c> would. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1686 +msgid "Redirecting to a file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1686 +#, no-wrap +msgid "" +"\n" +"$ <i>echo Hi > myfile</i>\n" +"$ <i>echo there. > myfile</i>\n" +"$ <i>cat myfile</i>\n" +"there.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1693 +msgid "Oops! We lost the \"Hi\" portion! What we meant was this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1697 +msgid "Appending to a file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1697 +#, no-wrap +msgid "" +"\n" +"$ <i>echo Hi > myfile</i>\n" +"$ <i>echo there. >> myfile</i>\n" +"$ <i>cat myfile</i>\n" +"Hi\n" +"there.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1705 +msgid "Much better!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1714 +msgid "Kernel Modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1716 +msgid "Meet \"uname\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1719 +msgid "" +"The <c>uname</c> command provides a variety of interesting information about " +"your system. Here's what is displayed on my development workstation when I " +"type <c>uname -a</c> which tells the <c>uname</c> command to print out all " +"of its information in one swoop:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1726 +msgid "uname -a" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1726 +#, no-wrap +msgid "" +"\n" +"$ <i>uname -a</i>\n" +"Linux inventor 2.4.20-gaming-r1 #1 Fri Apr 11 18:33:35 MDT 2003 i686 AMD Athlon(tm) XP 2100+ AuthenticAMD GNU/Linux\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1734 +msgid "More uname madness" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1737 +msgid "Now, let's look at the information that <c>uname</c> provides" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1741 +msgid "uname info" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1741 +#, no-wrap +msgid "" +"\n" +"info. option arg example\n" +"kernel name -s \"Linux\"\n" +"hostname -n \"inventor\"\n" +"kernel release -r \"2.4.20-gaming-r1\"\n" +"kernel version -v \"#1 Fri Apr 11 18:33:35 MDT 2003\"\n" +"machine -m \"i686\"\n" +"processor -p \"AMD Athlon(tm) XP 2100+\"\n" +"hardware platform -i \"AuthenticAMD\"\n" +"operating system -o \"GNU/Linux\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1753 +msgid "Intriguing! What does your <c>uname -a</c> command print out?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1760 +msgid "The kernel release" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1763 +msgid "" +"Here's a magic trick. First, type <c>uname -r</c> to have the uname command " +"print out the release of the Linux kernel that's currently running." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1768 +msgid "" +"Now, look in the <path>/lib/modules</path> directory and --presto!-- I bet " +"you'll find a directory with that exact name! OK, not quite magic, but now " +"may be a good time to talk about the significance of the directories in " +"<path>/lib/modules</path> and explain what kernel modules are." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1778 +msgid "The kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1781 +msgid "" +"The Linux kernel is the heart of what is commonly referred to as \"Linux\" " +"-- it's the piece of code that accesses your hardware directly and provides " +"abstractions so that regular old programs can run. Thanks to the kernel, " +"your text editor doesn't need to worry about whether it is writing to a SCSI " +"or IDE disk -- or even a RAM disk. It just writes to a filesystem, and the " +"kernel takes care of the rest." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1793 +msgid "Introducing kernel modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1796 +msgid "" +"So, what are kernel modules? Well, they're parts of the kernel that have " +"been stored in a special format on disk. At your command, they can be loaded " +"into the running kernel and provide additional functionality." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1802 +msgid "" +"Because the kernel modules are loaded on demand, you can have your kernel " +"support a lot of additional functionality that you may not ordinarily want " +"to be enabled. But once in a blue moon, those kernel modules are likely to " +"come in quite handy and can be loaded -- often automatically -- to support " +"that odd filesystem or hardware device that you rarely use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1813 +msgid "Kernel modules in a nutshell" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1816 +msgid "" +"In sum, kernel modules allow for the running kernel to enable capabilities " +"on an on-demand basis. Without kernel modules, you'd have to compile a " +"completely new kernel and reboot in order for it to support something new." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1825 +msgid "lsmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1828 +msgid "" +"To see what modules are currently loaded on your system, use the <c>lsmod</" +"c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1833 +msgid "using lsmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1833 +#, no-wrap +msgid "" +"\n" +"# <i>lsmod</i>\n" +"Module Size Used by Tainted: PF\n" +"vmnet 20520 5\n" +"vmmon 22484 11\n" +"nvidia 1547648 10\n" +"mousedev 3860 2\n" +"hid 16772 0 (unused)\n" +"usbmouse 1848 0 (unused)\n" +"input 3136 0 [mousedev hid usbmouse]\n" +"usb-ohci 15976 0 (unused)\n" +"ehci-hcd 13288 0 (unused)\n" +"emu10k1 64264 2\n" +"ac97_codec 9000 0 [emu10k1]\n" +"sound 51508 0 [emu10k1]\n" +"usbcore 55168 1 [hid usbmouse usb-ohci ehci-hcd]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1854 +msgid "Modules listing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1857 +msgid "" +"As you can see, my system has quite a few modules loaded. the vmnet and " +"vmmon modules provide necessary functionality for my <uri link=\"http://www." +"vmware.com/\">VMWare</uri> program, which allows me to run a virtual PC in a " +"window on my desktop. The \"nvidia\" module comes from <uri link=\"http://" +"www.nvidia.com/\">NVIDIA</uri> corporation and allows me to use my high-" +"performance 3D-accelerated graphics card under Linux whilst taking advantage " +"of its many neat features." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1867 +msgid "" +"Then I have a bunch of modules that are used to provide support for my USB-" +"based input devices -- namely \"mousedev,\" \"hid,\" \"usbmouse,\" \"input," +"\" \"usb-ohci,\" \"ehci-hcd\" and \"usbcore.\" It often makes sense to " +"configure your kernel to provide USB support as modules. Why? Because USB " +"devices are \"plug and play,\" and when you have your USB support in " +"modules, then you can go out and buy a new USB device, plug it in to your " +"system, and have the system automatically load the appropriate modules to " +"enable that device. It's a handy way to do things." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1881 +msgid "Third-party modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1884 +msgid "" +"Rounding out my list of modules are \"emu10k1,\" \"ac97_codec,\" and \"sound," +"\" which together provide support for my SoundBlaster Audigy sound card." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1889 +msgid "" +"It should be noted that some of my kernel modules come from the kernel " +"sources themselves. For example, all the USB-related modules are compiled " +"from the standard Linux kernel sources. However, the nvidia, emu10k1 and " +"VMWare-related modules come from other sources. This highlights another " +"major benefit of kernel modules -- allowing third parties to provide much-" +"needed kernel functionality and allowing this functionality to \"plug in\" " +"to a running Linux kernel. No reboot necessary." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1902 +msgid "depmod and friends" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1905 +msgid "" +"In my <path>/lib/modules/2.4.20-gaming-r1/</path> directory, I have a number " +"of files that start with the string \"modules.\":" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1910 +msgid "other modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1910 +#, no-wrap +msgid "" +"\n" +"$ <i>ls /lib/modules/2.4.20-gaming-r1/modules.*</i>\n" +"/lib/modules/2.4.20-gaming-r1/modules.dep\n" +"/lib/modules/2.4.20-gaming-r1/modules.generic_string\n" +"/lib/modules/2.4.20-gaming-r1/modules.ieee1394map\n" +"/lib/modules/2.4.20-gaming-r1/modules.isapnpmap\n" +"/lib/modules/2.4.20-gaming-r1/modules.parportmap\n" +"/lib/modules/2.4.20-gaming-r1/modules.pcimap\n" +"/lib/modules/2.4.20-gaming-r1/modules.pnpbiosmap\n" +"/lib/modules/2.4.20-gaming-r1/modules.usbmap\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1922 +msgid "" +"These files contain some lots of dependency information. For one, they " +"record *dependency* information for modules -- some modules require other " +"modules to be loaded first before they will run. This information is " +"recorded in these files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1932 +msgid "How you get modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1935 +msgid "" +"Some kernel modules are designed to work with specific hardware devices, " +"like my \"emu10k1\" module which is for my SoundBlaster Audigy card. For " +"these types of modules, these files also record the PCI IDs and similar " +"identifying marks of the hardware devices that they support. This " +"information can be used by things like the \"hotplug\" scripts (which we'll " +"take a look at in later tutorials) to auto-detect hardware and load the " +"appropriate module to support said hardware automatically." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1948 +msgid "Using depmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1951 +msgid "" +"If you ever install a new module, this dependency information may become out " +"of date. To make it fresh again, simply type <c>depmod -a</c>. The " +"<c>depmod</c> program will then scan all the modules in your directories in " +"<path>/lib/modules</path> and freshening the dependency information. It does " +"this by scanning the module files in <path>/lib/modules</path> and looking " +"at what are called \"symbols\" inside the modules." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1963 +msgid "Locating kernel modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1966 +msgid "" +"So, what do kernel modules look like? For 2.4 kernels, they're typically any " +"file in the <path>/lib/modules</path> tree that ends in \".o\". To see all " +"the modules in <path>/lib/modules</path>, type the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1972 +msgid "kernel modules in /lib/modules" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1972 +#, no-wrap +msgid "" +"\n" +"# <i>find /lib/modules -name '*.o'</i>\n" +"/lib/modules/2.4.20-gaming-r1/misc/vmmon.o\n" +"/lib/modules/2.4.20-gaming-r1/misc/vmnet.o\n" +"/lib/modules/2.4.20-gaming-r1/video/nvidia.o\n" +"/lib/modules/2.4.20-gaming-r1/kernel/fs/fat/fat.o\n" +"/lib/modules/2.4.20-gaming-r1/kernel/fs/vfat/vfat.o\n" +"/lib/modules/2.4.20-gaming-r1/kernel/fs/minix/minix.o\n" +"[listing \"snipped\" for brevity]\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):1986 +msgid "insmod vs. modprobe" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):1989 +msgid "" +"So, how does one load a module into a running kernel? One way is to use the " +"<c>insmod</c> command and specifying the full path to the module that you " +"wish to load:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):1995 +msgid "using insmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):1995 +#, no-wrap +msgid "" +"\n" +"# <i>insmod /lib/modules/2.4.20-gaming-r1/kernel/fs/fat/fat.o</i>\n" +"# <i>lsmod | grep fat</i>\n" +"fat 29272 0 (unused)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2001 +msgid "" +"However, one normally loads modules by using the <c>modprobe</c> command. " +"One of the nice things about the <c>modprobe</c> command is that it " +"automatically takes care of loading any dependent modules. Also, one doesn't " +"need to specify the path to the module you wish to load, nor does one " +"specify the trailing \".o\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):2012 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):2019 +msgid "rmmod and modprobe in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2015 +msgid "Let's unload our \"fat.o\" module and load it using <c>modprobe</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):2019 +#, no-wrap +msgid "" +"\n" +"# <i>rmmod fat</i>\n" +"# <i>lsmod | grep fat</i>\n" +"# <i>modprobe fat</i>\n" +"# <i>lsmod | grep fat</i>\n" +"fat 29272 0 (unused)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2027 +msgid "" +"As you can see, the <c>rmmod</c> command works similarly to modprobe, but " +"has the opposite effect -- it unloads the module you specify." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):2035 +msgid "Your friend modinfo and modules.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2038 +msgid "" +"You can use the <c>modinfo</c> command to learn interesting things about " +"your favorite modules:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre:caption):2043 +msgid "Using modinfo" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(pre):2043 +#, no-wrap +msgid "" +"\n" +"# <i>modinfo fat</i>\n" +"filename: /lib/modules/2.4.20-gaming-r1/kernel/fs/fat/fat.o\n" +"description: <none>\n" +"author: <none>\n" +"license: \"GPL\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2051 +msgid "" +"And make special note of the <path>/etc/modules.conf</path> file. This file " +"contains configuration information for <c>modprobe</c>. It allows you to " +"tweak the functionality of <c>modprobe</c> by telling it to load modules " +"before/after loading others, run scripts before/after modules load, and more." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):2061 +msgid "modules.conf gotchas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2064 +msgid "" +"The syntax and functionality of <path>modules.conf</path> is quite " +"complicated, and we won't go into its syntax now (type <c>man modules.conf</" +"c> for all the gory details), but here are some things that you *should* " +"know about this file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2070 +msgid "" +"For one, many distributions generate this file automatically from a bunch of " +"files in another directory, like <path>/etc/modules.d/</path>. For example, " +"Gentoo Linux has an <path>/etc/modules.d/</path> directory, and running the " +"<c>update-modules</c> command will take every file in <path>/etc/modules.d/</" +"path> and concatenate them to produce a new <path>/etc/modules.conf</path>. " +"Therefore, make your changes to the files in <path>/etc/modules.d/</path> " +"and run update-modules if you are using Gentoo. If you are using Debian, the " +"procedure is similar except that the directory is called <path>/etc/modutils/" +"</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):2087 +msgid "Summary and Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):2089 +msgid "Summary" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2092 +msgid "" +"Congratulations; you've reached the end of this tutorial on basic Linux " +"administration! We hope that it has helped you to firm up your foundational " +"Linux knowledge. Please join us in our next tutorial covering intermediate " +"administration, where we will build on the foundation laid here, covering " +"topics like the Linux permissions and ownership model, user account " +"management, filesystem creation and mounting, and more. And remember, by " +"continuing in this tutorial series, you'll soon be ready to attain your LPIC " +"Level 1 Certification from the Linux Professional Institute." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(title):2106 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2109 +msgid "" +"Speaking of LPIC certification, if this is something you're interested in, " +"then we recommend that you study the following resources, which have been " +"carefully selected to augment the material covered in this tutorial:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2115 +msgid "" +"There are a number of good regular expression resources on the 'net. Here " +"are a couple that we've found:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):2122 +msgid "http://www.zvon.org/other/reReference/Output/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):2122 +msgid "Regular Expressions Reference" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri:link):2125 +msgid "http://zez.org/article/articleview/11/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(uri):2125 +msgid "Regular Expressions Explained" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2129 +msgid "" +"Be sure to read up on the Filesystem Hierarchy Standard at <uri>http://www." +"pathname.com/fhs/</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2134 +msgid "" +"In the <uri link=\"/doc/en/articles/bash-by-example-p1.xml\">Bash by example " +"article series</uri>, I show you how to use bash programming constructs to " +"write your own bash scripts. This series (particularly parts one and two) " +"will be good preparation for the LPIC Level 1 exam:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2141 +msgid "" +"You can learn more about <c>sed</c> in the <uri link=\"http://www-106.ibm." +"com/developerworks/linux/library/l-sed1.html?dwzone=linux\">relevent IBM " +"developerWorks articles</uri>. If you're planning to take the LPI exam, be " +"sure to read the first two articles of this series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2148 +msgid "" +"To learn more about <c>awk</c>, read the <uri link=\"http://www-106.ibm.com/" +"developerworks/linux/library/l-awk1.html?dwzone=linux\">relevent IBM " +"developerWorks articles</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2154 +msgid "" +"We highly recommend the <uri link=\"http://www-106.ibm.com/developerworks/" +"linux/library/l-faq/index.html\">Technical FAQ for Linux users</uri>, a 50-" +"page in-depth list of frequently-asked Linux questions, along with detailed " +"answers. The FAQ itself is in PDF (Acrobat) format. If you're a beginning or " +"intermediate Linux user, you really owe it to yourself to check this FAQ out." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(p):2163 +msgid "" +"If you're not too familiar with the <c>vi</c> editor, I strongly recommend " +"that you check out my <uri link=\"http://www-106.ibm.com/developerworks/edu/" +"l-dw-linuxvi-i.html\">Vi -- the cheat sheet method</uri> tutorial. This " +"tutorial will give you a gentle yet fast-paced introduction to this powerful " +"text editor. Consider this must-read material if you don't know how to use " +"<c>vi</c>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-administration-p2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/lpi-101-advanced-p4.xml.po b/article/gettext/ru/lpi-101-advanced-p4.xml.po new file mode 100644 index 0000000..eea7593 --- /dev/null +++ b/article/gettext/ru/lpi-101-advanced-p4.xml.po @@ -0,0 +1,3622 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(guide:link):5 +msgid "/doc/en/articles/lpi-101-advanced-p4.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):6 +msgid "LPI certification 101 (release 2) exam prep, Part 4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(author:title):8 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(author:title):11 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(author:title):14 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(mail:link):12 +msgid "chouser@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(mail):12 +msgid "Chris Houser" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(mail:link):15 +msgid "agriffis@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(mail):15 +msgid "Aron Griffis" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(abstract):18 +msgid "" +"In this tutorial, we'll introduce all popular filesystem on Linux. We'll " +"teach you how to mount and unmount devices. In next chapter you'll know how " +"to boot the system and how to work with runlevels. In next section of this " +"tutorial, we'll introduce filesystem quotas, we will teach you how to set " +"them and how to configure them. By the end of this tutorial you'll know a " +"system logs." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(version):31 +msgid "1.0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(date):32 +msgid "2005-12-17" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):35 +msgid "Before you start" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):37 +msgid "About this tutorial" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):40 +msgid "" +"Welcome to \"Advanced administration,\" the last of four tutorials designed " +"to prepare you for the Linux Professional Institute's 101 (release 2) exam. " +"In this tutorial (Part 4), we'll bolster your knowledge of advanced Linux " +"administration skills by covering a variety of topics including Linux " +"filesystems, the Linux boot process, runlevels, filesystem quotas, and " +"system logs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):49 +msgid "" +"This tutorial is particularly appropriate for someone who may be serving as " +"the primary sysadmin for the first time, since we cover a lot of low-level " +"issues that all system administrators should know. If you are new to Linux, " +"we recommend that you start with <uri link=\"/doc/en/articles/lpi-101-" +"fundamentals-p1.xml\">Part 1</uri> and work through the series from there. " +"For some, much of this material will be new, but more experienced Linux " +"users may find this tutorial to be a great way of \"rounding out\" their " +"foundational Linux system administration skills and preparing for the next " +"LPI certification level." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):61 +msgid "" +"By the end of this series of tutorials (eight in all covering the LPI 101 " +"and 102 exams), you will have the knowledge you need to become a Linux " +"Systems Administrator and will be ready to attain an LPIC Level 1 " +"certification from the Linux Professional Institute if you so choose." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):68 +msgid "" +"For those who have taken the <uri link=\"http://www-106.ibm.com/" +"developerworks/edu/l-dw-linuxlpi4-i.html\">release 1 version</uri> of this " +"tutorial for reasons other than LPI exam preparation, you probably don't " +"need to take this one. However, if you do plan to take the exams, you should " +"strongly consider reading this revised tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):76 +msgid "The LPI logo is a trademark of Linux Professional Institute." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):83 +msgid "About the authors" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):86 +msgid "" +"For technical questions about the content of this tutorial, contact the " +"authors:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):92 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2930 +msgid "Daniel Robbins, at <mail>drobbins@gentoo.org</mail>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):93 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2931 +msgid "Chris Houser, at <mail>chouser@gentoo.org</mail>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):94 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2932 +msgid "Aron Griffis, at <mail>agriffis@gentoo.org</mail>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):97 +msgid "" +"Daniel Robbins lives in Albuquerque, New Mexico, and is the Chief Architect " +"of <uri link=\"http://www.gentoo.org\">Gentoo Technologies, Inc.</uri>, the " +"creator of Gentoo Linux, an advanced Linux for the PC, and the Portage " +"system, a next-generation ports system for Linux. He has also served as a " +"contributing author for the Macmillan books Caldera OpenLinux Unleashed, " +"SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with " +"computers in some fashion since the second grade, when he was first exposed " +"to the Logo programming language as well as a potentially dangerous dose of " +"Pac Man. This probably explains why he has since served as a Lead Graphic " +"Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time " +"with his wife, Mary, and their daughter, Hadassah." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):111 +msgid "" +"Chris Houser, known to his friends as \"Chouser,\" has been a UNIX proponent " +"since 1994 when joined the administration team for the computer science " +"network at Taylor University in Indiana, where he earned his Bachelor's " +"degree in Computer Science and Mathematics. Since then, he has gone on to " +"work in Web application programming, user interface design, professional " +"video software support, and now Tru64 UNIX device driver programming at <uri " +"link=\"http://www.compaq.com/\">Compaq</uri>. He has also contributed to " +"various free software projects, most recently to <uri link=\"http://www." +"gentoo.org\">Gentoo Linux</uri>. He lives with his wife and two cats in New " +"Hampshire." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):124 +msgid "" +"Aron Griffis graduated from Taylor University with a degree in Computer " +"Science and an award that proclaimed him the \"Future Founder of a Utopian " +"UNIX Commune\". Working towards that goal, Aron is employed by <uri link=" +"\"http://www.compaq.com/\">Compaq</uri> writing network drivers for Tru64 " +"UNIX, and spending his spare time plunking out tunes on the piano or " +"developing <uri link=\"http://www.gentoo.org\">Gentoo Linux</uri>. He lives " +"with his wife Amy (also a UNIX engineer) in Nashua, NH." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):139 +msgid "Filesystems, partitions, and block devices" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):141 +msgid "Introduction to block devices" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):144 +msgid "" +"In this section, we'll take a good look at disk-oriented aspects of Linux, " +"including Linux filesystems, partitions, and block devices. Once you're " +"familar with the ins and outs of disks and filesystems, we'll guide you " +"through the process of setting up partitions and filesystems on Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):151 +msgid "" +"To begin, I'll introduce \"block devices\". The most famous block device is " +"probably the one that represents the first IDE drive in a Linux system:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):156 +msgid "First IDE drive in Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):156 +#, no-wrap +msgid "" +"\n" +"/dev/hda\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):160 +msgid "If your system uses SCSI drives, then your first hard drive will be:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):164 +msgid "First SCSI drive in Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):164 +#, no-wrap +msgid "" +"\n" +"/dev/sda\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):171 +msgid "Layers of abstraction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):174 +msgid "" +"The block devices above represent an abstract interface to the disk. User " +"programs can use these block devices to interact with your disk without " +"worrying about whether your drivers are IDE, SCSI, or something else. The " +"program can simply address the storage on the disk as a bunch of contiguous, " +"randomly-accessible 512-byte blocks." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):185 +msgid "Partitions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):188 +msgid "" +"Under Linux, we create filesystems by using a special command called " +"<c>mkfs</c> (or <c>mke2fs</c>, <c>mkreiserfs</c>, etc.), specifying a " +"particular block device as a command-line argument." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):194 +msgid "" +"However, although it is theoretically possible to use a \"whole disk\" block " +"device (one that represents the entire disk) like <path>/dev/hda</path> or " +"<path>/dev/sda</path> to house a single filesystem, this is almost never " +"done in practice. Instead, full disk block devices are split up into " +"smaller, more manageable block devices called partititons. Partitions are " +"created using a tool called <c>fdisk</c>, which is used to create and edit " +"the partition table that's stored on each disk. The partition table defines " +"exactly how to split up the full disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):208 +msgid "Introducing fdisk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):211 +msgid "" +"We can take a look at a disk's partition table by running <c>fdisk</c>, " +"specifying a block device that represents a full disk as an argument." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(note):216 +msgid "" +"Alternate interfaces to the disk's partition table include <c>cfdisk</c>, " +"<c>parted</c>, and <c>partimage</c>. I recommend that you avoid using " +"<c>cfdisk</c> (despite what the fdisk manual page may say) because it " +"sometimes calculates disk geometry incorrectly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):223 +msgid "Using fdisk on IDE drive" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):223 +#, no-wrap +msgid "" +"\n" +"# <i>fdisk /dev/hda</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):227 +msgid "Using fidks on SCSI drive" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):227 +#, no-wrap +msgid "" +"\n" +"# <i>fdisk /dev/sda</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(impo):231 +msgid "" +"You should <e>not</e> save or make any changes to a disk's partition table " +"if any of its partitions contain filesystems that are in use or contain " +"important data. Doing so will generally cause data on the disk to be lost." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):240 +msgid "Inside fdisk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):243 +msgid "" +"Once in <c>fdisk</c>, you'll be greeted with a prompt that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):247 +msgid "fidsk greeting prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):247 +#, no-wrap +msgid "" +"\n" +"Command (m for help):\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):251 +msgid "Type <c>p</c> to display your disk's current partition configuration:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):255 +msgid "Displaying current parition configuration" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):255 +#, no-wrap +msgid "" +"\n" +"Command (m for help): p\n" +"\n" +"Disk /dev/hda: 240 heads, 63 sectors, 2184 cylinders\n" +"Units = cylinders of 15120 * 512 bytes\n" +"\n" +" Device Boot Start End Blocks Id System\n" +"/dev/hda1 1 14 105808+ 83 Linux\n" +"/dev/hda2 15 49 264600 82 Linux swap\n" +"/dev/hda3 50 70 158760 83 Linux\n" +"/dev/hda4 71 2184 15981840 5 Extended\n" +"/dev/hda5 71 209 1050808+ 83 Linux\n" +"/dev/hda6 210 348 1050808+ 83 Linux\n" +"/dev/hda7 349 626 2101648+ 83 Linux\n" +"/dev/hda8 627 904 2101648+ 83 Linux\n" +"/dev/hda9 905 2184 9676768+ 83 Linux\n" +"\n" +"Command (m for help):\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):275 +msgid "" +"This particular disk is configured to house seven Linux filesystems (each " +"with a corresponding partition listed as \"Linux\") as well as a swap " +"partition (listed as \"Linux swap\")." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):284 +msgid "Block device and partitioning overview" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):287 +msgid "" +"Notice the name of the corresponding partition block devices on the left " +"side, starting with <path>/dev/hda1</path> and going up to <path>/dev/hda9</" +"path>. In the early days of the PC, partitioning software only allowed a " +"maximum of four partitions (called primary partitions). This was too " +"limiting, so a workaround called extended partitioning was created. An " +"extended partition is very similar to a primary partition, and counts " +"towards the primary partition limit of four. However, extended partitions " +"can hold any number of so-called logical partitions inside them, providing " +"an effective means of working around the four partition limit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):302 +msgid "Partitioning overview, continued" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):305 +msgid "" +"All partitions hda5 and higher are logical partitions. The numbers 1 through " +"4 are reserved for primary or extended partitions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):310 +msgid "" +"In our example, hda1 through hda3 are primary partitions. hda4 is an " +"extended partition that contains logical partitions hda5 through hda9. You " +"would never actually use <path>/dev/hda4</path> for storing any filesystems " +"directly -- it simply acts as a container for partitions hda5 through hda9." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):320 +msgid "Partition types" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):323 +msgid "" +"Also, notice that each partition has an \"Id,\" also called a partition " +"type. Whenever you create a new partition, you should ensure that the " +"partition type is set correctly. 83 is the correct partition type for " +"partitions that will be housing Linux filesystems, and 82 is the correct " +"partition type for Linux swap partitions. You set the partition type using " +"the t option in <c>fdisk</c>. The Linux kernel uses the partition type " +"setting to auto-detect fileystems and swap devices on the disk at boot-time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):336 +msgid "Using fdisk to set up partitions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):339 +msgid "" +"Now that you've had your introduction to the way disk partitioning is done " +"under Linux, it's time to walk through the process of setting up disk " +"partitions and filesystems for a new Linux installation. In this process, we " +"will configure a disk with new partitions and then create filesystems on " +"them. These steps will provide us with a completely clean disk with no data " +"on it that can then be used as a basis for a new Linux installation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(impo):348 +msgid "" +"To follow these steps, you need to have a hard drive that does not contain " +"any important data, since these steps will <e>erase</e> the data on your " +"disk. If this is all new to you, you may want to consider just reading the " +"steps, or using a Linux boot disk on a test system so that no data will be " +"at risk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):358 +msgid "What the partitioned disk will look like" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):361 +msgid "" +"After we walk through the process of creating partitions on your disk, your " +"partition configuration will look like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):366 +msgid "Look of our disk after creating partitions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):366 +#, no-wrap +msgid "" +"\n" +"Disk /dev/hda: 30.0 GB, 30005821440 bytes\n" +"240 heads, 63 sectors/track, 3876 cylinders\n" +"Units = cylinders of 15120 * 512 = 7741440 bytes\n" +"\n" +" Device Boot Start End Blocks Id System\n" +"/dev/hda1 * 1 14 105808+ 83 Linux\n" +"/dev/hda2 15 81 506520 82 Linux swap\n" +"/dev/hda3 82 3876 28690200 83 Linux\n" +"\n" +"Command (m for help):\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):382 +msgid "Sample partition commentary" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):385 +msgid "" +"In our suggested \"newbie\" partition configuration, we have three " +"partitions. The first one (<path>/dev/hda1</path>) at the beginning of the " +"disk is a small partition called a boot partition. The boot partition's " +"purpose is to hold all the critical data related to booting -- GRUB boot " +"loader information (if you will be using GRUB) as well as your Linux kernel" +"(s). The boot partition gives us a safe place to store everything related to " +"booting Linux. During normal day-to-day Linux use, your boot partition " +"should remain unmounted for safety. If you are setting up a SCSI system, " +"your boot partition will likely end up being <path>/dev/sda1</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):397 +msgid "" +"It's recommended to have boot partitions (containing everything necessary " +"for the boot loader to work) at the beginning of the disk. While not " +"necessarily required anymore, it is a useful tradition from the days when " +"the LILO boot loader wasn't able to load kernels from filesystems that " +"extended beyond disk cylinder 1024." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):405 +msgid "" +"The second partition (<path>/dev/hda2</path>) s used for swap space. The " +"kernel uses swap space as virtual memory when RAM becomes low. This " +"partition, relatively speaking, isn't very big either, typically somewhere " +"around 512 MB. If you're setting up a SCSI system, this partition will " +"likely end up being called <path>/dev/hda2</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):413 +msgid "" +"The third partition (<path>/dev/hda3</path>) is quite large and takes up the " +"rest of the disk. This partition is called our root partition and will be " +"used to store your main filesystem that houses the main Linux filesystem. On " +"a SCSI system, this partition would likely end up being <path>/dev/hda3</" +"path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):423 +msgid "Getting started" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):426 +msgid "" +"Okay, now to create the partitions as in the example and table above. First, " +"enter fdisk by typing <c>fdisk /dev/hda</c> or <c>fdisk /dev/sda</c>, " +"depending on whether you're using IDE or SCSI. Then, type <c>p</c> to view " +"your current partition configuration. Is there anything on the disk that you " +"need to keep? If so, stop now. If you continue with these directions, all " +"existing data on your disk will be erased." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(impo):435 +msgid "" +"Following the instructions below will cause all prior data on your disk to " +"be erased! If there is anything on your drive, please be sure that it is non-" +"critical information that you don't mind losing. Also make sure that you " +"have selected the correct drive so that you don't mistakenly wipe data from " +"the wrong drive." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):446 +msgid "Zapping existing partitions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):449 +msgid "" +"Now, it's time to delete any existing partitions. To do this, type d and hit " +"enter. You will then be prompted for the partition number you would like to " +"delete. To delete a pre-existing <path>/dev/hda1</path>, you would type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):455 +msgid "Deleting pre-existing partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):455 +#, no-wrap +msgid "" +"\n" +"Command (m for help): <i>d</i>\n" +"Partition number (1-4): <i>1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):460 +msgid "" +"The partition has been scheduled for deletion. It will no longer show up if " +"you type <c>p</c>, but it will not be erased until your changes have been " +"saved. If you made a mistake and want to abort without saving your changes, " +"type <c>q</c> immediately and hit enter and your partition will not be " +"deleted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):467 +msgid "" +"Now, assuming that you do indeed want to wipe out all the partitions on your " +"system, repeatedly type <c>p</c> to print out a partition listing and then " +"type <c>d</c> and the number of the partition to delete it. Eventually, " +"you'll end up with a partition table with nothing in it:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):474 +msgid "Drives look after cleaning it" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):474 +#, no-wrap +msgid "" +"\n" +"\n" +"Disk /dev/hda: 30.0 GB, 30005821440 bytes\n" +"240 heads, 63 sectors/track, 3876 cylinders\n" +"Units = cylinders of 15120 * 512 = 7741440 bytes\n" +"\n" +"Device Boot Start End Blocks Id System\n" +"\n" +"Command (m for help):\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):488 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):500 +msgid "Creating a boot partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):491 +msgid "" +"Now that the in-memory partition table is empty, we're ready to create a " +"boot partition. To do this, type <c>n</c> to create a new partition, then " +"<c>p</c> to tell fdisk you want a primary partition. Then type <c>1</c> to " +"create the first primary partition. When prompted for the first cylinder, " +"hit enter. When prompted for the last cylinder, type <c>+100M</c> to create " +"a partition 100MB in size. Here's the output from these steps:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):500 +#, no-wrap +msgid "" +"\n" +"Command (m for help): <i>n</i>\n" +"Command action\n" +"e extended\n" +"p primary partition (1-4)\n" +"<i>p</i>\n" +"Partition number (1-4): <i>1</i>\n" +"First cylinder (1-3876, default 1):\n" +"Using default value 1\n" +"Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): <i>+100M</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):512 +msgid "" +"Now, when you type <c>p</c>, you should see the following partition printout:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):516 +msgid "Partition printout" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):516 +#, no-wrap +msgid "" +"\n" +"Command (m for help): <i>p</i>\n" +"\n" +"Disk /dev/hda: 30.0 GB, 30005821440 bytes\n" +"240 heads, 63 sectors/track, 3876 cylinders\n" +"Units = cylinders of 15120 * 512 = 7741440 bytes\n" +"\n" +" Device Boot Start End Blocks Id System\n" +"/dev/hda1 1 14 105808+ 83 Linux\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):530 +msgid "Creating the swap partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):533 +msgid "" +"Next, let's create the swap partition. To do this, type <c>n</c> to create a " +"new partition, then <c>p</c> to tell fdisk that you want a primary " +"partition. Then type <c>2</c> to create the second primary partition, <path>/" +"dev/hda2</path> in our case. When prompted for the first cylinder, hit " +"enter. When prompted for the last cylinder, type <c>+512M</c> to create a " +"partition 512MB in size. After you've done this, type <c>t</c> to set the " +"partition type, and then type <c>82</c> to set the partition type to \"Linux " +"Swap.\" After completing these steps, typing <c>p</c> should display a " +"partition table that looks similar to this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):545 +msgid "Partition table" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):545 +#, no-wrap +msgid "" +"\n" +"Command (m for help): <i>p</i>\n" +"\n" +"Disk /dev/hda: 30.0 GB, 30005821440 bytes\n" +"240 heads, 63 sectors/track, 3876 cylinders\n" +"Units = cylinders of 15120 * 512 = 7741440 bytes\n" +"\n" +" Device Boot Start End Blocks Id System\n" +"/dev/hda1 1 14 105808+ 83 Linux\n" +"/dev/hda2 15 81 506520 82 Linux swap\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):560 +msgid "Making it bootable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):563 +msgid "" +"Finally, we need to set the \"bootable\" flag on our boot partition and then " +"write our changes to disk. To tag <path>/dev/hda1</path> as a \"bootable\" " +"partition, type <c>a</c> at the menu and then type 1 for the partition " +"number. If you type <c>p</c> now, you'll now see that <path>/dev/hda1</path> " +"has an \"*\" in the \"Boot\" column. Now, let's write our changes to disk. " +"To do this, type <c>w</c> and hit enter. Your disk partitions are now " +"properly configured for the installation of Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(note):573 +msgid "" +"If fdisk instructs you to do so, please reboot to allow your system to " +"detect the new partition configuration." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):581 +msgid "Extended and logical partitioning" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):584 +msgid "" +"In the above example, we created a single primary partition that will " +"contain a filesystem used to store all our data. This means that after " +"installing Linux, this main filesystem will get mounted at \"<path>/</path>" +"\" and will contain a tree of directories that contain all our files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):591 +msgid "" +"While this is a common way to set up a Linux system, there is another " +"approach that you should be familiar with. This approach uses multiple " +"partitions that house multiple filesystems and are then \"linked\" together " +"to form a cohesive filesystem tree. For example, it is common to put <path>/" +"home</path> and <path>/var</path> on their own filesystems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):599 +msgid "" +"We could have made hda2 into an extended rather than a primary partition. " +"Then, we could have created the hda5, hda6, and hda7 logical partitions " +"(which would technically be contained \"inside\" hda2), which would house " +"the <path>/</path>, <path>/home</path>, and <path>/var</path> filesystems " +"respectively." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):606 +msgid "" +"You can learn more about these types of multi-filesystem configurations by " +"studying the resources listed on the next page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):614 +msgid "Partitioning resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):617 +msgid "" +"For more information on partitioning, take a look at the following " +"partitioning tips:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):624 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2793 +msgid "/doc/en/articles/partition-planning-tips.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):624 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2793 +msgid "Partition planning tips" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):628 +msgid "/doc/en/articles/partitioning-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):628 +msgid "Partitioning in action: consolidating data" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):631 +msgid "" +"<uri link=\"/doc/en/articles/partitioning-p1.xml\">Partitioning in action: " +"moving /home</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):640 +msgid "Creating filesystems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):643 +msgid "" +"Now that the partitions have been created, it's time to set up filesystems " +"on the boot and root partitions so that they can be mounted and used to " +"store data. We will also configure the swap partition to serve as swap " +"storage." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):649 +msgid "" +"Linux supports a variety of different types of filesystems; each type has " +"its strengths and weaknesses and its own set of performance characteristics. " +"We will cover the creation of ext2, ext3, XFS, JFS, and ReiserFS filesystems " +"in this tutorial. Before we create filesystems on our example system, let's " +"briefly review the various filesystems available under Linux. We'll go into " +"more detail on the filesystems later in the tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):661 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1250 +msgid "The ext2 filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):664 +msgid "" +"ext2 is the tried-and-true Linux filesystem, but it doesn't have metadata " +"journaling, which means that routine ext2 filesystem checks at startup time " +"can be quite time-consuming. There is now quite a selection of newer-" +"generation journaled filesystems that can be checked for consistency very " +"quickly and are thus generally preferred over their non-journaled " +"counterparts. Journaled filesystems prevent long delays when you boot your " +"system and your filesystem happens to be in an inconsistent state." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):677 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1275 +msgid "The ext3 filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):680 +msgid "" +"ext3 is the journaled version of the ext2 filesystem, providing metadata " +"journaling for fast recovery in addition to other enhanced journaling modes, " +"such as full data and ordered data journaling. ext3 is a very good and " +"reliable filesystem. It offers generally decent performance under most " +"conditions. Because it does not extensively employ the use of \"trees\" in " +"its internal design, it doesn't scale very well, meaning that it is not an " +"ideal choice for very large filesystems or situations where you will be " +"handling very large files or large quantities of files in a single " +"directory. But when used within its design parameters, ext3 is an excellent " +"filesystem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):692 +msgid "" +"One of the nice things about ext3 is that an existing ext2 filesystem can be " +"upgraded \"in-place\" to ext3 quite easily. This allows for a seamless " +"upgrade path for existing Linux systems that are already using ext2." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):701 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1344 +msgid "The ReiserFS filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):704 +msgid "" +"ReiserFS is a B-tree-based filesystem that has very good overall performance " +"and greatly outperforms both ext2 and ext3 when dealing with small files " +"(files less than 4k), often by a factor of 10x-15x. ReiserFS also scales " +"extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS " +"is now rock-solid and highly recommended for use both as a general-purpose " +"filesystem and for extreme cases such as the creation of large filesystems, " +"the use of many small files, very large files, and directories containing " +"tens of thousands of files. ReiserFS is the filesystem we recommend by " +"default for all non-boot partitions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):719 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1382 +msgid "The XFS filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):722 +msgid "" +"XFS is a filesystem with metadata journaling. It comes with a robust feature-" +"set and is optimized for scalability. We only recommend using this " +"filesystem on Linux systems with high-end SCSI and/or fibre channel storage " +"and a uninterruptible power supply. Because XFS aggressively caches in-" +"transit data in RAM, improperly designed programs (those that don't take " +"proper precautions when writing files to disk (and there are quite a few of " +"them) can lose a good deal of data if the system goes down unexpectedly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):735 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1422 +msgid "The JFS filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):738 +msgid "" +"JFS is IBM's own high performance journaling filesystem. It has recently " +"become production-ready, and we would like to see a longer track record " +"before commenting either positively nor negatively on its general stability " +"at this point." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):748 +msgid "Filesystem recommendations" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):751 +msgid "" +"If you're looking for the most rugged journaling filesystem, use ext3. If " +"you're looking for a good general-purpose high-performance filesystem with " +"journaling support, use ReiserFS; both ext3 and ReiserFS are mature, refined " +"and recommended for general use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):758 +msgid "" +"Based on our example above, we will use the following commands to initialize " +"all our partitions for use:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):763 +msgid "Initlizing partitions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):763 +#, no-wrap +msgid "" +"\n" +"# <i>mke2fs -j /dev/hda1</i>\n" +"# <i>mkswap /dev/hda2</i>\n" +"# <i>mkreiserfs /dev/hda3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):769 +msgid "" +"We choose ext3 for our <path>/dev/hda1</path> boot partition because it is a " +"robust journaling filesystem supported by all major boot loaders. We used " +"<c>mkswap</c> for our <path>/dev/hda2</path> swap partition -- the choice is " +"obvious here. And for our main root filesystem on <path>/dev/hda3</path> we " +"choose ReiserFS, since it is a solid journaling filesystem offering " +"excellent performance. Now, go ahead and initialize your partitions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):781 +msgid "Making swap" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):784 +msgid "<c>mkswap</c> is the command that used to initialize swap partitions:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):788 +msgid "Initalizing swap partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):788 +#, no-wrap +msgid "" +"\n" +"# <i>mkswap /dev/hda2</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):792 +msgid "" +"Unlike regular filesystems, swap partitions aren't mounted. Instead, they " +"are enabled using the <c>swapon</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):797 +msgid "Enabling swap partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):797 +#, no-wrap +msgid "" +"\n" +"# <i>swapon /dev/hdc6</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):801 +msgid "" +"Your Linux system's startup scripts will take care of automatically enabling " +"your swap partitions. Therefore, the <c>swapon</c> command is generally only " +"needed when you need to immediately add some swap that you just created. To " +"view the swap devices currently enabled, type <c>cat /proc/swaps</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):811 +msgid "Creating ext2, ext3, and ReiserFS filesystems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):814 +msgid "You can use the <c>mke2fs</c> command to create ext2 filesystems:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):818 +msgid "Creating ext2 filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):818 +#, no-wrap +msgid "" +"\n" +"# <i>mke2fs /dev/hda1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):822 +msgid "" +"If you would like to use ext3, you can create ext3 filesystems using " +"<c>mke2fs -j</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):827 +msgid "Creating ext3 filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):827 +#, no-wrap +msgid "" +"\n" +"# <i>mke2fs /dev/hda3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(note):831 +msgid "" +"You can find out more about using ext3 under Linux 2.4 on <uri link=\"http://" +"www.zip.com.au/~akpm/linux/ext3/ext3-usage.html\">this site</uri> maintained " +"by Andrew Morton." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):837 +msgid "To create ReiserFS filesystems, use the <c>mkreiserfs</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):841 +msgid "Creating ReiserFS filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):841 +#, no-wrap +msgid "" +"\n" +"# <i>mkreiserfs /dev/hda3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):848 +msgid "Creating XFS and JFS filesystems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):851 +msgid "To create an XFS filesystem, use the <c>mkfs.xfs</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):855 +msgid "Creating XFS filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):855 +#, no-wrap +msgid "" +"\n" +"# <i>mkfs.xfs /dev/hda3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(note):859 +msgid "" +"You may want to add a couple of additional flags to the mkfs.xfs command: " +"<c>-d agcount=3 -l size=32m</c>. The <c>-d agcount=3</c> command will lower " +"the number of allocation groups. XFS will insist on using at least one " +"allocation group per 4GB of your partition, so, for example, if you have a " +"20GB partition you will need a minimum agcount of 5. The <c>l size=32m</c> " +"command increases the journal size to 32MB, increasing performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):868 +msgid "To create JFS filesystems, use the <c>mkfs.jfs</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):872 +msgid "Creating JFS filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):872 +#, no-wrap +msgid "" +"\n" +"# <i>mkfs.jfs /dev/hda3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):879 +msgid "Mounting filesystems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):882 +msgid "" +"Once the filesystem is created, we can mount it using the <c>mount</c> " +"command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):886 +msgid "Mounting filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):886 +#, no-wrap +msgid "" +"\n" +"# <i>mount /dev/hda3 /mnt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):890 +msgid "" +"To mount a filesystem, specify the partition block device as a first " +"argument and a \"mountpoint\" as a second argument. The new filesystem will " +"be \"grafted in\" at the mountpoint. This also has the effect of \"hiding\" " +"any files that were in the <path>/mnt</path> directory on the parent " +"filesystem. Later, when the filesystem is unmounted, these files will " +"reappear. After executing the mount command, any files created or copied " +"inside <path>/mnt</path> will be stored on the new ReiserFS filesystem you " +"mounted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):900 +msgid "" +"Let's say we wanted to mount our boot partition inside <path>/mnt</path>. We " +"could do this by performing the following steps:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):905 +msgid "Mounting boot partition in /mnt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):905 +#, no-wrap +msgid "" +"\n" +"# <i>mkdir /mnt/boot</i>\n" +"# <i>mount /dev/hda1 /mnt/boot</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):910 +msgid "" +"Now, our boot filesystem is available inside /mnt/boot. If we create files " +"inside <path>/mnt/boot</path>, they will be stored on our ext3 filesystem " +"that physically resides on <path>/dev/hda1</path>. If we create file inside " +"<path>/mnt</path> but not <path>/mnt/boot</path>, then they will be stored " +"on our ReiserFS filesystem that resides on <path>/dev/hda3</path>. And if we " +"create files outside of <path>/mnt</path>, they will not be stored on either " +"filesystem but on the filesystem of our current Linux system or boot disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):920 +msgid "" +"To see what filesystems are mounted, type <c>mount</c> by itself. Here is " +"the output of <c>mount</c> on one of our currently-running Linux system, " +"which has partitions configured identically to those in the example above:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):926 +msgid "Output of mount command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):926 +#, no-wrap +msgid "" +"\n" +"/dev/root on / type reiserfs (rw,noatime)\n" +"none on /dev type devfs (rw)\n" +"proc on /proc type proc (rw)\n" +"tmpfs on /dev/shm type tmpfs (rw)\n" +"usbdevfs on /proc/bus/usb type usbdevfs (rw)\n" +"/dev/hde1 on /boot type ext3 (rw,noatime)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):935 +msgid "" +"You can also view similar information by typing cat <path>/proc/mounts</" +"path>. The \"root\" filesystem, <path>/dev/hda3</path> gets mounted " +"automatically by the kernel at boot-time, and gets the symbolic name <path>/" +"dev/hda3</path>. On our system, both <path>/dev/hda3</path> and <path>/dev/" +"root</path> point to the same underlying block device using a symbolic link:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):943 +msgid "Symbolic links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):943 +#, no-wrap +msgid "" +"\n" +"# <i>ls -l /dev/root</i>\n" +"lr-xr-xr-x 1 root root 33 Mar 26 20:39 /dev/root -> ide/host0/bus0/target0/lun0/part3\n" +"\n" +"# <i>ls -l /dev/hda3</i>\n" +"lr-xr-xr-x 1 root root 33 Mar 26 20:39 /dev/hde3 -> ide/host0/bus0/target0/lun0/part3\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):954 +msgid "Even more mounting stuff" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):957 +msgid "" +"So, what is this \"<path>/dev/ide/host0</path>....\" file? Systems like mine " +"that use the devfs device-management filesystem for <path>/dev</path> have " +"longer official names for the partition and disk block devices than Linux " +"used to have in the past. For example, <path>/dev/ide/host0/bus1/target0/" +"lun0/part7</path> is the official name for <path>/dev/hdc7</path>, and " +"<path>/dev/hdc7</path> itself is just a symlink pointing to the official " +"block device. You can determine if your system is using devfs by checking to " +"see if the <path>/dev/.devfsd</path> file exists; if so, then devfs is " +"active." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):968 +msgid "" +"When using the mount command to mount filesystems, it attempts to auto-" +"detect the filesystem type. Sometimes, this may not work and you will need " +"to specify the to-be-mounted filesystem type manually using the -t option, " +"as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):974 +msgid "Mounting ext3 filesystem manually with -t option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):974 +#, no-wrap +msgid "" +"\n" +"# <i>mount /dev/hda1 /mnt/boot -t ext3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):978 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1165 +msgid "or" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):980 +msgid "Mouting reiserfs filesystem manually with -t option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):980 +#, no-wrap +msgid "" +"\n" +"# <i>mount /dev/hda3 /mnt -t reiserfs</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):987 +msgid "Mount options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):990 +msgid "" +"It's also possible to customize various attributes of the to-be-mounted " +"filesystem by specifying mount options. For example, you can mount a " +"filesystem as \"read-only\" by using the \"ro\" option:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):996 +msgid "Mouting filesystem as read-only" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):996 +#, no-wrap +msgid "" +"\n" +"# <i>mount /dev/hdc6 /mnt -o ro</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1000 +msgid "" +"With <path>/dev/hdc6</path> mounted read-only, no files can be modified in " +"<path>/mnt</path> -- only read. If your filesystem is already mounted \"read/" +"write\" and you want to switch it to read-only mode, you can use the " +"\"remount\" option to avoid having to unmount and remount the filesystem " +"again:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1007 +msgid "Using remount option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1007 +#, no-wrap +msgid "" +"\n" +"# <i>mount /mnt -o remount,ro</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1011 +msgid "" +"Notice that we didn't need to specify the partition block device because the " +"filesystem is already mounted and <c>mount</c> knows that <path>/mnt</path> " +"is associated with <path>/dev/hdc6</path>. To make the filesystem writeable " +"again, we can remount it as read-write:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1018 +msgid "Remounting filesystem as read-write" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1018 +#, no-wrap +msgid "" +"\n" +"# <i>mount /mnt -o remount,rw</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1022 +msgid "" +"Note that these remount commands will not complete successfully if any " +"process has opened any files or directories in <path>/mnt</path>. To " +"familiarize yourself with all the mount options available under Linux, type " +"<c>man mount</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1032 +msgid "Introducing fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1035 +msgid "" +"So far, we've seen how partition an example disk and mount filesystems " +"manually from a boot disk. But once we get a Linux system installed, how do " +"we configure that Linux system to mount the right filesystems at the right " +"time? For example, Let's say that we installed Gentoo Linux on our current " +"example filesystem configuration. How would our system know how to to find " +"the root filesystem on <path>/dev/hda3</path>? And if any other filesystems " +"-- like swap -- needed to be mounted at boot time, how would it know which " +"ones?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1045 +msgid "" +"Well, the Linux kernel is told what root filesystem to use by the boot " +"loader, and we'll take a look at the linux boot loaders later in this " +"tutorial. But for everything else, your Linux system has a file called " +"<path>/etc/fstab</path> that tells it about what filesystems are available " +"for mounting. Let's take a look at it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1056 +msgid "A sample fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1059 +msgid "Let's take a look at a sample <path>/etc/fstab</path> file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1063 +msgid "Sample /etc/fstab file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1063 +#, no-wrap +msgid "" +"\n" +" <fs> <mountpoint> <type> <opts> <dump/pass>\n" +"\n" +"/dev/hda1 /boot ext3 noauto,noatime 1 1\n" +"/dev/hda3 / reiserfs noatime 0 0\n" +"/dev/hda2 none swap sw 0 0\n" +"/dev/cdrom /mnt/cdrom iso9660 noauto,ro,user 0 0\n" +"# /proc should always be enabled\n" +"proc /proc proc defaults 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1074 +msgid "" +"Above, each non-commented line in <path>/etc/fstab</path> specifies a " +"partition block device, a mountpoint, a filesystem type, the filesystem " +"options to use when mounting the filesystem, and two numeric fields. The " +"first numeric field is used to tell the <c>dump</c> backup command the " +"filesystems that should be backed up. Of course, if you are not planning to " +"use <c>dump</c> on your system, then you can safely ignore this field. The " +"last field is used by the <c>fsck</c> filesystem integrity checking program, " +"and tells it the order in which your filesystems should be checked at boot. " +"We'll touch on <c>fsck</c> again in a few panels." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1086 +msgid "" +"Look at the <path>/dev/hda1</path> line; you'll see that <path>/dev/hda1</" +"path> is an ext3 filesystem that should be mounted at the <path>/boot</path> " +"mountpoint. Now, look at <path>/dev/hda1</path>'s mount options in the opts " +"column. The noauto option tells the system to not mount <path>/dev/hda1</" +"path> automatically at boot time; without this option, <path>/dev/hda1</" +"path> would be automatically mounted to <path>/boot</path> at system boot " +"time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1095 +msgid "" +"Also note the noatime option, which turns off the recording of atime (last " +"access time) information on the disk. This information is generally not " +"needed, and turning off atime updates has a positive effect on filesystem " +"performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1101 +msgid "" +"Now, take a look at the <path>/proc</path> line and notice the defaults " +"option. Use defaults whenever you want a filesystem to be mounted with just " +"the standard mount options. Since <path>/etc/fstab</path> has multiple " +"fields, we can't simply leave the option field blank." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1108 +msgid "" +"Also notice the <path>/etc/fstab</path> line for <path>/dev/hda2</path>. " +"This line defines <path>/dev/hda2</path> as a swap device. Since swap " +"devices aren't mounted like filesystems, none is specified in the mountpoint " +"field. Thanks to this <path>/etc/fstab</path> entry, our <path>/dev/hda2</" +"path> swap device will be enabled automatically when the system starts up." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1116 +msgid "" +"With an <path>/etc/fstab</path> entry for <path>/dev/cdrom</path> like the " +"one above, mounting the CD-ROM drive becomes easier. Instead of typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1121 +msgid "Mounting CD-ROM without entry in fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1121 +#, no-wrap +msgid "" +"\n" +"# <i>mount -t iso9660 /dev/cdrom /mnt/cdrom -o ro</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1125 +msgid "We can now type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1129 +msgid "Mounting CD-ROM with entry in fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1129 +#, no-wrap +msgid "" +"\n" +"# <i>mount /dev/cdrom</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1133 +msgid "" +"In fact, using <path>/etc/fstab</path> allows us to take advantage of the " +"user option. The user mount option tells the system to allow this particular " +"filesystem to be mounted by any user. This comes in handy for removable " +"media devices like CD-ROM drives. Without this fstab mount option, only the " +"root user would be able to use the CD-ROM drive." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1144 +msgid "Unmounting filesystems" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1147 +msgid "" +"Generally, all mounted filesystems are unmounted automatically by the system " +"when it is rebooted or shut down. When a filesystem is unmounted, any cached " +"filesystem data in memory is flushed to the disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1153 +msgid "" +"However, it's also possible to unmount filesystems manually. Before a " +"filesystem can be unmounted, you first need to ensure that there are no " +"processes running that have open files on the filesystem in question. Then, " +"use the <c>umount</c> command, specifying either the device name or mount " +"point as an argument:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1161 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1169 +msgid "Using umount command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1161 +#, no-wrap +msgid "" +"\n" +"# <i>umount /mnt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1169 +#, no-wrap +msgid "" +"\n" +"# <i>umount /dev/hda3</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1173 +msgid "" +"Once unmounted, any files in <path>/mnt</path> that were \"covered\" by the " +"previously-mounted filesystem will now reappear." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1181 +msgid "Introducing fsck" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1184 +msgid "" +"If your system crashes or locks up for some reason, the system won't have an " +"opportunity to cleanly unmount your filesystems. When this happens, the " +"filesystems are left in an inconsistent (unpredictable) state. When the " +"system reboots, the <c>fsck</c> program will detect that the filesystems " +"were not cleanly unmounted and will want to perform a consistency check of " +"filesystems listed in <path>/etc/fstab</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(impo):1193 +msgid "" +"For a filesystem to be checked by <c>fsck</c> it must have a non-zero number " +"in the \"pass\" field (the last field) in <path>/etc/fstab</path>. " +"Typically, the root filesystem is set to a passno of 1, specifying that it " +"should be checked first. All other filesystems that should be checked at " +"startup time should have a passno of 2 or higher. For some journaling " +"filesystems like ReiserFS, it is safe to have a passno of 0 since the " +"journaling code (and not an external <c>fsck</c>) takes care of making the " +"filesystem consistent again." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1203 +msgid "" +"Sometimes, you may find that after a reboot <c>fsck</c> is unable to fully " +"repair a partially damaged filesystem. In these instances, all you need to " +"do is to bring your system down to single-user mode and run <c>fsck</c> " +"manually, supplying the partition block device as an argument. As <c>fsck</" +"c> performs its filesystem repairs, it may ask you whether to fix particular " +"filesystem defects. In general, you should say <c>y</c> (yes) to all these " +"questions and allow <c>fsck</c> to do its thing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1216 +msgid "Problems with fsck" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1219 +msgid "" +"One of the problems with <c>fsck</c> scans is that they can take quite a " +"while to complete, since the entirety of a filesystem's metadata (internal " +"data structure) needs to be scanned in order to ensure that it's consistent. " +"With extremely large filesystems, it is not unusual for an exhaustive fsck " +"to take more than an hour." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1227 +msgid "" +"In order to solve this problem, a new type of filesystem was designed, " +"called a journaling filesystem. Journaling filesystems record an on-disk log " +"of recent changes to the filesystem metadata. In the event of a crash, the " +"filesystem driver inspects the log. Because the log contains an accurate " +"account of recent changes on disk, only these parts of the filesystem " +"metadata need to be checked for errors. Thanks to this important design " +"difference, checking a journalled filesystem for consistency typically takes " +"just a matter of seconds, regardless of filesystem size. For this reason, " +"journaling filesystems are gaining popularity in the Linux community. For " +"more information on journaling filesystems, see the <uri link=\"http://" +"www-106.ibm.com/developerworks/library/l-fs.html\">Advanced filesystem " +"implementor's guide, part 1: Journaling and ReiserFS</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1242 +msgid "" +"Let's cover the major filesystems available for Linux, along with their " +"associated commands and options." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1253 +msgid "" +"The ext2 filesystem has been the standard Linux filesystem for many years. " +"It has generally good performance for most applications, but it does not " +"offer any journaling capability. This makes it unsuitable for very large " +"filesystems, since <c>fsck</c> can take an extremely long time. In addition, " +"ext2 has some built-in limitations due to the fact that every ext2 " +"filesystem has a fixed number of inodes that it can hold. That being said, " +"ext2 is generally considered to be an extremely robust and efficient non-" +"journalled filesystem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1264 +msgid "In kernels: 2.0+" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1265 +msgid "journaling: no" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1266 +msgid "mkfs command: mke2fs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1267 +msgid "mkfs example: mke2fs /dev/hdc7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1268 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1298 +msgid "related commands: debugfs, tune2fs, chattr" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1269 +msgid "performance-related mount options: noatime." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1278 +msgid "" +"The ext3 filesystem uses the same on-disk format as ext2, but adds " +"journaling capabilities. In fact, of all the Linux filesystems, ext3 has the " +"most extensive journaling support, supporting not only metadata journaling " +"but also ordered journaling (the default) and full metadata+data journaling. " +"These \"special\" journaling modes help to ensure data integrity, not just " +"short fscks like other journaling implementations. For this reason, ext3 is " +"the best filesystem to use if data integrity is an absolute first priority. " +"However, these data integrity features do impact performance somewhat. In " +"addition, because ext3 uses the same on-disk format as ext2, it still " +"suffers from the same scalability limitations as its non-journalled cousin. " +"Ext3 is a good choice if you're looking for a good general-purpose " +"journalled filesystem that is also very robust." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1294 +msgid "In kernels: 2.4.16+" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1295 +msgid "journaling: metadata, ordered data writes, full metadata+data" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1296 +msgid "mkfs command: mke2fs -j" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1297 +msgid "mkfs example: mke2fs -j /dev/hdc7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1299 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1397 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1438 +msgid "performance-related mount options: noatime" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1303 +msgid "data=writeback (disable journaling)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1304 +msgid "" +"data=ordered (the default, metadata journaling and data is written out to " +"disk with metadata)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1308 +msgid "" +"data=journal (full data journaling for data and metadata integrity. Halves " +"write performance.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1300 +msgid "other mount options: <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1319 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2832 +msgid "http://www.zip.com.au/~akpm/linux/ext3/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1319 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2832 +msgid "Andrew Morton's ext3 page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1324 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2836 +msgid "http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1324 +msgid "Andrew Morton's excellent ext3 usage documentation (recommended)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1329 +msgid "http://www-106.ibm.com/developerworks/linux/library/l-fs7/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1329 +msgid "# Advanced filesystem implementor's guide, part 7: Introducing ext3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1334 +msgid "http://www.gentoo.org/doc/en/articles/l-afig-p8.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1334 +msgid "Advanced filesystem implementor's guide, part 8: Surprises in ext3." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1314 +msgid "ext3 resources: <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1347 +msgid "" +"ReiserFS is a relatively new filesystem that has been designed with the goal " +"of providing very good small file performance, very good general performance " +"and being very scalable. In general, ReiserFS offers very good performance " +"in most all situations. ReiserFS is preferred by many for its speed and " +"scalability." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1355 +msgid "In kernels: 2.4.0+ (2.4.18+ strongly recommended)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1356 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1394 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1435 +msgid "journaling: metadata" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1357 +msgid "mkfs command: mkreiserfs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1358 +msgid "mkfs example: mkreiserfs /dev/hdc7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1359 +msgid "performance-related mount options: noatime, notail" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1363 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2811 +msgid "http://www.namesys.com/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1363 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2811 +msgid "The home of ReiserFS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1366 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2744 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2814 +msgid "http://www-106.ibm.com/developerworks/library/l-fs.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1366 +msgid "" +"Advanced filesystem implementor's guide, part 1: Journaling and ReiserFS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1371 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2749 +msgid "http://www-106.ibm.com/developerworks/library/l-fs2.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1371 +msgid "" +"Advanced filesystem implementor's guide, part 2: Using ReiserFS and Linux " +"2.4." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1360 +msgid "ReiserFS Resources: <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1385 +msgid "" +"The XFS filesystem is an enterprise-class journaling filesystem being ported " +"to Linux by SGI. XFS is a full-featured, scalable, journaled file-system " +"that is a good match for high-end, reliable hardware (since it relies " +"heavily on caching data in RAM.) but not a good match for low-end hardware." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1393 +msgid "In kernels: 2.5.34+ only, requires patch for 2.4 series" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1395 +msgid "mkfs command: mkfs.xfs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1396 +msgid "mkfs example: mkfs.xfs /dev/hdc7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1403 +msgid "http://oss.sgi.com/projects/xfs/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1403 +msgid "The home of XFS (sgi.com)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1407 +msgid "http://www-106.ibm.com/developerworks/library/l-fs9.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1407 +msgid "Advanced filesystem implementor's guide, part 9: Introducing XFS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1412 +msgid "http://www-106.ibm.com/developerworks/library/l-fs10.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1412 +msgid "Advanced filesystem implementor's guide, part 10: Deploying XFS." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1398 +msgid "XFS Resources: <placeholder-1/>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1425 +msgid "" +"JFS is a high-performance journaling filesystem ported to Linux by IBM. JFS " +"is used by IBM enterprise servers and is designed for high-performance " +"applications. You can learn more about JFS at <uri link=\"http://www-124.ibm." +"com/developerworks/oss/jfs/index.html\">the JFS project Web site</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1434 +msgid "In kernels: 2.4.20+" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1436 +msgid "mkfs command: mkfs.jfs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1437 +msgid "mkfs example: mkfs.jfs /dev/hdc7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1439 +msgid "" +"JFS Resources: <uri link=\"http://www-124.ibm.com/developerworks/oss/jfs/" +"index.html\">the JFS project Web site (IBM).</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1449 +msgid "VFAT" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1452 +msgid "" +"The VFAT filesystem isn't really a filesystem that you would choose for " +"storing Linux files. Instead, it's a DOS-compatible filesystem driver that " +"allows you to mount and exchange data with DOS and Windows FAT-based " +"filesystems. The VFAT filesystem driver is present in the standard Linux " +"kernel." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1464 +msgid "Booting the system" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1466 +msgid "About this section" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1469 +msgid "" +"This section introduces the Linux boot procedure. We'll cover the concept of " +"a boot loader, how to set kernel options at boot, and how to examine the " +"boot log for errors." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1478 +msgid "The MBR" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1481 +msgid "" +"The boot process is similar for all machines, regardless of which " +"distribution is installed. Consider the following example hard disk:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1486 +msgid "Structure of a hard disk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1486 +#, no-wrap +msgid "" +"\n" +"+----------------+\n" +"| MBR |\n" +"+----------------+\n" +"| Partition 1: |\n" +"| Linux root (/) |\n" +"| containing |\n" +"| kernel and |\n" +"| system. |\n" +"+----------------+\n" +"| Partition 2: |\n" +"| Linux swap |\n" +"+----------------+\n" +"| Partition 3: |\n" +"| Windows 3.0 |\n" +"| (last booted |\n" +"| in 1992) |\n" +"+----------------+\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1506 +msgid "" +"First, the computer's BIOS reads the first few sectors of your hard disk. " +"These sectors contain a very small program, called the \"Master Boot Record," +"\" or \"MBR.\" The MBR has stored the location of the Linux kernel on the " +"hard disk (partition 1 in the example above), so it loads the kernel into " +"memory and starts it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1517 +msgid "The kernel boot process" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1520 +msgid "" +"The next thing you see (although it probably flashes by quickly) is a line " +"similar to the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1525 +msgid "Boot process line" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1525 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1707 +#, no-wrap +msgid "" +"\n" +"Linux version 2.4.16 (root@time.flatmonk.org) (gcc version 2.95.3 20010315 (release)) #1 Sat Jan 12 19:23:04 EST 2002\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1529 +msgid "" +"This is the first line printed by the kernel when it starts running. The " +"first part is the kernel version, followed by the identification of the user " +"that built the kernel (usually root), the compiler that built it, and the " +"timestamp when it was built." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1536 +msgid "" +"Following that line is a whole slew of output from the kernel regarding the " +"hardware in your system: the processor, PCI bus, disk controller, disks, " +"serial ports, floppy drive, USB devices, network adapters, sound cards, and " +"possibly others will each in turn report their status." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1546 +msgid "/sbin/init" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1549 +msgid "" +"When the kernel finishes loading, it starts a program called <c>init</c>. " +"This program remains running until the system is shut down. It is always " +"assigned process ID 1, as you can see:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1555 +msgid "init process ID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1555 +#, no-wrap +msgid "" +"\n" +"$ <i>ps --pid 1</i>\n" +"PID TTY TIME CMD\n" +" 1 ? 00:00:04 init.system\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1561 +msgid "" +"The <c>init</c> program boots the rest of your distribution by running a " +"series of scripts. These scripts typically live in <path>/etc/rc.d/init.d</" +"path> or <path>/etc/init.d</path>, and they perform services such as setting " +"the system's hostname, checking the filesystem for errors, mounting " +"additional filesystems, enabling networking, starting print services, etc. " +"When the scripts complete, <c>init</c> starts a program called <c>getty</c> " +"which displays the login prompt, and you're good to go!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1574 +msgid "Digging in: LILO" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1577 +msgid "" +"Now that we've taken a quick tour through the booting process, let's look " +"more closely at the first part: the MBR and loading the kernel. The " +"maintenance of the MBR is the responsibility of the \"boot loader.\" The two " +"most popular boot loaders for x86-based Linux are \"LILO\" (LInux LOader) " +"and \"GRUB\" (GRand Unified Bootloader)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1585 +msgid "" +"Of the two, LILO is the older and more common boot loader. LILO's presence " +"on your system is reported at boot, with the short \"LILO boot:\" prompt. " +"Note that you may need to hold down the shift key during boot to get the " +"prompt, since often a system is configured to whiz straight through without " +"stopping." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1592 +msgid "" +"There's not much fanfare at the LILO prompt, but if you press the <" +"tab> key, you'll be presented with a list of potential kernels (or other " +"operating systems) to boot. Often there's only one in the list. You can boot " +"one of them by typing it and pressing <enter>. Alternatively you can " +"simply press <enter> and the first item on the list will boot by " +"default." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1603 +msgid "Using LILO" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1606 +msgid "" +"Occasionally you may want to pass an option to the kernel at boot time. Some " +"of the more common options are <c>root=</c> to specify an alternative root " +"filesystem, <c>init=</c> to specify an alternative init program (such as " +"<c>init=/bin/sh</c> to rescue a misconfigured system), and <c>mem=</c> to " +"specify the amount of memory in the system (for example <c>mem=512M</c> in " +"the case that Linux only autodetects 128M). You could pass these to the " +"kernel at the LILO boot prompt:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1616 +msgid "LILO boot prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1616 +#, no-wrap +msgid "" +"\n" +"LILO boot: linux root=/dev/hdb2 init=/bin/sh mem=512M\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1620 +msgid "" +"If you need to regularly specify command-line options, you might consider " +"adding them to <path>/etc/lilo.conf</path>. The format of that file is " +"described in the <path>lilo.conf</path>(5) man-page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1629 +msgid "An important LILO gotcha" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1632 +msgid "" +"Before moving on to GRUB, there is an important gotcha to LILO. Whenever you " +"make changes to <path>/etc/lilo.conf</path>, or whenever you install a new " +"kernel, you must run <c>lilo</c>. The <c>lilo</c> program rewrites the MBR " +"to reflect the changes you made, including recording the absolute disk " +"location of the kernel. The example here makes use of the -v flag for " +"verboseness:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1640 +msgid "Using lilo command with -v flag" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1640 +#, no-wrap +msgid "" +"\n" +"# <i>lilo -v</i>\n" +"LILO version 21.4-4, Copyright (C) 1992-1998 Werner Almesberger\n" +"'lba32' extensions Copyright (C) 1999,2000 John Coffman\n" +"\n" +"Reading boot sector from /dev/hda\n" +"Merging with /boot/boot.b\n" +"Mapping message file /boot/message\n" +"Boot image: /boot/vmlinuz-2.2.16-22\n" +"Added linux *\n" +"/boot/boot.0300 exists - no backup copy made.\n" +"Writing boot sector.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1657 +msgid "Digging in: GRUB" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1660 +msgid "" +"The GRUB boot loader could be considered the next generation of boot loader, " +"following LILO. Most visibly to users, it provides a menu interface instead " +"of LILO's primitive prompt. For system administrators, the changes are more " +"significant. GRUB supports more operating systems than LILO, provides some " +"password-based security in the boot menu, and is easier to administer." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1668 +msgid "" +"GRUB is usually installed with the <c>grub-install</c> command. Once " +"installed, GRUB's menu is administrated by editing the file <path>/boot/grub/" +"grub.conf</path>. Both of these tasks are beyond the scope of this document; " +"you should read the GRUB info pages before attempting to install or " +"administrate GRUB." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1679 +msgid "Using GRUB" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1682 +msgid "" +"To give parameters to the kernel, you can press <c>e</c> at the boot menu. " +"This provides you with the opportunity to edit (by again pressing <c>e</c>) " +"either the name of the kernel to load or the parameters passed to it. When " +"you're finished editing, press <enter> then <c>b</c> to boot with your " +"changes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1692 +msgid "dmesg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1695 +msgid "" +"The boot messages from the kernel and init scripts typically scroll by " +"quickly. You might notice an error, but it's gone before you can properly " +"read it. In that case, there are two places you can look after the system " +"boots to see what went wrong (and hopefully get an idea how to fix it)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1702 +msgid "" +"If the error occurred while the kernel was loading or probing hardware " +"devices, you can retrieve a copy of the kernel's log using the <c>dmesg</c> " +"command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1707 +msgid "Retrieving kernel's log using dmesg command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1711 +msgid "" +"Hey, we recognize that line! It's the first line the kernel prints when it " +"loads. Indeed, if you pipe the output of <c>dmesg</c> into a pager, you can " +"view all of the messages the kernel printed on boot, plus any messages the " +"kernel has printed to the console in the meantime." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1721 +msgid "/var/log/messages" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1724 +msgid "" +"The second place to look for information is in the <path>/var/log/messages</" +"path> file. This file is recorded by the syslog daemon, which accepts input " +"from libraries, daemons, and the kernel. Each line in the messages file is " +"timestamped. This file is a good place to look for errors that occurred " +"during the init scripts stage of booting. For example, to see the last few " +"messages from the nameserver:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1733 +msgid "greping /var/log/messages file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1733 +#, no-wrap +msgid "" +"\n" +"# <i>grep named /var/log/messages | tail -3</i>\n" +"Jan 12 20:17:41 time /usr/sbin/named[350]: listening on IPv4 interface lo, 127.0.0.1#53\n" +"Jan 12 20:17:41 time /usr/sbin/named[350]: listening on IPv4 interface eth0, 10.0.0.1#53\n" +"Jan 12 20:17:41 time /usr/sbin/named[350]: running\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1743 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1935 +msgid "Additional information" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1746 +msgid "Additional information related to this section can be found here:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1751 +msgid "" +"Tutorial: <uri link=\"http://www-106.ibm.com/developerworks/edu/l-dw-" +"linuxgrub-i.html\">Getting to know GRUB</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1756 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2724 +msgid "http://en.tldp.org/HOWTO/LILO.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1756 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2724 +msgid "LILO Mini-HOWTO" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1757 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2725 +msgid "http://www.gnu.org/software/grub/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1757 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2725 +msgid "GRUB home" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1758 +msgid "" +"Kernel command-line options in <path>/usr/src/linux/Documentation/kernel-" +"parameters.txt</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1769 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1805 +msgid "Runlevels" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1771 +msgid "Single-user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1774 +msgid "" +"Recall from the section regarding boot loaders that it's possible to pass " +"parameters to the kernel when it boots. One of the most often used " +"parameters is <c>s</c>, which causes the system to start in \"single-user\" " +"mode. This mode usually mounts only the root filesystem, starts a minimal " +"subset of the init scripts, and starts a shell rather than providing a login " +"prompt. Additionally, networking is not configured, so there is no chance of " +"external factors affecting your work." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1787 +msgid "Understanding single-user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1790 +msgid "" +"So what \"work\" can be done with the system in such a state? To answer this " +"question, we have to realize a vast difference between Linux and Windows. " +"Windows is designed to normally be used by one person at a time, sitting at " +"the console. It is effectively always in \"single-user\" mode. Linux, on the " +"other hand, is used more often to serve network applications, or provide " +"shell or X sessions to remote users on the network. These additional " +"variables are not desirable when you want to perform maintenance operations " +"such as restoring from backup, creating or modifying filesystems, upgrading " +"the system from CD, etc. In these cases you should use single-user mode." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1808 +msgid "" +"In fact, it's not actually necessary to reboot in order to reach single-user " +"mode. The <c>init</c> program manages the current mode, or \"runlevel,\" for " +"the system. The standard runlevels for a Linux system are defined as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1815 +msgid "0: Halt the computer" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1816 +msgid "1 or s: Single-user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1817 +msgid "2: Multi-user, no network" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1818 +msgid "3: Multi-user, text console" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1819 +msgid "4: Multi-user, graphical console" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1820 +msgid "5: same as 4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1821 +msgid "6: Reboot the computer." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1824 +msgid "" +"These runlevels vary between distributions, so be sure to consult your " +"distro's documentation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1832 +msgid "telinit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1835 +msgid "" +"To change to single-user mode, use the <c>telinit</c> command, which " +"instructs <c>init</c> to change runlevels:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1840 +msgid "Using telinit command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1840 +#, no-wrap +msgid "" +"\n" +"# <i>telinit 1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1844 +msgid "" +"You can see from the table above that you can also shutdown or reboot the " +"system in this manner. <c>telinit 0</c> will halt the computer; <c>telinit " +"6</c> will reboot the computer. When you issue the <c>telinit</c> command to " +"change runlevels, a subset of the <c>init</c> scripts will run to either " +"shut down or start up system services." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1855 +msgid "Runlevel etiquette" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1858 +msgid "" +"However, note that this is rather rude if there are users on the system at " +"the time (who may be quite angry with you). The <c>shutdown</c> command " +"provides a method for changing runlevels in a way that treats users " +"reasonably. Similarly to the <c>kill</c> command's ability to send a variety " +"of signals to a process, <c>shutdown</c> can be used to halt, reboot, or " +"change to single-user mode. For example, to change to single-user mode in 5 " +"minutes:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1867 +msgid "Changing to single-user mode with 5 minutes delay" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1867 +#, no-wrap +msgid "" +"\n" +"# <i>shutdown 5</i>\n" +"Broadcast message from root (pts/2) (Tue Jan 15 19:40:02 2002):\n" +"The system is going DOWN to maintenance mode in 5 minutes!\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1873 +msgid "" +"If you press <control-c> at this point, you can cancel the pending " +"switch to single-user mode. The message above would appear on all terminals " +"on the system, so users have a reasonable amount of time to save their work " +"and log off. (Some might argue whether or not 5 minutes is \"reasonable\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1883 +msgid "\"Now\" and halt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1886 +msgid "" +"If you're the only person on the system, you can use \"now\" instead of an " +"argument in minutes. For example, to reboot the system right now:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1891 +msgid "Using shutdown command with now option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1891 +#, no-wrap +msgid "" +"\n" +"# <i>shutdown -r now</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1895 +msgid "" +"No chance to hit <control-c> in this case; the system is already on " +"its way down. Finally, the -h option halts the system:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1900 +msgid "Halting the system" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1900 +#, no-wrap +msgid "" +"\n" +"# <i>shutdown -h 1</i>\n" +"Broadcast message from root (pts/2) (Tue Jan 15 19:50:58 2002):\n" +"The system is going DOWN for system halt in 1 minute!\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1909 +msgid "The default runlevel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1912 +msgid "" +"You've probably gathered at this point that the <c>init</c> program is quite " +"important on a Linux system. You can configure <c>init</c> by editing the " +"file <path>/etc/initttab</path>, which is described in the inittab(5) man-" +"page. We'll just touch on one key line in this file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1919 +msgid "Editing init configuration file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1919 +#, no-wrap +msgid "" +"\n" +"# <i>grep ^id: /etc/inittab</i>\n" +"id:3:initdefault:\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1924 +msgid "" +"On my system, runlevel 3 is the default runlevel. It can be useful to change " +"this value if you prefer your system to boot immediately into a graphical " +"login (usually runlevel 4 or 5). To do so, simply edit the file and change " +"the value on that line. But be careful! If you change it to something " +"invalid, you'll probably have to employ the <c>init=/bin/sh</c> trick we " +"mentioned earlier." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1938 +msgid "Additional information related to this section can be found at:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):1945 +msgid "" +"http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/ref-guide/s1-init-" +"boot-shutdown-init.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):1945 +msgid "Sysvinit docs at Red Hat" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):1948 +msgid "" +"<uri link=\"http://www.linuxdoc.org/LDP/sag/init.html\">Linux System " +"Administrator's Guide section on init</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1959 +msgid "Filesystem quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1961 +msgid "Introducing quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1964 +msgid "" +"Quotas are a feature of Linux that let you track disk usage by user or by " +"group. They're useful for preventing any single user or group from using an " +"unfair portion of a filesystem, or from filling it up altogether. Quotas can " +"only be enabled and managed by the root user. In this section, I'll describe " +"how to set up quotas on your Linux system and manage them effectively." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):1975 +msgid "Kernel support" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1978 +msgid "" +"Quotas are a feature of the filesystem; therefore, they require kernel " +"support. The first thing you'll need to do is verify that you have quota " +"support in your kernel. You can do this using grep:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):1984 +msgid "Checking kernel configuration for quota support" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):1984 +#, no-wrap +msgid "" +"\n" +"# <i>cd /usr/src/linux</i>\n" +"# <i>grep -i quota .config</i>\n" +"CONFIG_QUOTA=y\n" +"CONFIG_XFS_QUOTA=y\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):1991 +msgid "" +"If this command returns something less conclusive (such as CONFIG_QUOTA is " +"not set) then you should rebuild your kernel to include quota support. This " +"is not a difficult process, but is outside of the scope of this section of " +"the tutorial. If you're unfamiliar with the steps to build and install a new " +"kernel, you might consider referencing this <uri link=\"/doc/en/articles/" +"linux-kernel-compiling.xml\">tutorial</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2003 +msgid "Filesystem support" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2006 +msgid "" +"Before diving into the administration of quotas, please note that quota " +"support on Linux as of the 2.4.x kernel series is not complete. There are " +"currently problems with quotas in the ext2 and ext3 filesystems, and " +"ReiserFS does not appear to support quotas at all. This tutorial bases its " +"examples on XFS, which seems to properly <uri link=\"http://oss.sgi.com/" +"projects/xfs/faq.html#quotaswork\">support quotas</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2019 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2029 +msgid "Configuring quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2022 +msgid "" +"To begin configuring quotas on your system, you should edit <path>/etc/" +"fstab</path> to mount the affected filesystems with quotas enabled. For our " +"example, we use an XFS filesystem mounted with user and group quotas enabled:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2029 +#, no-wrap +msgid "" +"\n" +"# <i>grep quota /etc/fstab</i>\n" +"/usr/users /mnt/hdc1 xfs usrquota,grpquota,noauto 0 0\n" +"# <i>mount /usr/users</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2035 +msgid "" +"Note that the usrquota and grpquota options don't necessarily enable quotas " +"on a filesystem. You can make sure quotas are enabled using the <c>quotaon</" +"c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2041 +msgid "Enabling quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2041 +#, no-wrap +msgid "" +"\n" +"# <i>quotaon /usr/users</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2045 +msgid "" +"There is a corresponding <c>quotaoff</c> command should you desire to " +"disable quotas in the future:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2050 +msgid "Disabling quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2050 +#, no-wrap +msgid "" +"\n" +"# <i>quotaoff /usr/users</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2054 +msgid "" +"But for the moment, if you're trying some of the examples in this tutorial, " +"be sure to have quotas enabled." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2062 +msgid "The quota command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2065 +msgid "" +"The <c>quota</c> command displays a user's disk usage and limits for all of " +"the filesystems currently mounted. The -v option includes in the list " +"filesystems where quotas are enabled, but no storage is currently allocated " +"to the user." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2071 +msgid "Using quota command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2071 +#, no-wrap +msgid "" +"\n" +"# <i>quota -v</i>\n" +"\n" +"Disk quotas for user root (uid 0): \n" +"Filesystem blocks quota limit grace files quota limit grace\n" +" /dev/hdc1 0 0 0 3 0 0 \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2079 +msgid "" +"The first column, blocks, shows how much disk space the root user is " +"currently using on each filesystem listed. The following columns, quota and " +"limit, refer to the limits currently in place for disk space. We will " +"explain the difference between quota and limit, and the meaning of the grace " +"column later on. The files column shows how many files the root user owns on " +"the particular filesystem. The following quota and limit columns refer to " +"the limits for files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2092 +msgid "Viewing quota" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2095 +msgid "" +"Any user can use the <c>quota</c> command to view their own quota report as " +"shown in the previous example. However only the root user can look at the " +"quotas for other users and groups. For example, say we have a filesystem, " +"<path>/dev/hdc1</path> mounted on <path>/usr/users</path>, with two users: " +"jane and john. First, let's look at jane's disk usage and limits." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2103 +msgid "Viewing quota for user" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2103 +#, no-wrap +msgid "" +"\n" +"# <i>quota -v jane</i>\n" +"\n" +"Disk quotas for user jane (uid 1003): \n" +"Filesystem blocks quota limit grace files quota limit grace\n" +" /dev/hdc1 4100 0 0 6 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2111 +msgid "" +"In this example, we see that jane's quotas are set to zero, which indicates " +"no limit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2119 +msgid "edquota" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2122 +msgid "" +"Now let's say we want to give the user jane a quota. We do this with the " +"<c>edquota</c> command. Before we start editing quotas, let's see how much " +"space we have available on <path>/usr/users</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2128 +msgid "Checking available space on /usr/users" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2128 +#, no-wrap +msgid "" +"\n" +"# <i>df /usr/users</i>\n" +"\n" +"Filesystem 1k-blocks Used Available Use% Mounted on\n" +"/dev/hdc1 610048 4276 605772 1% /usr/users\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2135 +msgid "" +"This isn't a particularly large filesystem, only 600MB or so. It seems " +"prudent to give jane a quota so that she can't use more than her fair share. " +"When you run <c>edquota</c>, a temporary file is created for each user or " +"group you specify on the command line." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2142 +msgid "" +"The <c>edquota</c> command puts you in an editor, which enables you to add " +"and/or modify quotas via this temporary file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2147 +msgid "Modifying quota" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2147 +#, no-wrap +msgid "" +"\n" +"# <i>edquota jane</i>\n" +"\n" +"Disk quotas for user jane (uid 1003):\n" +"Filesystem blocks soft hard inodes soft hard\n" +" /dev/hdc1 4100 0 0 6 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2155 +msgid "" +"Similar to the output from the <c>quota</c> command above, the blocks and " +"inodes columns in this temporary file refer to the disk space and number of " +"files jane is currently using. You cannot modify the number of blocks or " +"inodes; any attempt to do so will be summarily discarded by the system. The " +"soft and hard columns show jane's quota, which we can see is currently " +"unlimited (again, zero indicates no quota)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2167 +msgid "Understanding edquota" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2170 +msgid "" +"The soft limit is the maximum amount of disk usage that jane has allocated " +"to her on the filesystem (in other words, her quota). If jane uses more disk " +"space than is allocated in her soft limit, she will be issued warnings about " +"her quota violation via e-mail. The hard limit indicates the absolute limit " +"on disk usage, which a user can't exceed. If jane tries to use more disk " +"space than is specified in the hard limit, she will get a \"Disk quota " +"exceeded\" error and will not be able to complete the operation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2183 +msgid "Making changes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2186 +msgid "So here we change jane's soft and hard limits and save the file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2190 +msgid "Changed soft and hard limits" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2190 +#, no-wrap +msgid "" +"\n" +"\n" +"Disk quotas for user jane (uid 1003):\n" +"Filesystem blocks soft hard inodes soft hard\n" +" /dev/hdc1 4100 10000 11500 6 2000 2500\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2197 +msgid "Running the <c>quota</c> command, we can inspect our modifications:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2201 +msgid "Checking quota for user jane" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2201 +#, no-wrap +msgid "" +"\n" +"# <i>quota jane</i>\n" +"\n" +"Disk quotas for user jane (uid 1003): \n" +"Filesystem blocks quota limit grace files quota limit grace\n" +" /dev/hdc1 4100 10000 11500 6 2000 2500\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2212 +msgid "Copying quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2215 +msgid "" +"You'll remember that we also have another user, john, on this filesystem. If " +"we want to give john the same quota as jane, we can use the -p option to " +"<c>edquota</c>, which uses jane's quotas as a prototype for all following " +"users on the command line. This is an easy way to set up quotas for groups " +"of users." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2222 +msgid "Coping quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2222 +#, no-wrap +msgid "" +"\n" +"# <i>edquota -p jane john</i>\n" +"# <i>quota john</i>\n" +"\n" +"Disk quotas for user john (uid 1003): \n" +"Filesystem blocks quota limit grace files quota limit grace\n" +" /dev/hdc1 0 10000 11500 1 2000 2500 \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2234 +msgid "Group restrictions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2237 +msgid "" +"We can also use <c>edquota</c> to restrict the allocation of disk space " +"based on the group ownership of files. For example, to edit the quotas for " +"the users group:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2243 +msgid "Editing quotas for the users group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2243 +#, no-wrap +msgid "" +"\n" +"# <i>edquota -g users</i>\n" +"Disk quotas for group users (gid 100): Filesystem blocks soft hard inodes soft hard /dev/hdc1 4100 500000 510000 7 100000 125000\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2248 +msgid "Then to view the modified quotas for the users group:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2252 +msgid "Viewing modified quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2252 +#, no-wrap +msgid "" +"\n" +"# <i>quota -g users</i>\n" +"Disk quotas for group users (gid 100): Filesystem blocks quota limit grace files quota limit grace /dev/hdc1 4100 500000 510000 7 100000 125000\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2260 +msgid "The repquota command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2263 +msgid "" +"Looking at each users' quotas using the <c>quota</c> command can be tedious " +"if you have many users on a filesytem. The <c>repquota</c> command " +"summarizes the quotas for a filesystem into a nice report. For example, to " +"see the quotas for all users and groups on <path>/usr/users</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2270 +msgid "Summarizing quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2270 +#, no-wrap +msgid "" +"\n" +"# <i>repquota -ug /usr/users</i>\n" +"*** Report for user quotas on device /dev/hdc1\n" +"Block grace time: 7days; Inode grace time: 7days\n" +" Block limits File limits\n" +"User used soft hard grace used soft hard grace\n" +"----------------------------------------------------------------------\n" +"root -- 0 0 0 3 0 0 \n" +"john -- 0 10000 11500 1 2000 2500 \n" +"jane -- 4100 10000 11500 6 2000 2500 \n" +"\n" +"*** Report for group quotas on device /dev/hdc1\n" +"Block grace time: 7days; Inode grace time: 7days\n" +" Block limits File limits\n" +"Group used soft hard grace used soft hard grace\n" +"----------------------------------------------------------------------\n" +"root -- 0 0 0 3 0 0 \n" +"users -- 4100 500000 510000 7 100000 125000 \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2293 +msgid "Repquota options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2296 +msgid "" +"There are a couple of other options to repquota that are worth mentioning. " +"<c>repquota -a</c> will report on all currently mounted read-write " +"filesystems that have quotas enabled. <c>repquota -n</c> will not resolve " +"uids and gids to names. This can speed up the output for large lists." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2306 +msgid "Monitoring quotas" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2309 +msgid "" +"If you are a system administrator, you will want to have a way to monitor " +"quotas to ensure that they are not being exceeded. An easy way to do this is " +"to use <c>warnquota</c>. The <c>warnquota</c> command sends e-mail to users " +"who have exceeded their soft limit. Typically <c>warnquota</c> is run as a " +"cron-job." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2317 +msgid "" +"When a user exceeds his or her soft limit, the grace column in the output " +"from the <c>quota</c> command will indicate the grace period -- how long " +"before the soft limit is enforced for that filesystem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2323 +msgid "Checking grace period" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2323 +#, no-wrap +msgid "" +"\n" +"Disk quotas for user jane (uid 1003): \n" +" Filesystem blocks quota limit grace files quota limit grace\n" +" /dev/hdc1 10800* 10000 11500 7days 7 2000 2500\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2329 +msgid "By default, the grace period for blocks and inodes is seven days." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2336 +msgid "Modifying the grace period" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2339 +msgid "You can modify the grace period for filesystems using <c>equota</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2343 +msgid "Modyfing grace period" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2343 +#, no-wrap +msgid "" +"\n" +"# <i>edquota -t</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2347 +msgid "This puts you in an editor of a temporary file that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2351 +msgid "Looks of a grace editor" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2351 +#, no-wrap +msgid "" +"\n" +"Grace period before enforcing soft limits for users:\n" +"Time units may be: days, hours, minutes, or seconds\n" +"Filesystem Block grace period Inode grace period\n" +"/dev/hdc1 7days 7days\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2358 +msgid "" +"The text in the file is nicely explanatory. Be sure to leave your users " +"enough time to receive their warning e-mail and find some files to delete!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2366 +msgid "Checking quotas on boot" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2369 +msgid "" +"You may also want to check quotas on boot. You can do this using a script to " +"run the <c>quotacheck</c> command; there is an example script in the <uri " +"link=\"http://en.tldp.org/HOWTO/Quota.html\">Quota Mini HOWTO</uri>. The " +"<c>quotacheck</c> command also has the ability to repair damaged quota " +"files; familiarize yourself with it by reading the quotacheck(8) man-page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2377 +msgid "" +"Also remember what we mentioned previously regarding <c>quotaon</c> and " +"<c>quotaoff</c>. You should incorporate <c>quotaon</c> into your boot script " +"so that quotas are enabled. To enable quotas on all filesystems where quotas " +"are supported, use the -a option:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2384 +msgid "Using -a option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2384 +#, no-wrap +msgid "" +"\n" +"# <i>quotaon -a</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2393 +msgid "System logs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2395 +msgid "Introducing syslogd" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2398 +msgid "" +"The syslog daemon provides a mature client-server mechanism for logging " +"messages from programs running on the system. Syslog receives a message from " +"a daemon or program, categorizes the message by priority and type, then logs " +"it according to administrator-configurable rules. The result is a robust and " +"unified approach to managing logs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2409 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2421 +msgid "Reading logs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2412 +msgid "" +"Let's jump right in and look at the contents of a syslog-recorded log file. " +"Afterward, we can come back to syslog configuration. The FHS (see <uri link=" +"\"/doc/en/articles/lpi-101-administration-p2.xml\">Part 2</uri> of this " +"tutorial series) mandates that log files be placed in <path>/var/log</path>. " +"Here we use the <c>tail</c> command to display the last 10 lines in the " +"\"messages\" file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2421 +#, no-wrap +msgid "" +"\n" +"# <i>cd /var/log</i>\n" +"# <i>tail messages</i>\n" +"Jan 12 20:17:39 bilbo init: Entering runlevel: 3\n" +"Jan 12 20:17:40 bilbo /usr/sbin/named[337]: starting BIND 9.1.3\n" +"Jan 12 20:17:40 bilbo /usr/sbin/named[337]: using 1 CPU\n" +"Jan 12 20:17:41 bilbo /usr/sbin/named[350]: loading configuration from '/etc/bind/named.conf'\n" +"Jan 12 20:17:41 bilbo /usr/sbin/named[350]: no IPv6 interfaces found\n" +"Jan 12 20:17:41 bilbo /usr/sbin/named[350]: listening on IPv4 interface lo, 127.0.0.1#53\n" +"Jan 12 20:17:41 bilbo /usr/sbin/named[350]: listening on IPv4 interface eth0, 10.0.0.1#53\n" +"Jan 12 20:17:41 bilbo /usr/sbin/named[350]: running\n" +"Jan 12 20:41:58 bilbo gnome-name-server[11288]: starting\n" +"Jan 12 20:41:58 bilbo gnome-name-server[11288]: name server starting\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2436 +msgid "" +"You may remember from the text-processing whirlwind that the <c>tail</c> " +"command displays the last lines in a file. In this case, we can see that the " +"nameserver named was recently started on this system, which is named bilbo. " +"If we were deploying IPv6, we might notice that named found no IPv6 " +"interfaces, indicating a potential problem. Additionally, we can see that a " +"user may have recently started GNOME, indicated by the presence of gnome-" +"name-server." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2448 +msgid "Tailing log files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2451 +msgid "" +"An experienced system administrator might use <c>tail -f</c> to follow the " +"output to a log file as it occurs:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2456 +msgid "Using tail -f command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2456 +#, no-wrap +msgid "" +"\n" +"# <i>tail -f /var/log/messages</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2460 +msgid "" +"For example, in the case of debugging our theoretical IPv6 problem, running " +"the above command in one terminal while stopping and starting named would " +"immediately display the messages from that daemon. This can be a useful " +"technique when debugging. Some administrators even like to keep a constantly " +"running <c>tail -f</c> messages in a terminal where they can keep an eye on " +"system events." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2472 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2482 +msgid "Grepping logs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2475 +msgid "" +"Another useful technique is to search a log file using the <c>grep</c> " +"utility, described in <uri link=\"/doc/en/articles/lpi-101-administration-p2." +"xml\">Part 2</uri> of this tutorial series. In the above case, we might use " +"grep to find where \"named\" behavior has changed:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2482 +#, no-wrap +msgid "" +"\n" +"# <i>grep named /var/log/messages</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2489 +msgid "Log overview" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2492 +msgid "" +"The following summarizes the log files typically found in <path>/var/log</" +"path> and maintained by syslog:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2498 +msgid "" +"<path>messages</path>: Informational and error messages from general system " +"programs and daemons" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2502 +msgid "" +"<path>secure</path>: Authentication messages and errors, kept separate from " +"<path>messages</path> for extra security" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2506 +msgid "<path>maillog</path>: Mail-related messages and errors" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2507 +msgid "<path>cron</path>: Cron-related messages and errors" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2508 +msgid "<path>spooler</path>: UUCP and news-related messages and errors." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2514 +msgid "syslog.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2517 +msgid "" +"As a matter of fact, now would be a good time to investigate the syslog " +"configuration file, <path>/etc/syslog.conf</path>. (Note: If you don't have " +"<path>syslog.conf</path>, keep reading for the sake of information, but you " +"may be using an alternative syslog daemon.) Browsing that file, we see there " +"are entries for each of the common log files mentioned above, plus possibly " +"some other entries. The file has the format facility.priority action, where " +"those fields are defined as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2527 +msgid "" +"facility: Specifies the subsystem that produced the message. The valid " +"keywords for facility are auth, authpriv, cron, daemon, kern, lpr, mail, " +"news, syslog, user, uucp and local0 through local7." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2533 +msgid "" +"priority: Specifies the minimum severity of the message, meaning that " +"messages of this priority and higher will be matched by this rule. The valid " +"keywords for priority are debug, info, notice, warning, err, crit, alert, " +"and emerg." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2539 +msgid "" +"action: The action field should be either a filename, tty (such as <path>/" +"dev/console</path>), remote machine prefixed by @ , comma-separated list of " +"users, or to send the message to everybody logged on. The most common action " +"is a simple filename." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2549 +msgid "Reloading and additional information" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2552 +msgid "" +"Hopefully this overview of the configuration file helps you to get a feel " +"for the strength of the syslog system. You should read the syslog.conf(5) " +"man-page for more information prior to making changes. Additionally the " +"syslogd(8) man-page supplies lots more detailed information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2559 +msgid "" +"Note that you need to inform the syslog daemon of changes to the " +"configuration file before they are put into effect. Sending it a SIGHUP is " +"the right method, and you can use the <c>killall</c> command to do this " +"easily:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre:caption):2565 +msgid "Using killall command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(pre):2565 +#, no-wrap +msgid "" +"\n" +"# <i>killall -HUP syslogd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2572 +msgid "A security note" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2575 +msgid "" +"You should beware that the log files written to by syslogd will be created " +"by the program if they don't exist. Regardless of your current umask " +"setting, the files will be created world-readable. If you're concerned about " +"the security, you should chmod the files to be read-write by root only. " +"Additionally, the <c>logrotate</c> program (described below) can be " +"configured to create new log files with the appropriate permissions. The " +"syslog daemon always preserves the current attributes of an existing log " +"file, so you don't need to worry about it once the file is created." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2589 +msgid "logrotate" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2592 +msgid "" +"The log files in <path>/var/log</path> will grow over time, and potentially " +"could fill the filesystem. It is advisable to employ a program such as " +"<c>logrotate</c> to manage the automatic archiving of the logs. The " +"<c>logrotate</c> program usually runs as a daily cron job, and can be " +"configured to rotate, compress, remove, or mail the log files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2600 +msgid "" +"For example, a default configuration of logrotate might rotate the logs " +"weekly, keeping 4 weeks worth of backlogs (by appending a sequence number to " +"the filename), and compress the backlogs to save space. Additionally, the " +"program can be configured to deliver a SIGHUP to syslogd so that the daemon " +"will notice the now-empty log files and append to them appropriately." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2608 +msgid "" +"For more information on <c>logrotate</c>, see the logrotate(8) man page, " +"which contains a description of the program and the syntax of the " +"configuration file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2616 +msgid "Advanced topic -- klogd" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2619 +msgid "" +"Before moving away from syslog, I'd like to note a couple of advanced topics " +"for ambitious readers. These tips may save you some grief when trying to " +"understand syslog-related topics." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2625 +msgid "" +"First, the syslog daemon is actually part of the sysklogd package, which " +"contains a second daemon called klogd. It's klogd's job to receive " +"information and error messages from the kernel, and pass them on to syslogd " +"for categorization and logging. The messages received by klogd are exactly " +"the same as those you can retrieve using the <c>dmesg</c> command. The " +"difference is that <c>dmesg</c> prints the current contents of a ring buffer " +"in the kernel, whereas klogd is passing the messages to syslogd so that they " +"won't be lost when the ring wraps around." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2639 +msgid "Advanced topic -- alternate loggers" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2642 +msgid "" +"Second, there are alternatives to the standard sysklogd package. The " +"alternatives attempt to be more efficient, easier to configure, and possibly " +"more featureful than sysklogd. <uri link=\"http://www.balabit.hu/en/" +"downloads/syslog-ng/\">Syslog-ng</uri> and <uri link=\"http://metalog." +"sourceforge.net/\">Metalog</uri> seem to be some of the more popular " +"alternatives; you might investigate them if you find sysklogd doesn't " +"provide the level of power you need." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2652 +msgid "" +"Third, you can log messages in your scripts using the logger command. See " +"the logger(1) man page for more information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2662 +msgid "Summary and resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2664 +msgid "Summary" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2667 +msgid "" +"Congratulations, you've reached the end of this tutorial! Well, almost. " +"There were a couple of topics that we were unable to include in our first " +"four tutorials due to space limitations. Fortunately, we have a couple of " +"good resources that will help you get up to speed on these topics in no " +"time. Be sure to cover these particular tutorials if you are planning to get " +"your LPIC level 1 certification." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2676 +msgid "" +"We didn't have quite enough room to cover the important topic of system " +"backups in this tutorial. Fortunately, IBM developerWorks already has a " +"tutorial on this subject, called <uri link=\"http://www-106.ibm.com/" +"developerworks/edu/l-dw-linuxbu-i.html\">Backing up your Linux machines</" +"uri>. In this tutorial, you'll learn how to back up Linux systems using a " +"<c>tar</c> variant called star. You'll also learn how to use the <c>mt</c> " +"command to control tape functions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2686 +msgid "" +"The second topic that we weren't quite able to fit in was periodic " +"scheduling. Fortunately, there's some good <uri link=\"http://www.ussg.iu." +"edu/usail/automation/cron.html\">cron documentation</uri> available at " +"Indiana University. <c>cron</c> is used to schedule jobs to be executed at a " +"specific time, and is an important tool for any system administrator." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2695 +msgid "" +"On the next page, you'll find a number of resources that you will find " +"helpful in learning more about the subjects presented in this tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2703 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2706 +msgid "" +"To find out more about quota support under Linux, be sure to check out the " +"<uri link=\"http://en.tldp.org/HOWTO/Quota.html\">Linux Quota mini-HOWTO</" +"uri>. Also be sure to consult the quota(1), edquota(8), repquota(8), " +"quotacheck(8), and quotaon(8) man pages on your system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2713 +msgid "" +"Additional information to the system boot process and boot loaders can be " +"found at:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2719 +msgid "" +"IBM developerWorks' <uri link=\"http://www-106.ibm.com/developerworks/edu/l-" +"dw-linuxgrub-i.html\">Getting to know GRUB</uri> tutorial" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2726 +msgid "" +"Kernel command-line options in <path>/usr/src/linux/Documentation/kernel-" +"parameters.txt</path>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2730 +msgid "" +"<uri link=\"http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/ref-" +"guide/s1-init-boot-shutdown-init.html\">Sysvinit docs at Redhat</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2737 +msgid "" +"To learn more about Linux filesystems, read the multi-part advanced " +"filesystem implementor's guide on the IBM developerWorks Linux zone, " +"covering:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2744 +msgid "The benefits of journalling and ReiserFS (Part 1)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2749 +msgid "Setting up a ReiserFS system (Part 2)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2753 +msgid "http://www-106.ibm.com/developerworks/library/l-fs3.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2753 +msgid "Using the tmpfs virtual memory filesystem and bind mounts (Part 3)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2757 +msgid "http://www-106.ibm.com/developerworks/library/l-fs4.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2757 +msgid "The benefits of devfs, the device management filesystem (Part 4)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2762 +msgid "http://www-106.ibm.com/developerworks/library/l-fs5.html" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2762 +msgid "Beginning the conversion to devfs (Part 5)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2767 +msgid "http://www-106.ibm.com/developerworks/linux/library/l-fs6/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2767 +msgid "Completing the conversion to devfs using an init wrapper (Part 6)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2772 +msgid "/doc/en/articles/afig-ct-ext3-intro.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2772 +msgid "The benefits of the ext3 filesystem (Part 7)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2776 +msgid "/doc/en/articles/l-afig-p8.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2776 +msgid "An in-depth look at ext3 and the latest kernel updates (Part 8)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2779 +msgid "" +"<uri link=\"http://www-106.ibm.com/developerworks/linux/library/l-fs9.html" +"\">An introduction to XFS (Part 9)</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2786 +msgid "" +"For more information on partitioning, take a look at the following " +"partitioning tips on the IBM developerWorks Linux zone:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2797 +msgid "/doc/en/articles/partitioning-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2797 +msgid "Partitioning in action, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2800 +msgid "" +"<uri link=\"/doc/en/articles/partitioning-p2.xml\">Partitioning in action, " +"Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2806 +msgid "ReiserFS Resources:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2814 +msgid "" +"Advanced filesystem implementor's guide, Part 1: Journalling and ReiserFS on " +"developerWorks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2818 +msgid "" +"<uri link=\"http://www-106.ibm.com/developerworks/library/l-fs2.html" +"\">Advanced filesystem implementor's guide, Part 2: Using ReiserFS and Linux " +"2.4 on developerWorks</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2826 +msgid "ext3 resources:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2836 +msgid "Andrew Morton's excellent ext3 usage documentation (recommended)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2841 +msgid "XFS and JFS resources:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2847 +msgid "http://oss.sgi.com/projects/xfs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2847 +msgid "SGI XFS projects page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(li):2849 +msgid "" +"The IBM <uri link=\"http://www-124.ibm.com/developerworks/oss/jfs/index.html" +"\">JFS project Web site</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2856 +msgid "" +"Don't forget <uri link=\"http://en.tldp.org/\">linuxdoc.org</uri>. You'll " +"find linuxdoc's collection of guides, HOWTOs, FAQs, and man pages to be " +"invaluable. Be sure to check out <uri link=\"http://en.tldp.org/LDP/LG/" +"current/\">Linux Gazette</uri> and <uri link=\"http://en.tldp.org/linuxfocus/" +"index.html\">LinuxFocus</uri> as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2864 +msgid "" +"The Linux System Administrators guide, available from <uri link=\"http://en." +"tldp.org/guides.html\">Linuxdoc.org's \"Guides\" section</uri>, is a good " +"complement to this series of tutorials -- give it a read! You may also find " +"Eric S. Raymond's <uri link=\"http://en.tldp.org/HOWTO/Unix-and-Internet-" +"Fundamentals-HOWTO/\">Unix and Internet Fundamentals HOWTO</uri> to be " +"helpful." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2873 +msgid "" +"In the Bash by example article series on developerWorks, Daniel shows you " +"how to use bash programming constructs to write your own bash scripts. This " +"bash series (particularly Parts 1 and 2) will be excellent additional " +"preparation for the LPIC Level 1 exam:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2883 +msgid "http://www.gentoo.org/doc/en/articles/bash-by-example-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2883 +msgid "" +"Bash by example, part 1: Fundamental programming in the Bourne-again shell" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2888 +msgid "http://www.gentoo.org/doc/en/articles/bash-by-example-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2888 +msgid "Bash by example, part 2: More bash programming fundamentals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri:link):2893 +msgid "http://www.gentoo.org/doc/en/articles/bash-by-example-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(uri):2893 +msgid "Bash by example, part 3: Exploring the ebuild system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2898 +msgid "" +"We highly recommend the <uri link=\"http://www-106.ibm.com/developerworks/" +"linux/library/l-faq/\">Technical FAQ by Linux Users</uri> by Mark Chapman, a " +"50-page in-depth list of frequently-asked Linux questions, along with " +"detailed answers. The FAQ itself is in PDF (Adobe Acrobat) format. If you're " +"a beginning or intermediate Linux user, you really owe it to yourself to " +"check this FAQ out. We also recommend the <uri link=\"http://www-106.ibm.com/" +"developerworks/linux/library/l-gloss/index.html\">Linux glossary for Linux " +"users</uri>, also from Mark." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2910 +msgid "" +"If you're not familiar with the vi editor, we strongly recommend that you " +"check out Daniel's <uri link=\"http://www-106.ibm.com/developerworks/edu/l-" +"dw-linuxvi-i.html\">Vi intro -- the cheat sheet method tutorial</uri>. This " +"tutorial will give you a gentle yet fast-paced introduction to this powerful " +"text editor. Consider this must-read material if you don't know how to use " +"vi." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(title):2922 +msgid "Feedback" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(p):2925 +msgid "Please send any tutorial feedback you may have to the authors:" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-advanced-p4.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/lpi-101-fundamentals-p1.xml.po b/article/gettext/ru/lpi-101-fundamentals-p1.xml.po new file mode 100644 index 0000000..f1311ee --- /dev/null +++ b/article/gettext/ru/lpi-101-fundamentals-p1.xml.po @@ -0,0 +1,1889 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(guide:link):5 +msgid "/doc/en/articles/lpi-101-fundamentals-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):6 +msgid "LPI certification 101 (release 2) exam prep, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="curtis119@gentoo.org">M Curtis Napier</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(abstract):15 +msgid "" +"In this tutorial, we'll introduce you to bash (the standard Linux shell), " +"show you how to take full advantage of standard Linux commands like ls, cp, " +"and mv, explain inodes and hard and symbolic links, and much more. By the " +"end of this tutorial, you'll have a solid grounding in Linux fundamentals " +"and will even be ready to begin learning some basic Linux system " +"administration tasks." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(version):28 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(date):29 +msgid "2005-10-12" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):32 +msgid "Before You Start" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):34 +msgid "About this tutorial" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):37 +msgid "" +"Welcome to \"Linux fundamentals,\" the first of four tutorials designed to " +"prepare you for the Linux Professional Institute's 101 exam. In this " +"tutorial, we'll introduce you to bash (the standard Linux shell), show you " +"how to take full advantage of standard Linux commands like ls, cp, and mv, " +"explain inodes and hard and symbolic links, and much more. By the end of " +"this tutorial, you'll have a solid grounding in Linux fundamentals and will " +"even be ready to begin learning some basic Linux system administration " +"tasks. By the end of this series of tutorials (eight in all), you'll have " +"the knowledge you need to become a Linux Systems Administrator and will be " +"ready to attain an LPIC Level 1 certification from the Linux Professional " +"Institute if you so choose." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):50 +msgid "" +"This particular tutorial (Part 1) is ideal for those who are new to Linux, " +"or those who want to review or improve their understanding of fundamental " +"Linux concepts like copying and moving files, creating symbolic and hard " +"links, and using Linux' standard text-processing commands along with " +"pipelines and redirection. Along the way, we'll share plenty of hints, tips, " +"and tricks to keep the tutorial meaty and practical, even for those with a " +"good amount of previous Linux experience. For beginners, much of this " +"material will be new, but more experienced Linux users may find this " +"tutorial to be a great way of rounding out their fundamental Linux skills." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):62 +msgid "" +"For those who have taken the release 1 version of this tutorial for reasons " +"other than LPI exam preparation, you probably don't need to take this one. " +"However, if you do plan to take the exams, you should strongly consider " +"reading this revised tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):72 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):75 +msgid "" +"Residing in Albuquerque, New Mexico, Daniel Robbins is the Chief Architect " +"of Gentoo Linux an advanced ports-based Linux meta distribution. He also " +"writes articles, tutorials, and tips for the IBM developerWorks Linux zone " +"and Intel Developer Services and has also served as a contributing author " +"for several books, including Samba Unleashed and SuSE Linux Unleashed. " +"Daniel enjoys spending time with his wife, Mary, and his daughter, Hadassah. " +"You can contact Daniel at drobbins@gentoo.org." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):90 +msgid "Introducing bash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):92 +msgid "The shell" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):95 +msgid "" +"If you've used a Linux system, you know that when you log in, you are " +"greeted by a prompt that looks something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):100 +msgid "The prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):100 +#, no-wrap +msgid "" +"\n" +"$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):104 +msgid "" +"The particular prompt that you see may look quite different. It may contain " +"your systems host name, the name of the current working directory, or both. " +"But regardless of what your prompt looks like, there's one thing that's " +"certain. The program that printed that prompt is called a \"shell,\" and " +"it's very likely that your particular shell is a program called <c>bash</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):115 +msgid "Are you running bash?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):118 +msgid "You can check to see if you're running <c>bash</c> by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):122 +msgid "The SHELL variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):122 +#, no-wrap +msgid "" +"\n" +"$ <i>echo $SHELL</i>\n" +"/bin/bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):127 +msgid "" +"If the above line gave you an error or didn't respond similarly to our " +"example, then you may be running a shell other than bash. In that case, most " +"of this tutorial should still apply, but it would be advantageous for you to " +"switch to <c>bash</c> for the sake of preparing for the 101 exam." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):139 +msgid "About bash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):142 +msgid "" +"Bash, an acronym for \"Bourne-again shell,\" is the default shell on most " +"Linux systems. The shell's job is to obey your commands so that you can " +"interact with your Linux system. When you're finished entering commands, you " +"may instruct the shell to exit or logout, at which point you'll be returned " +"to a login prompt." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):150 +msgid "" +"By the way, you can also log out by pressing control-D at the bash prompt." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):157 +msgid "Using \"cd\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):160 +msgid "" +"As you've probably found, staring at your bash prompt isn't the most " +"exciting thing in the world. So, let's start using bash to navigate around " +"our file system. At the prompt, type the following (without the <c>$</c>):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):166 +msgid "Changing directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):166 +#, no-wrap +msgid "" +"\n" +"$ <i>cd /</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):170 +msgid "" +"We've just told bash that you want to work in /, also known as the root " +"directory; all the directories on the system form a tree, and / is " +"considered the top of this tree, or the root. cd sets the directory where " +"you are currently working, also known as the \"current working directory.\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):180 +msgid "Paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):183 +msgid "To see bash's current working directory, you can type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):187 +msgid "Present Working Directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):187 +#, no-wrap +msgid "" +"\n" +"$ <i>pwd</i>\n" +"/\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):192 +msgid "" +"In the above example, the / argument to <c>cd</c> is called a <e>path</e>. " +"It tells cd where we want to go. In particular, the / argument is an " +"<e>absolute</e> path, meaning that it specifies a location relative to the " +"root of the file system tree." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):202 +msgid "Absolute paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):205 +msgid "Here are some other absolute paths:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):209 +msgid "Example absolute paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):209 +#, no-wrap +msgid "" +"\n" +"/dev\n" +"/usr\n" +"/usr/bin\n" +"/usr/local/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):216 +msgid "" +"As you can see, the one thing that all absolute paths have in common is that " +"they begin with /. With a path of /usr/local/bin, we're telling cd to enter " +"the / directory, then the usr directory under that, and then local and bin. " +"Absolute paths are always evaluated by starting at / first." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):226 +msgid "Relative paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):229 +msgid "" +"The other kind of path is called a <e>relative path</e>. <c>Bash</c>, <c>cd</" +"c>, and other commands always interpret these paths relative to the current " +"directory. Relative paths never begin with a /. So, if we're in /usr:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):235 +msgid "Changing directories with absolute paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):235 +#, no-wrap +msgid "" +"\n" +"$ <i>cd /usr</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):239 +msgid "" +"Then, we can use a relative path to change to the /usr/local/bin directory:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):243 +msgid "Changing directories with relative paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):243 +#, no-wrap +msgid "" +"\n" +"$ <i>cd local/bin</i>\n" +"$ <i>pwd</i>\n" +"/usr/local/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):252 +msgid "Using .." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):255 +msgid "" +"Relative paths may also contain one or more .. directories. The .. directory " +"is a special directory that points to the parent directory. So, continuing " +"from the example above:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):261 +msgid "Using the 'parent directory' notation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):261 +#, no-wrap +msgid "" +"\n" +"$ <i>pwd</i>\n" +"/usr/local/bin\n" +"$ <i>cd ..</i>\n" +"$ <i>pwd</i>\n" +"/usr/local\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):269 +msgid "" +"As you can see, our current directory is now /usr/local. We were able to go " +"\"backwards\" one directory, relative to the current directory that we were " +"in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):275 +msgid "" +"In addition, we can also add .. to an existing relative path, allowing us to " +"go into a directory that's alongside one we are already in, for example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):280 +msgid "Using the parent directory notation in relative paths" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):280 +#, no-wrap +msgid "" +"\n" +"$ <i>pwd</i>\n" +"/usr/local\n" +"$ <i>cd ../share</i>\n" +"$ <i>pwd</i>\n" +"/usr/share\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):291 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):300 +msgid "Relative path examples" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):294 +msgid "" +"Relative paths can get quite complex. Here are a few examples, all without " +"the resultant target directory displayed. Try to figure out where you'll end " +"up after typing these commands:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):300 +#, no-wrap +msgid "" +"\n" +"$ <i>cd /bin</i>\n" +"$ <i>cd ../usr/share/zoneinfo</i>\n" +"\n" +"\n" +"$ <i>cd /usr/X11R6/bin</i>\n" +"$ <i>cd ../lib/X11</i>\n" +"\n" +"\n" +"$ <i>cd /usr/bin</i>\n" +"$ <i>cd ../bin/../bin</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):313 +msgid "Now, try them out and see if you got them right :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):320 +msgid "Understanding ." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):323 +msgid "" +"Before we finish our coverage of cd, there are a few more things I need to " +"mention. First, there is another special directory called ., which means " +"\"the current directory\". While this directory isn't used with the cd " +"command, it's often used to execute some program in the current directory, " +"as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):331 +msgid "Running a program from the current location" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):331 +#, no-wrap +msgid "" +"\n" +"$ <i>./myprog</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):335 +msgid "" +"In the above example, the myprog executable residing in the current working " +"directory will be executed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):343 +msgid "cd and the home directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):346 +msgid "If we wanted to change to our home directory, we could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):350 +msgid "Go to the HOME directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):350 +#, no-wrap +msgid "" +"\n" +"$ <i>cd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):354 +msgid "" +"With no arguments, cd will change to your home directory, which is /root for " +"the superuser and typically /home/username for a regular user. But what if " +"we want to specify a file in our home directory? Maybe we want to pass a " +"file argument to the <c>myprog</c> command. If the file lives in our home " +"directory, we can type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):362 +msgid "Execute a program in the current directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):362 +#, no-wrap +msgid "" +"\n" +"$ <i>./myprog /home/drobbins/myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):366 +msgid "" +"However, using an absolute path like that isn't always convenient. " +"Thankfully, we can use the ~ (tilde) character to do the same thing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):371 +msgid "Using the 'home directory' notation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):371 +#, no-wrap +msgid "" +"\n" +"$ <i>./myprog ~/myfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):378 +msgid "Other users' home directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):381 +msgid "" +"Bash will expand a lone ~ to point to your home directory, but you can also " +"use it to point to other users' home directories. For example, if we wanted " +"to refer to a file called fredsfile.txt in Fred's home directory, we could " +"type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):387 +msgid "Example use of the 'home directory' notation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):387 +#, no-wrap +msgid "" +"\n" +"$ <i>./myprog ~fred/fredsfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):395 +msgid "Using Linux Commands" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):397 +msgid "Introducing ls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):400 +msgid "" +"Now, we'll take a quick look at the ls command. Very likely, you're already " +"familiar with ls and know that typing it by itself will list the contents of " +"the current working directory:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):406 +msgid "Listing files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):406 +#, no-wrap +msgid "" +"\n" +"$ <i>cd /usr</i>\n" +"$ <i>ls</i>\n" +"X11R6 doc i686-pc-linux-gnu lib man sbin ssl\n" +"bin gentoo-x86 include libexec portage share tmp\n" +"distfiles i686-linux info local portage.old src\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):414 +msgid "" +"By specifying the -a option, you can see all of the files in a directory, " +"including hidden files: those that begin with .. As you can see in the " +"following example, ls -a reveals the . and .. special directory links:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):420 +msgid "Listing files, including hidden ones" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):420 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -a</i>\n" +". bin gentoo-x86 include libexec portage share tmp\n" +".. distfiles i686-linux info local portage.old src\n" +"X11R6 doc i686-pc-linux-gnu lib man sbin ssl\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):430 +msgid "Long directory listings" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):433 +msgid "" +"You can also specify one or more files or directories on the <c>ls</c> " +"command line. If you specify a file, <c>ls</c> will show that file only. If " +"you specify a directory, <c>ls</c> will show the <e>contents</e> of the " +"directory. The <c>-l</c> option comes in very handy when you need to view " +"permissions, ownership, modification time, and size information in your " +"directory listing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):441 +msgid "" +"In the following example, we use the <c>-l</c> option to display a full " +"listing of my /usr directory." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):446 +msgid "Listing files with all information" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):446 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -l /usr</i>\n" +"drwxr-xr-x 7 root root 168 Nov 24 14:02 X11R6\n" +"drwxr-xr-x 2 root root 14576 Dec 27 08:56 bin\n" +"drwxr-xr-x 2 root root 8856 Dec 26 12:47 distfiles\n" +"lrwxrwxrwx 1 root root 9 Dec 22 20:57 doc -> share/doc\n" +"drwxr-xr-x 62 root root 1856 Dec 27 15:54 gentoo-x86\n" +"drwxr-xr-x 4 root root 152 Dec 12 23:10 i686-linux\n" +"drwxr-xr-x 4 root root 96 Nov 24 13:17 i686-pc-linux-gnu\n" +"drwxr-xr-x 54 root root 5992 Dec 24 22:30 include\n" +"lrwxrwxrwx 1 root root 10 Dec 22 20:57 info -> share/info\n" +"drwxr-xr-x 28 root root 13552 Dec 26 00:31 lib\n" +"drwxr-xr-x 3 root root 72 Nov 25 00:34 libexec\n" +"drwxr-xr-x 8 root root 240 Dec 22 20:57 local\n" +"lrwxrwxrwx 1 root root 9 Dec 22 20:57 man -> share/man\n" +"lrwxrwxrwx 1 root root 11 Dec 8 07:59 portage -> gentoo-x86/\n" +"drwxr-xr-x 60 root root 1864 Dec 8 07:55 portage.old\n" +"drwxr-xr-x 3 root root 3096 Dec 22 20:57 sbin\n" +"drwxr-xr-x 46 root root 1144 Dec 24 15:32 share\n" +"drwxr-xr-x 8 root root 328 Dec 26 00:07 src\n" +"drwxr-xr-x 6 root root 176 Nov 24 14:25 ssl\n" +"lrwxrwxrwx 1 root root 10 Dec 22 20:57 tmp -> ../var/tmp\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):470 +msgid "" +"The first column displays permissions information for each item in the " +"listing. I'll explain how to interpret this information in a bit. The next " +"column lists the number of links to each file system object, which we'll " +"gloss over now but return to later. The third and fourth columns list the " +"owner and group, respectively. The fifth column lists the object size. The " +"sixth column is the \"last modified\" time or \"mtime\" of the object. The " +"last column is the object's name. If the file is a symbolic link, you'll see " +"a trailing -> and the path to which the symbolic link points." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):484 +msgid "Looking at directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):487 +msgid "" +"Sometimes, you'll want to look at a directory, rather than inside it. For " +"these situations, you can specify the <c>-d</c> option, which will tell ls " +"to look at any directories that it would normally look inside:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):493 +msgid "Listing directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):493 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -dl /usr /usr/bin /usr/X11R6/bin ../share</i>\n" +"drwxr-xr-x 4 root root 96 Dec 18 18:17 ../share\n" +"drwxr-xr-x 17 root root 576 Dec 24 09:03 /usr\n" +"drwxr-xr-x 2 root root 3192 Dec 26 12:52 /usr/X11R6/bin\n" +"drwxr-xr-x 2 root root 14576 Dec 27 08:56 /usr/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):504 +msgid "Recursive and inode listings" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):507 +msgid "" +"So you can use <c>-d</c> to look at a directory, but you can also use <c>-R</" +"c> to do the opposite: not just look inside a directory, but recursively " +"look inside all the files and directories inside that directory! We won't " +"include any example output for this option (since it's generally " +"voluminous), but you may want to try a few <c>ls -R</c> and <c>ls -Rl</c> " +"commands to get a feel for how this works." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):516 +msgid "" +"Finally, the <c>-i</c> ls option can be used to display the inode numbers of " +"the file system objects in the listing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):521 +msgid "Listing inodes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):521 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -i /usr</i>\n" +" 1409 X11R6 314258 i686-linux 43090 libexec 13394 sbin\n" +" 1417 bin 1513 i686-pc-linux-gnu 5120 local 13408 share\n" +" 8316 distfiles 1517 include 776 man 23779 src\n" +" 43 doc 1386 info 93892 portage 36737 ssl\n" +" 70744 gentoo-x86 1585 lib 5132 portage.old 784 tmp\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):533 +msgid "Understanding inodes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):536 +msgid "" +"Every object on a file system is assigned a unique index, called an " +"<e>inode</e> number. This might seem trivial, but understanding inodes is " +"essential to understanding many file system operations. For example, " +"consider the . and .. links that appear in every directory. To fully " +"understand what a .. directory actually is, we'll first take a look at /usr/" +"local's inode number:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):544 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):554 +msgid "Listing inode for a directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):544 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -id /usr/local</i>\n" +" 5120 /usr/local\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):549 +msgid "" +"The /usr/local directory has an inode number of 5120. Now, let's take a look " +"at the inode number of /usr/local/bin/..:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):554 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -id /usr/local/bin/..</i>\n" +" 5120 /usr/local/bin/..\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):559 +msgid "" +"As you can see, /usr/local/bin/.. has the same inode number as /usr/local! " +"Here's how can we come to grips with this shocking revelation. In the past, " +"we've considered /usr/local to be the directory itself. Now, we discover " +"that inode 5120 is in fact the directory, and we have found two directory " +"entries (called \"links\") that point to this inode. Both /usr/local and /" +"usr/local/bin/.. are links to inode 5120. Although inode 5120 only exists in " +"one place on disk, multiple things link to it. Inode 5120 is the actual " +"entry on disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):569 +msgid "" +"In fact, we can see the total number of times that inode 5120 is referenced " +"by using the <c>ls -dl</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):574 +msgid "Listing inode reference" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):574 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -dl /usr/local</i>\n" +"drwxr-xr-x 8 root root 240 Dec 22 20:57 /usr/local\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):579 +msgid "" +"If we take a look at the second column from the left, we see that the " +"directory /usr/local (inode 5120) is referenced eight times. On my system, " +"here are the various paths that reference this inode:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):585 +msgid "Inode references" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):585 +#, no-wrap +msgid "" +"\n" +"/usr/local\n" +"/usr/local/.\n" +"/usr/local/bin/..\n" +"/usr/local/games/..\n" +"/usr/local/lib/..\n" +"/usr/local/sbin/..\n" +"/usr/local/share/..\n" +"/usr/local/src/..\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):599 +msgid "mkdir" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):602 +msgid "" +"Let's take a quick look at the mkdir command, which can be used to create " +"new directories. The following example creates three new directories, tic, " +"tac, and toe, all under /tmp:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):608 +msgid "Creating directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):608 +#, no-wrap +msgid "" +"\n" +"$ <i>cd /tmp</i>\n" +"$ <i>mkdir tic tac toe</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):613 +msgid "" +"By default, the mkdir command doesn't create parent directories for you; the " +"entire path up to the next-to-last element needs to exist. So, if you want " +"to create the directories <path>won/der/ful</path>, you'd need to issue " +"three separate <c>mkdir</c> commands:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):620 +msgid "Creating parent directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):620 +#, no-wrap +msgid "" +"\n" +"$ <i>mkdir won/der/ful</i>\n" +"mkdir: cannot create directory `won/der/ful': No such file or directory\n" +"$ <i>mkdir won</i>\n" +"$ <i>mkdir won/der</i>\n" +"$ <i>mkdir won/der/ful</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):628 +msgid "" +"However, mkdir has a handy -p option that tells mkdir to create any missing " +"parent directories, as you can see here:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):633 +msgid "Creating parent directories in one go" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):633 +#, no-wrap +msgid "" +"\n" +"$ <i>mkdir -p easy/as/pie</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):637 +msgid "" +"All in all, pretty straightforward. To learn more about the mkdir command, " +"type <c>man mkdir</c> to read the manual page. This will work for nearly all " +"commands covered here (for example, <c>man ls</c>), except for cd, which is " +"built-in to bash." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):647 +msgid "touch" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):650 +msgid "" +"Now, we're going to take a quick look at the <c>cp</c> and <c>mv</c> " +"commands, used to copy, rename, and move files and directories. To begin " +"this overview, we'll first use the <c>touch</c> command to create a file in /" +"tmp:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):656 +msgid "Creating a file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):656 +#, no-wrap +msgid "" +"\n" +"$ <i>cd /tmp</i>\n" +"$ <i>touch copyme</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):661 +msgid "" +"The touch command updates the \"mtime\" of a file if it exists (recall the " +"sixth column in <c>ls -l</c> output). If the file doesn't exist, then a new, " +"empty file will be created. You should now have a <path>/tmp/copyme</path> " +"file with a size of zero." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):671 +msgid "echo" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):674 +msgid "" +"Now that the file exists, let's add some data to the file. We can do this " +"using the echo command, which takes its arguments and prints them to " +"standard output. First, the echo command by itself:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):680 +msgid "Creating a file using 'echo'" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):680 +#, no-wrap +msgid "" +"\n" +"$ <i>echo \"firstfile\"</i>\n" +"firstfile\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):685 +msgid "Now, the same echo command with output redirection:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):689 +msgid "Using output redirection" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):689 +#, no-wrap +msgid "" +"\n" +"$ <i>echo \"firstfile\" > copyme</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):693 +msgid "" +"The greater-than sign tells the shell to write echo's output to a file " +"called copyme. This file will be created if it doesn't exist, and will be " +"overwritten if it does exist. By typing <c>ls -l</c>, we can see that the " +"copyme file is 10 bytes long, since it contains the word firstfile and the " +"newline character:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):700 +msgid "Viewing file information" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):700 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -l copyme</i>\n" +"-rw-r--r-- 1 root root 10 Dec 28 14:13 copyme\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):708 +msgid "cat and cp" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):711 +msgid "" +"To display the contents of the file on the terminal, use the cat command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):715 +msgid "Viewing file contents" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):715 +#, no-wrap +msgid "" +"\n" +"$ <i>cat copyme</i>\n" +"firstfile\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):720 +msgid "" +"Now, we can use a basic invocation of the <c>cp</c> command to create a " +"copiedme file from the original copyme file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):725 +msgid "Copying files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):725 +#, no-wrap +msgid "" +"\n" +"$ <i>cp copyme copiedme</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):729 +msgid "" +"Upon investigation, we find that they are truly separate files; their inode " +"numbers are different:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):733 +msgid "Checking inode differences" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):733 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -i copyme copiedme</i>\n" +" 648284 copiedme 650704 copyme\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):741 +msgid "mv" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):744 +msgid "" +"Now, let's use the mv command to rename \"copiedme\" to \"movedme\". The " +"inode number will remain the same; however, the filename that points to the " +"inode will change." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):750 +msgid "Renaming a file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):750 +#, no-wrap +msgid "" +"\n" +"$ <i>mv copiedme movedme</i>\n" +"$ <i>ls -i movedme</i>\n" +" 648284 movedme\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):756 +msgid "" +"A moved file's inode number will remain the same as long as the destination " +"file resides on the same file system as the source file. We'll take a closer " +"look at file systems in Part 3 of this tutorial series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):762 +msgid "" +"While we're talking about mv, let's look at another way to use this command. " +"mv, in addition to allowing us to rename files, also allows us to move one " +"or more files to another location in the directory hierarchy. For example, " +"to move <path>/var/tmp/myfile.txt</path> to <path>/home/drobbins</path> " +"(which happens to be my home directory,) I could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):770 +msgid "Moving a file to a different location" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):770 +#, no-wrap +msgid "" +"\n" +"$ <i>mv /var/tmp/myfile.txt /home/drobbins</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):774 +msgid "" +"After typing this command, myfile.txt will be moved to <path>/home/drobbins/" +"myfile.txt</path>. And if <path>/home/drobbins</path> is on a different file " +"system than <path>/var/tmp</path>, the mv command will handle the copying of " +"myfile.txt to the new file system and erasing it from the old file system. " +"As you might guess, when myfile.txt is moved between file systems, the " +"myfile.txt at the new location will have a new inode number. This is because " +"every file system has its own independent set of inode numbers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):784 +msgid "" +"We can also use the mv command to move multiple files to a single " +"destination directory. For example, to move myfile1.txt and myarticle3.txt " +"to /home/drobbins, I could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):790 +msgid "Moving multiple files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):790 +#, no-wrap +msgid "" +"\n" +"$ <i>mv /var/tmp/myfile1.txt /var/tmp/myarticle3.txt /home/drobbins</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):798 +msgid "Creating Links and Removing Files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):800 +msgid "Hard links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):803 +msgid "" +"We've mentioned the term \"link\" when referring to the relationship between " +"directory entries (the \"names\" we type) and inodes (the index numbers on " +"the underlying file system that we can usually ignore.) There are actually " +"two kinds of links available on Linux. The kind we've discussed so far are " +"called <e>hard links</e>. A given inode can have any number of hard links, " +"and the inode will persist on the file system until the all the hard links " +"disappear. When the last hard link disappears and no program is holding the " +"file open, Linux will delete the file automatically. New hard links can be " +"created using the <c>ln</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):815 +msgid "Linking files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):815 +#, no-wrap +msgid "" +"\n" +"$ <i>cd /tmp</i>\n" +"$ <i>touch firstlink</i>\n" +"$ <i>ln firstlink secondlink</i>\n" +"$ <i>ls -i firstlink secondlink</i>\n" +" 15782 firstlink 15782 secondlink\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):823 +msgid "" +"As you can see, hard links work on the inode level to point to a particular " +"file. On Linux systems, hard links have several limitations. For one, you " +"can only make hard links to files, not directories. That's right; even " +"though . and .. are system-created hard links to directories, you (even as " +"the \"root\" user) aren't allowed to create any of your own. The second " +"limitation of hard links is that they can't span file systems. This means " +"that you can't create a link from /usr/bin/bash to /bin/bash if your / and /" +"usr directories exist on separate file systems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):837 +msgid "Symbolic links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):840 +msgid "" +"In practice, symbolic links (or <e>symlinks</e>) are used more often than " +"hard links. Symlinks are a special file type where the link refers to " +"another file by name, rather than directly to the inode. Symlinks do not " +"prevent a file from being deleted; if the target file disappears, then the " +"symlink will just be unusable, or broken." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):848 +msgid "A symbolic link can be created by passing the -s option to ln." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):852 +msgid "Viewing symbolic links" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):852 +#, no-wrap +msgid "" +"\n" +"$ ln -s secondlink thirdlink\n" +"$ ls -l firstlink secondlink thirdlink\n" +"-rw-rw-r-- 2 agriffis agriffis 0 Dec 31 19:08 firstlink\n" +"-rw-rw-r-- 2 agriffis agriffis 0 Dec 31 19:08 secondlink\n" +"lrwxrwxrwx 1 agriffis agriffis 10 Dec 31 19:39 thirdlink -> secondlink\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):860 +msgid "" +"Symbolic links can be distinguished in <c>ls -l</c> output from normal files " +"in three ways. First, notice that the first column contains an l character " +"to signify the symbolic link. Second, the size of the symbolic link is the " +"number of characters in the target (<c>secondlink</c>, in this case). Third, " +"the last column of the output displays the target filename preceded by a " +"cute little ->." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):871 +msgid "Symlinks in-depth" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):874 +msgid "" +"Symbolic links are generally more flexible than hard links. You can create a " +"symbolic link to any type of file system object, including directories. And " +"because the implementation of symbolic links is based on paths (not inodes), " +"it's perfectly fine to create a symbolic link that points to an object on " +"another physical file system. However, this fact can also make symbolic " +"links tricky to understand." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):883 +msgid "" +"Consider a situation where we want to create a link in /tmp that points to /" +"usr/local/bin. Should we type this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):888 +msgid "Linking directories, first attempt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):888 +#, no-wrap +msgid "" +"\n" +"$ <i>ln -s /usr/local/bin bin1</i>\n" +"$ <i>ls -l bin1</i>\n" +"lrwxrwxrwx 1 root root 14 Jan 1 15:42 bin1 -> /usr/local/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):894 +msgid "Or alternatively:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):898 +msgid "Linking directories, second attempt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):898 +#, no-wrap +msgid "" +"\n" +"$ <i>ln -s ../usr/local/bin bin2</i>\n" +"$ <i>ls -l bin2</i>\n" +"lrwxrwxrwx 1 root root 16 Jan 1 15:43 bin2 -> ../usr/local/bin\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):904 +msgid "" +"As you can see, both symbolic links point to the same directory. However, if " +"our second symbolic link is ever moved to another directory, it will be " +"\"broken\" because of the relative path:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):910 +msgid "Breaking a symbolic link" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):910 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -l bin2</i>\n" +"lrwxrwxrwx 1 root root 16 Jan 1 15:43 bin2 -> ../usr/local/bin\n" +"$ <i>mkdir mynewdir</i>\n" +"$ <i>mv bin2 mynewdir</i>\n" +"$ <i>cd mynewdir</i>\n" +"$ <i>cd bin2</i>\n" +"bash: cd: bin2: No such file or directory\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):920 +msgid "" +"Because the directory /tmp/usr/local/bin doesn't exist, we can no longer " +"change directories into bin2; in other words, bin2 is now broken." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):925 +msgid "" +"For this reason, it is sometimes a good idea to avoid creating symbolic " +"links with relative path information. However, there are many cases where " +"relative symbolic links come in handy. Consider an example where you want to " +"create an alternate name for a program in /usr/bin:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):932 +msgid "Viewing file information for keychain" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):932 +#, no-wrap +msgid "" +"\n" +"# <i>ls -l /usr/bin/keychain</i> \n" +"-rwxr-xr-x 1 root root 10150 Dec 12 20:09 /usr/bin/keychain\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):937 +msgid "" +"As the root user, you may want to create an alternate name for \"keychain\", " +"such as \"kc\". In this example, we have root access, as evidenced by our " +"bash prompt changing to \"#\". We need root access because normal users " +"aren't able to create files in /usr/bin. As root, we could create an " +"alternate name for keychain as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):945 +msgid "Symlinking keychain" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):945 +#, no-wrap +msgid "" +"\n" +"# <i>cd /usr/bin</i>\n" +"# <i>ln -s /usr/bin/keychain kc</i>\n" +"# <i>ls -l keychain</i>\n" +"-rwxr-xr-x 1 root root 10150 Dec 12 20:09 /usr/bin/keychain\n" +"# <i>ls -l kc</i> \n" +"lrwxrwxrwx 1 root root 17 Mar 27 17:44 kc -> /usr/bin/keychain\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):954 +msgid "" +"In this example, we created a symbolic link called kc that points to the " +"file /usr/bin/keychain." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):959 +msgid "" +"While this solution will work, it will create problems if we decide that we " +"want to move both files, /usr/bin/keychain and /usr/bin/kc to /usr/local/bin:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):964 +msgid "Moving the symbolic link" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):964 +#, no-wrap +msgid "" +"\n" +"# <i>mv /usr/bin/keychain /usr/bin/kc /usr/local/bin</i>\n" +"# <i>ls -l /usr/local/bin/keychain</i>\n" +"-rwxr-xr-x 1 root root 10150 Dec 12 20:09 /usr/local/bin/keychain\n" +"# <i>ls -l /usr/local/bin/kc</i>\n" +"lrwxrwxrwx 1 root root 17 Mar 27 17:44 kc -> /usr/bin/keychain\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):972 +msgid "" +"Because we used an absolute path in our symbolic link, our kc symlink is " +"still pointing to /usr/bin/keychain, which no longer exists since we moved /" +"usr/bin/keychain to /usr/local/bin." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):978 +msgid "" +"That means that kc is now a broken symlink. Both relative and absolute paths " +"in symbolic links have their merits, and you should use a type of path " +"that's appropriate for your particular application. Often, either a relative " +"or absolute path will work just fine. The following example would have " +"worked even after both files were moved:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):986 +msgid "Moving files around with symlinks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):986 +#, no-wrap +msgid "" +"\n" +"# <i>cd /usr/bin</i>\n" +"# <i>ln -s keychain kc</i>\n" +"# <i>ls -l kc</i>\n" +"lrwxrwxrwx 1 root root 8 Jan 5 12:40 kc -> keychain\n" +"# <i>mv keychain kc /usr/local/bin</i>\n" +"# <i>ls -l /usr/local/bin/keychain</i>\n" +"-rwxr-xr-x 1 root root 10150 Dec 12 20:09 /usr/local/bin/keychain\n" +"# <i>ls -l /usr/local/bin/kc</i>\n" +"lrwxrwxrwx 1 root root 17 Mar 27 17:44 kc -> keychain\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):998 +msgid "" +"Now, we can run the keychain program by typing /usr/local/bin/kc. /usr/local/" +"bin/kc points to the program keychain in the same directory as kc." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1006 +msgid "rm" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1009 +msgid "" +"Now that we know how to use cp, mv, and ln, it's time to learn how to remove " +"objects from the file system. Normally, this is done with the <c>rm</c> " +"command. To remove files, simply specify them on the command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1015 +msgid "Removing files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1015 +#, no-wrap +msgid "" +"\n" +"$ <i>cd /tmp</i>\n" +"$ <i>touch file1 file2</i>\n" +"$ <i>ls -l file1 file2</i>\n" +"-rw-r--r-- 1 root root 0 Jan 1 16:41 file1\n" +"-rw-r--r-- 1 root root 0 Jan 1 16:41 file2\n" +"$ <i>rm file1 file2</i>\n" +"$ <i>ls -l file1 file2</i>\n" +"ls: file1: No such file or directory\n" +"ls: file2: No such file or directory\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1027 +msgid "" +"Note that under Linux, once a file is rm'ed, it's typically gone forever. " +"For this reason, many junior system administrators will use the -i option " +"when removing files. The -i option tells rm to remove all files in " +"interactive mode -- that is, prompt before removing any file. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1034 +msgid "Removing files and ask for confirmation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1034 +#, no-wrap +msgid "" +"\n" +"$ <i>rm -i file1 file2</i>\n" +"rm: remove regular empty file `file1'? y\n" +"rm: remove regular empty file `file2'? y\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1040 +msgid "" +"In the above example, the rm command prompted whether or not the specified " +"files should *really* be deleted. In order for them to be deleted, I had to " +"type \"y\" and Enter twice. If I had typed \"n\", the file would not have " +"been removed. Or, if I had done something really wrong, I could have typed " +"Control-C to abort the rm -i command entirely -- all before it is able to do " +"any potential damage to my system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1049 +msgid "" +"If you are still getting used to the rm command, it can be useful to add the " +"following line to your ~/.bashrc file using your favorite text editor, and " +"then log out and log back in. Then, any time you type rm, the bash shell " +"will convert it automatically to an rm -i command. That way, rm will always " +"work in interactive mode:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1057 +msgid "Setting the 'rm -i' alias" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1064 +msgid "rmdir" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1067 +msgid "" +"To remove directories, you have two options. You can remove all the objects " +"inside the directory and then use <c>rmdir</c> to remove the directory " +"itself:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1072 +msgid "Removing directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1072 +#, no-wrap +msgid "" +"\n" +"$ <i>mkdir mydir</i>\n" +"$ <i>touch mydir/file1</i>\n" +"$ <i>rm mydir/file1</i>\n" +"$ <i>rmdir mydir</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1079 +msgid "" +"This method is commonly referred to as \"directory removal for suckers.\" " +"All real power users and administrators worth their salt use the much more " +"convenient <c>rm -rf</c> command, covered next." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1085 +msgid "" +"The best way to remove a directory is to use the <e>recursive force</e> " +"options of the rm command to tell rm to remove the directory you specify, as " +"well as all objects contained in the directory:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1091 +msgid "Removing a complete directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1091 +#, no-wrap +msgid "" +"\n" +"$ <i>rm -rf mydir</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1095 +msgid "" +"Generally, rm -rf is the preferred method of removing a directory tree. Be " +"very careful when using rm -rf, since its power can be used for both good " +"and evil :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1104 +msgid "Using Wild cards" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1106 +msgid "Introducing Wild cards" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1109 +msgid "" +"In your day-to-day Linux use, there are many times when you may need to " +"perform a single operation (such as rm) on many file system objects at once. " +"In these situations, it can often be cumbersome to type in many files on the " +"command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1115 +msgid "Removing individual files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1115 +#, no-wrap +msgid "" +"\n" +"$ <i>rm file1 file2 file3 file4 file5 file6 file7 file8</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1119 +msgid "" +"To solve this problem, you can take advantage of Linux' built-in wild card " +"support. This support, also called \"globbing\" (for historical reasons), " +"allows you to specify multiple files at once by using a <e>wildcat pattern</" +"e>. Bash and other Linux commands will interpret this pattern by looking on " +"disk and finding any files that match it. So, if you had files file1 through " +"file8 in the current working directory, you could remove these files by " +"typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1129 +msgid "Removing files using shell completion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1129 +#, no-wrap +msgid "" +"\n" +"$ <i>rm file[1-8]</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1133 +msgid "" +"Or if you simply wanted to remove all files whose names begin with file as " +"well as any file named file, you could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1138 +msgid "Removing files using shell completion with the * glob" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1138 +#, no-wrap +msgid "" +"\n" +"$ <i>rm file*</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1142 +msgid "" +"The * wildcat matches any character or sequence of characters, or even \"no " +"character.\" Of course, glob wildcards can be used for more than simply " +"removing files, as we'll see in the next panel." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1151 +msgid "Understanding non-matches" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1154 +msgid "" +"If you wanted to list all the file system objects in /etc beginning with g " +"as well as any file called g, you could type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1159 +msgid "Example use of the * glob" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1159 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -d /etc/g*</i>\n" +"/etc/gconf /etc/ggi /etc/gimp /etc/gnome /etc/gnome-vfs-mime-magic /etc/gpm /etc/group /etc/group-\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1164 +msgid "" +"Now, what happens if you specify a pattern that doesn't match any file " +"system objects? In the following example, we try to list all the files in /" +"usr/bin that begin with asdf and end with jkl, including potentially the " +"file asdfjkl:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1170 +msgid "Another example of the * glob" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1170 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -d /usr/bin/asdf*jkl</i>\n" +"ls: /usr/bin/asdf*jkl: No such file or directory\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1175 +msgid "" +"Here's what happened. Normally, when we specify a pattern, that pattern " +"matches one or more files on the underlying file system, and <e>bash " +"replaces the pattern with a space-separated list of all matching objects</" +"e>. However, when the pattern doesn't produce any matches, <e>bash leaves " +"the argument, wild cards and all, as-is</e>. So, then ls can't find the " +"file /usr/bin/asdf*jkl and it gives us an error. The operative rule here is " +"that <e>glob patterns are expanded only if they match objects in the file " +"system</e>. Otherwise they remain as is and are passed literally to the " +"program you're calling." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1189 +msgid "Wild card syntax: * and ?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1192 +msgid "" +"Now that we've seen how globbing works, we should look at wild card syntax. " +"You can use special characters for wild card expansion:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1197 +msgid "" +"* will match zero or more characters. It means \"anything can go here, " +"including nothing\". Examples:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1203 +msgid "" +"/etc/g* matches all files in /etc that begin with g, or a file called g." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1206 +msgid "" +"/tmp/my*1 matches all files in /tmp that begin with my and end with 1, " +"including the file my1." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1212 +msgid "? matches any single character. Examples:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1217 +msgid "" +"myfile? matches any file whose name consists of myfile followed by a single " +"character" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1221 +msgid "" +"/tmp/notes?txt would match both /tmp/notes.txt and /tmp/notes_txt, if they " +"exist" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1230 +msgid "Wild card syntax: []" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1233 +msgid "" +"This wild card is like a ?, but it allows more specificity. To use this wild " +"card, place any characters you'd like to match inside the []. The resultant " +"expression will match a single occurrence of any of these characters. You " +"can also use - to specify a range, and even combine ranges. Examples:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1241 +msgid "" +"myfile[12] will match myfile1 and myfile2. The wild card will be expanded as " +"long as at least one of these files exists in the current directory." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1245 +msgid "" +"[Cc]hange[Ll]og will match Changelog, ChangeLog, changeLog, and changelog. " +"As you can see, using bracket wild cards can be useful for matching " +"variations in capitalization." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1250 +msgid "ls /etc/[0-9]* will list all files in /etc that begin with a number." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1253 +msgid "" +"ls /tmp/[A-Za-z]* will list all files in /tmp that begin with an upper or " +"lower-case letter." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1259 +msgid "" +"The [!] construct is similar to the [] construct, except rather than " +"matching any characters inside the brackets, it'll match any character, as " +"long as it is not listed between the [! and ]. Example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(li):1266 +msgid "" +"rm myfile[!9] will remove all files named myfile plus a single character, " +"except for myfile9" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1275 +msgid "Wild card caveats" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1278 +msgid "" +"Here are some caveats to watch out for when using wild cards. Since bash " +"treats wild card-related characters (?, [, ], and *) specially, you need to " +"take special care when typing in an argument to a command that contains " +"these characters. For example, if you want to create a file that contains " +"the string [fo]*, the following command may not do what you want:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1286 +msgid "Wrong use of special characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1286 +#, no-wrap +msgid "" +"\n" +"$ <i>echo [fo]* > /tmp/mynewfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1290 +msgid "" +"If the pattern [fo]* matches any files in the current working directory, " +"then you'll find the names of those files inside /tmp/mynewfile.txt rather " +"than a literal [fo]* like you were expecting. The solution? Well, one " +"approach is to surround your characters with single quotes, which tell bash " +"to perform absolutely no wild card expansion on them:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1298 +msgid "Escaping special characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1298 +#, no-wrap +msgid "" +"\n" +"$ <i>echo '[fo]*' > /tmp/mynewfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1302 +msgid "" +"Using this approach, your new file will contain a literal [fo]* as expected. " +"Alternatively, you could use backslash escaping to tell bash that [, ], and " +"* should be treated literally rather than as wild cards:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre:caption):1308 +msgid "Escapting special characters, second possibility" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(pre):1308 +#, no-wrap +msgid "" +"\n" +"$ <i>echo \\[fo\\]\\* > /tmp/mynewfile.txt</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1312 +msgid "" +"Both approaches (single quotes and backslash escaping) have the same effect. " +"Since we're talking about backslash expansion, now would be a good time to " +"mention that in order to specify a literal \\, you can either enclose it in " +"single quotes as well, or type \\\\ instead (it will be expanded to \\)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(note):1319 +msgid "" +"Double quotes will work similarly to single quotes, but will still allow " +"bash to do some limited expansion. Therefore, single quotes are your best " +"bet when you are truly interested in passing literal text to a command. For " +"more information on wild card expansion, type <c>man 7 glob</c>. For more " +"information on quoting in bash, type <c>man 8 glob</c> and read the section " +"titled QUOTING. If you're planning to take the LPI exams, consider this a " +"homework assignment :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1333 +msgid "Summary and Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1335 +msgid "Summary" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1338 +msgid "" +"Congratulations; you've reached the end of our review of Linux fundamentals! " +"I hope that it has helped you to firm up your foundational Linux knowledge. " +"The topics you've learned here, including the basics of bash, basic Linux " +"commands, links, and wild cards, have laid the groundwork for our next " +"tutorial on basic administration, in which we'll cover topics like regular " +"expressions, ownership and permissions, user account management, and more." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1347 +msgid "" +"By continuing in this tutorial series, you'll soon be ready to attain your " +"LPIC Level 1 Certification from the Linux Professional Institute. Speaking " +"of LPIC certification, if this is something you're interested in, then we " +"recommend that you study the Resources in the next panel, which have been " +"carefully selected to augment the material covered in this tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(title):1358 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1361 +msgid "" +"In the \"Bash by example\" article series on developerWorks, Daniel shows " +"you how to use bash programming constructs to write your own bash scripts. " +"This series (particularly Parts 1 and 2) will be good preparation for the " +"LPIC Level 1 exam:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(uri:link):1369 +msgid "/doc/en/articles/bash-by-example-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(uri):1369 +msgid "" +"Bash by example, Part 1: Fundamental programming in the Bourne-again shell" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(uri:link):1373 +msgid "/doc/en/articles/bash-by-example-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(uri):1373 +msgid "Bash by example, Part 2: More bash programming fundamentals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(uri:link):1377 +msgid "/doc/en/articles/bash-by-example-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(uri):1377 +msgid "Bash by example, Part 3: Exploring the ebuild system" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1382 +msgid "" +"If you're a beginning or intermediate Linux user, you really owe it to " +"yourself to check out the Technical FAQ for Linux users, a 50-page in-depth " +"list of frequently-asked Linux questions, along with detailed answers. The " +"FAQ itself is in PDF (Acrobat) format." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(p):1389 +msgid "" +"If you're not too familiar with the vi editor, see the developerWorks " +"tutorial Intro to vi. This tutorial gives you a gentle yet fast-paced " +"introduction to this powerful text editor. Consider this must-read material " +"if you don't know how to use vi." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-fundamentals-p1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/lpi-101-intermediate-p3.xml.po b/article/gettext/ru/lpi-101-intermediate-p3.xml.po new file mode 100644 index 0000000..43e83cb --- /dev/null +++ b/article/gettext/ru/lpi-101-intermediate-p3.xml.po @@ -0,0 +1,2908 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(guide:link):5 +msgid "/doc/en/articles/lpi-101-intermediate-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):6 +msgid "LPI certification 101 (release 2) exam prep, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(author:title):8 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(author:title):11 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(author:title):14 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(mail:link):12 +msgid "chouser@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(mail):12 +msgid "Chris Houser" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(mail:link):15 +msgid "agriffis@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(mail):15 +msgid "Aron Griffis" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(abstract):18 +msgid "" +"In this tutorial we'll introduce you the Linux system documentation. We will " +"teach you how to change permissions and how to manage with Linux accounts. " +"At the end you'll learn how to tune your enviroment." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(version):29 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(date):30 +msgid "2007-06-20" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):33 +msgid "Before You Start" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):35 +msgid "About this tutorial" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):38 +msgid "" +"Welcome to \"Intermediate administration,\" the third of four tutorials " +"designed to prepare you for the Linux Professional Institute's 101 (release " +"2) exam. This tutorial (Part 3) is ideal for those who want to improve their " +"knowledge of fundamental Linux administration skills. We'll cover a variety " +"of topics, including system and Internet documentation, the Linux " +"permissions model, user account management, and login environment tuning." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):47 +msgid "" +"If you are new to Linux, we recommend that you start with <uri link=\"/doc/" +"en/articles/lpi-101-fundamentals-p1.xml\">Part 1</uri> and <uri link=\"/doc/" +"en/articles/lpi-101-administration-p2.xml\">Part 2</uri>. For some, much of " +"this material will be new, but more experienced Linux users may find this " +"tutorial to be a great way of \"rounding out\" their foundational Linux " +"system administration skills." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):56 +msgid "" +"By the end of this series of tutorials (eight in all covering the LPI 101 " +"and 102 exams), you will have the knowledge you need to become a Linux " +"Systems Administrator and will be ready to attain an LPIC Level 1 " +"certification from the Linux Professional Institute if you so choose." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):63 +msgid "" +"For those who have taken the <uri link=\"http://www-106.ibm.com/" +"developerworks/edu/l-dw-linuxlpi3-i.html\">release 1 version</uri> of this " +"tutorial for reasons other than LPI exam preparation, you probably don't " +"need to take this one. However, if you do plan to take the exams, you should " +"strongly consider reading this revised tutorial." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):74 +msgid "About the authors" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):77 +msgid "" +"For technical questions about the content of this tutorial, contact the " +"authors:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):83 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):2255 +msgid "Daniel Robbins, at <mail>drobbins@gentoo.org</mail>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):84 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):2256 +msgid "Chris Houser, at <mail>chouser@gentoo.org</mail>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):85 +msgid "Aron Griffis, at<mail>agriffis@gentoo.org</mail>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):88 +msgid "" +"Residing in Albuquerque, New Mexico, Daniel Robbins is the Chief Architect " +"of <uri link=\"http://www.gentoo.org/\">Gentoo Linux</uri> an advanced ports-" +"based Linux metadistribution. Besides writing articles, tutorials, and tips " +"for the developerWorks Linux zone and Intel Developer Services, he has also " +"served as a contributing author for several books, including Samba Unleashed " +"and SuSE Linux Unleashed. Daniel enjoys spending time with his wife, Mary, " +"and his daughter, Hadassah. You can contact Daniel at <mail>drobbins@gentoo." +"org</mail>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):98 +msgid "" +"Chris Houser, known to his friends as \"Chouser,\" has been a UNIX proponent " +"since 1994 when he joined the administration team for the computer science " +"network at Taylor University in Indiana, where he earned his Bachelor's " +"degree in Computer Science and Mathematics. Since then, he has gone on to " +"work in Web application programming, user interface design, professional " +"video software support, and now Tru64 UNIX device driver programming at <uri " +"link=\"http://www.compaq.com/\">Compaq</uri>. He has also contributed to " +"various free software projects, most recently to <uri link=\"http://www." +"gentoo.org/\">Gentoo Linux</uri>). He lives with his wife and two cats in " +"New Hampshire. You can contact Chris at <mail>chouser@gentoo.org</mail>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):112 +msgid "" +"Aron Griffis graduated from Taylor University with a degree in Computer " +"Science and an award that proclaimed, \"Future Founder of a Utopian UNIX " +"Commune.\" Working towards that goal, Aron is employed by <uri link=\"http://" +"www.compaq.com/\">Compaq</uri> writing network drivers for Tru64 UNIX, and " +"spending his spare time plunking out tunes on the piano or developing <uri " +"link=\"http://www.gentoo.org/\">Gentoo Linux</uri>. He lives with his wife " +"Amy (also a UNIX engineer) in Nashua, New Hampshire." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):127 +msgid "System and network documentation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):129 +msgid "Types of Linux system documentation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):132 +msgid "" +"There are essentially three sources of documentation on a Linux system: " +"manual pages, info pages, and application-bundled documentation in <path>/" +"usr/share/doc</path>. In this section, we'll explore each of these sources " +"before looking \"outside the box\" for more information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):142 +msgid "Manual pages" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):145 +msgid "" +"Manual pages, or \"man pages\", are the classic form of UNIX and Linux " +"reference documentation. Ideally, you can look up the man page for any " +"command, configuration file, or library routine. In practice, Linux is free " +"software, and some pages haven't been written or are showing their age. " +"Nonetheless, man pages are the first place to look when you need help." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):153 +msgid "" +"To access a man page, simply type <c>man</c> followed by your topic of " +"inquiry. A pager will be started, so you will need to press <c>q</c> when " +"you're done reading. For example, to look up information about the <c>ls</c> " +"command, you would type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):160 +msgid "Searching in man page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):160 +#, no-wrap +msgid "" +"\n" +"$ <i>man ls</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):164 +msgid "" +"Knowing the layout of a man page can be helpful to jump quickly to the " +"information you need. In general, you will find the following sections in a " +"<c>man</c> page:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):172 +msgid "NAME" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):173 +msgid "Name and one-line description of the command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):176 +msgid "SYNOPSIS" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):177 +msgid "How to use the command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):180 +msgid "DESCRIPTION" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):181 +msgid "In-depth discussion on the functionality of the command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):184 +msgid "EXAMPLES" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):185 +msgid "Suggestions for how to use the command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):188 +msgid "SEE ALSO" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):189 +msgid "Related topics (usually man pages)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):196 +msgid "man page sections" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):199 +msgid "" +"The files that comprise manual pages are stored in <path>/usr/share/man</" +"path> (or in <path>/usr/man</path> on some older systems). Inside that " +"directory, you will find that the manual pages are organized into the " +"following sections:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):207 +msgid "man1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):208 +msgid "User programs" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):211 +msgid "man2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):212 +msgid "System calls" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):215 +msgid "man3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):216 +msgid "Library functions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):219 +msgid "man4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):220 +msgid "Special files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):223 +msgid "man5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):224 +msgid "File formats" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):227 +msgid "man6" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):228 +msgid "Games" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):231 +msgid "man7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):232 +msgid "Miscellaneous" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):239 +msgid "Multiple man pages" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):242 +msgid "" +"Some topics exist in more than one section. To demonstrate this, let's use " +"the <c>whatis</c> command, which shows all the available man pages for a " +"topic:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):247 +msgid "Using whatis command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):247 +#, no-wrap +msgid "" +"\n" +"$ <i>whatis printf</i>\n" +"printf (1) - format and print data\n" +"printf (3) - formatted output conversion\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):253 +msgid "" +"In this case, <c>man printf</c> would default to the page in section 1 " +"(\"User Programs\"). If we were writing a C program, we might be more " +"interested in the page from section 3 (\"Library functions\"). You can call " +"up a man page from a certain section by specifying it on the command line, " +"so to ask for <e>printf(3)</e>, we would type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):261 +msgid "Specifying section in man command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):261 +#, no-wrap +msgid "" +"\n" +"$ <i>man 3 printf</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):268 +msgid "Finding the right man page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):271 +msgid "" +"Sometimes it's hard to find the right man page for a given topic. In that " +"case, you might try using <c>man -k</c> to search the NAME section of the " +"man pages. Be warned that it's a substring search, so running something like " +"<c>man -k ls</c> will give you a lot of output! Here's an example using a " +"more specific query:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):279 +msgid "Searching man using man -k command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):279 +#, no-wrap +msgid "" +"\n" +"$ <i>man -k whatis</i>\n" +"apropos (1) - search the whatis database for strings\n" +"makewhatis (8) - Create the whatis database\n" +"whatis (1) - search the whatis database for complete words\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):289 +msgid "All about apropos" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):292 +msgid "" +"The example on the previous panel brings up a few more points. First, the " +"<c>apropos</c> command is exactly equivalent to <c>man -k</c>. (In fact, " +"I'll let you in on a little secret. When you run <c>man -k</c>, it actually " +"runs <c>apropos</c> behind the scenes.) The second point is the " +"<c>makewhatis</c> command, which scans all the man pages on your Linux " +"system and builds the database for <c>whatis</c> and <c>apropos</c>. Usually " +"this is run periodically by root to keep the database updated:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):302 +msgid "Building whatis and apropos database" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):302 +#, no-wrap +msgid "" +"\n" +"# <i>makewhatis</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):306 +msgid "" +"For more information on \"man\" and friends, you should start with its man " +"page:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):310 +msgid "Starting man page for man" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):310 +#, no-wrap +msgid "" +"\n" +"$ <i>man man</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):317 +msgid "The MANPATH" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):320 +msgid "" +"By default, the <c>man</c> program will look for man pages in <path>/usr/" +"share/man</path>, <path>/usr/local/man</path>, <path>/usr/X11R6/man</path>, " +"and possibly <path>/opt/man</path>. Sometimes, you may find that you need to " +"add an additional item to this search path. If so, simply edit <path>/etc/" +"man.conf</path> in a text editor and add a line that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):329 +msgid "/etc/man.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):329 +#, no-wrap +msgid "" +"\n" +"MANPATH /opt/man\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):333 +msgid "" +"From that point forward, any man pages in the <path>/opt/man/man*</path> " +"directories will be found. Remember that you'll need to rerun <c>makewhatis</" +"c> to add these new man pages to the whatis database." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):342 +msgid "GNU info" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):345 +msgid "" +"One shortcoming of man pages is that they don't support hypertext, so you " +"can't jump easily from one to another. The GNU folks recognized this " +"shortcoming, so they invented another documentation format: \"info\" pages. " +"Many of the GNU programs come with extensive documentation in the form of " +"info pages. You can start reading info pages with the <c>info</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):353 +msgid "Using info command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):353 +#, no-wrap +msgid "" +"\n" +"$ <i>info</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):357 +msgid "" +"Calling <c>info</c> in this way will bring up an index of the available " +"pages on the system. You can move around with the arrow keys, follow links " +"(indicated with a star) using the Enter key, and quit by pressing <c>q</c>. " +"The keys are based on Emacs, so you should be able to navigate easily if " +"you're familiar with that editor. For an intro to the Emacs editor, see the " +"developerWorks tutorial, <uri link=\"http://www-106.ibm.com/developerworks/" +"edu/l-dw-linuxemacs-i.html\">Living in Emacs</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):368 +msgid "You can also specify an info page on the command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):372 +msgid "Specifying info command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):372 +#, no-wrap +msgid "" +"\n" +"$ <i>info diff</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):376 +msgid "" +"For more information on using the <c>info</c> reader, try reading its info " +"page. You should be able to navigate primitively using the few keys I've " +"already mentioned:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):382 +msgid "Reading info info page" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):382 +#, no-wrap +msgid "" +"\n" +"$ <i>info info</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):389 +msgid "/usr/share/doc" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):392 +msgid "" +"There is a final source for help within your Linux system. Many programs are " +"shipped with additional documentation in other formats: text, PDF, " +"PostScript, HTML, to name a few. Take a look in <path>usr/share/doc</path> " +"(or <path>/usr/doc</path> on older systems). You'll find a long list of " +"directories, each of which came with a certain application on your system. " +"Searching through this documentation can often reveal some gems that aren't " +"available as man pages or info pages, such as tutorials or additional " +"technical documentation. A quick check reveals there's a lot of reading " +"material available:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):404 +msgid "/usr/share/doc/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):404 +#, no-wrap +msgid "" +"\n" +"$ <i>cd /usr/share/doc</i>\n" +"$ <i>find . -type f | wc -l</i>\n" +"7582\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):410 +msgid "" +"Whew! Your homework this evening is to read just half (3791) of those " +"documents. Expect a quiz tomorrow. ;-)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):418 +msgid "The Linux Documentation Project" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):421 +msgid "" +"In addition to system documentation, there are a number of excellent Linux " +"resources on the Internet. The <uri link=\"http://www.tldp.org/\">Linux " +"Documentation Project</uri> is a group of volunteers who are working on " +"putting together the complete set of free Linux documentation. This project " +"exists to consolidate various pieces of Linux documentation into a location " +"that is easy to search and use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):433 +msgid "An LDP overview" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):436 +msgid "The LDP is made up of the following areas:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):441 +msgid "" +"Guides - longer, more in-depth books, such as <uri link=\"http://www.tldp." +"org/LDP/lpg/index.html\">The Linux Programmer's Guide</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):446 +msgid "" +"HOWTOs - subject-specific help, such as the <uri link=\"http://www.tldp.org/" +"HOWTO/DSL-HOWTO/index.html\">DSL HOWTO</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):450 +msgid "" +"FAQs - Frequently Asked Questions with answers, such as the <uri link=" +"\"http://www.tldp.org/FAQ/faqs/BLFAQ\">Brief Linux FAQ</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):454 +msgid "" +"Man pages - help on individual commands (these are the same manual pages you " +"get on your Linux system when you use the <c>man</c> command)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):460 +msgid "" +"If you aren't sure which section to peruse, you can take advantage of the " +"search box, which allows you to find things by topic." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):465 +msgid "" +"The LDP additionally provides a list of Links and Resources such as <uri " +"link=\"http://www.tldp.org/LDP/LG/current/\">Linux Gazette</uri> (see links " +"in <uri link=\"#resources\">Resources</uri>) and <uri link=\"http://www.tldp." +"org/linuxfocus/index.html\">LinuxFocus</uri>, as well links to mailing lists " +"and news archives." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):476 +msgid "Mailing lists" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):479 +msgid "" +"Mailing lists provide probably the most important point of collaboration for " +"Linux developers. Often projects are developed by contributors who live far " +"apart, possibly even on opposite sides of the globe. Mailing lists provide a " +"method for each developer on a project to contact all the others, and to " +"hold group discussions via e-mail. One of the most famous development " +"mailing lists is the <uri link=\"http://www.tux.org/lkml/\">Linux Kernel " +"Mailing List</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):491 +msgid "More about mailing lists" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):494 +msgid "" +"In addition to development, mailing lists can provide a method for asking " +"questions and receiving answers from knowledgeable developers, or even other " +"users. For example, individual distributions often provide mailing lists for " +"newcomers. You can check your distribution's Web site for information on the " +"mailing lists it provides." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):502 +msgid "" +"If you took the time to read the LKML FAQ at the link on the previous panel, " +"you might have noticed that mailing list subscribers often don't take kindly " +"to questions being asked repeatedly. It's always wise to search the archives " +"for a given mailing list before writing your question. Chances are, it will " +"save you time, too!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):513 +msgid "Newsgroups" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):516 +msgid "" +"Internet \"newsgroups\" are similar to mailing lists, but are based on a " +"protocol called NNTP (\"Network News Transfer Protocol\") instead of e-mail. " +"To participate, you need to use an NNTP client such as <c>slrn</c> or " +"<c>pan</c>. The primary advantage is that you only take part in the " +"discussion when you want, instead of having it continually arrive in your " +"inbox. :-)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):524 +msgid "" +"The newsgroups of primary interest start with comp.os.linux. You can browse " +"the <uri link=\"http://www.tldp.org/links/#ng\">list on the LDP site</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):529 +msgid "" +"As with mailing lists, newsgroup discussion is often archived. A popular " +"newsgroup archiving site is <uri link=\"http://groups.google.com/" +"googlegroups/deja_announcement.html\">Deja News</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):539 +msgid "Vendor and third-party Web sites" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):542 +msgid "" +"Web sites for the various Linux distributions often provide updated " +"documentation, installation instructions, hardware compatibility/" +"incompatibility statements, and other support such as a knowledge base " +"search tool. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):550 +msgid "http://www.redhat.com/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):550 +msgid "Redhat Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):551 +msgid "http://www.debian.org/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):551 +msgid "Debian Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):552 +msgid "http://www.gentoo.org/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):552 +msgid "Gentoo Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):553 +msgid "http://www.suse.com/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):553 +msgid "SuSE Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):554 +msgid "http://www.caldera.com/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):554 +msgid "Caldera" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):555 +msgid "http://www.turbolinux.com/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):555 +msgid "Turbolinux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):561 +msgid "Hardware and software vendors" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):564 +msgid "" +"Many hardware and software vendors have added Linux support to their " +"products in recent years. At their sites, you can find information about " +"which hardware supports Linux, software development tools, released sources, " +"downloads of Linux drivers for specific hardware, and other special Linux " +"projects. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):573 +msgid "http://www.ibm.com/linux/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):573 +msgid "IBM and Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):575 +msgid "http://www.compaq.com/products/software/linux/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):575 +msgid "Compaq and Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):579 +msgid "http://www.sgi.com/developers/technology/linux/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):579 +msgid "SGI and Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):582 +msgid "http://www.hp.com/products1/linux/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):582 +msgid "HP and Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):583 +msgid "http://www.sun.com/linux/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):583 +msgid "Sun and Linux" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):584 +msgid "" +"<uri link=\"http://technet.oracle.com/tech/linux/content.html\">Oracle and " +"Linux</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):593 +msgid "Developer resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):596 +msgid "" +"In addition, many hardware and software vendors have developed wonderful " +"resources for Linux developers and administrators. At the risk of sounding " +"self-promoting, one of the most valuable Linux resources run by a hardware/" +"software vendor is the <uri link=\"http://www.ibm.com/developerworks/linux/" +"\">IBM developerWorks Linux zone</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):610 +msgid "The Linux permissions model" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):612 +msgid "One user, one group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):615 +msgid "" +"In this section, we'll take a look at the Linux permissions and ownership " +"model. We've already seen that every file is owned by one user and one " +"group. This is the very core of the permissions model in Linux. You can view " +"the user and group of a file in a <c>ls -l</c> listing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):622 +msgid "Listing files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):622 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):645 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):672 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -l /bin/bash</i>\n" +"-rwxr-xr-x 1 root wheel 430540 Dec 23 18:27 /bin/bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):627 +msgid "" +"In this particular example, the <path>/bin/bash</path> executable is owned " +"by root and is in the wheel group. The Linux permissions model works by " +"allowing three independent levels of permission to be set for each " +"filesystem object -- those for the file's owner, the file's group, and all " +"other users." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):637 +msgid "Understanding \"ls -l\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):640 +msgid "" +"Let's take a look at our <c>ls -l</c> output and inspect the first column of " +"the listing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):645 +msgid "Inspecting ls -l command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):650 +msgid "" +"This first field <e>-rwxr-xr-</e> contains a symbolic representation of this " +"particular files' permissions. The first character (-) in this field " +"specifies the type of this file, which in this case is a regular file. Other " +"possible first characters:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):657 +msgid "First characters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):657 +#, no-wrap +msgid "" +"\n" +"'d' directory\n" +"'l' symbolic link\n" +"'c' character special device \n" +"'b' block special device\n" +"'p' fifo\n" +"'s' socket\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):669 +msgid "Three triplets" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):672 +msgid "ls -l /bin/bash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):677 +msgid "" +"The rest of the field consists of three character triplets. The first " +"triplet represents permissions for the owner of the file, the second " +"represents permissions for the file's group, and the third represents " +"permissions for all other users:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):684 +msgid "Triplets in ls -l command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):684 +#, no-wrap +msgid "" +"\n" +"\"rwx\"\n" +"\"r-x\"\n" +"\"r-x\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):690 +msgid "" +"Above, the r means that reading (looking at the data in the file) is " +"allowed, the w means that writing (modifying the file, as well as deletion) " +"is allowed, and the x means that \"execute\" (running the program) is " +"allowed. Putting together all this information, we can see that everyone is " +"able to read the contents of and execute this file, but only the owner " +"(root) is allowed to modify this file in any way. So, while normal users can " +"copy this file, only root is allowed to update it or delete it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):703 +msgid "Who am I?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):706 +msgid "" +"Before we take a look at how to change the user and group ownership of a " +"file, let's first take a look at how to learn your current user id and group " +"membership. Unless you've used the <c>su</c> command recently, your current " +"user id is the one you used to log in to the system. If you use <c>su</c> " +"frequently, however, you may not remember your current effective user id. To " +"view it, type <c>whoami</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):715 +msgid "Using whoami command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):715 +#, no-wrap +msgid "" +"\n" +"# <i>whoami</i>\n" +"root\n" +"# <i>su drobbins</i>\n" +"$ <i>whoami</i>\n" +"drobbins\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):726 +msgid "What groups am I in?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):729 +msgid "To see what groups you belong to, use the <c>groups</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):733 +msgid "Using groups command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):733 +#, no-wrap +msgid "" +"\n" +"$ <i>groups</i>\n" +"drobbins wheel audio\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):738 +msgid "" +"In the above example, I'm a member of the drobbins, wheel, and audio groups. " +"If you want to see what groups other user(s) are in, specify their usernames " +"as arguments:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):744 +msgid "Specifying user argument" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):744 +#, no-wrap +msgid "" +"\n" +"$ <i>groups root daemon</i>\n" +"root : root bin daemon sys adm disk wheel floppy dialout tape video\n" +"daemon : daemon bin adm\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):753 +msgid "Changing user and group ownership" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):756 +msgid "" +"To change the owner or group of a file or other filesystem object, use " +"<c>chown</c> or <c>chgrp</c>, respectively. Each of these commands takes a " +"name followed by one or more filenames." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):762 +msgid "Using chown and chgrp commands" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):762 +#, no-wrap +msgid "" +"\n" +"# <i>chown root /etc/passwd</i>\n" +"# <i>chgrp wheel /etc/passwd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):767 +msgid "" +"You can also set the owner and group simultaneously with an alternate form " +"of the <c>chown</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):772 +msgid "Setting owner and group simultaneously" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):772 +#, no-wrap +msgid "" +"\n" +"# <i>chown root:wheel /etc/passwd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):776 +msgid "" +"You may not use <c>chown</c> unless you are the superuser, but <c>chgrp</c> " +"can be used by anyone to change the group ownership of a file to a group to " +"which they belong." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):785 +msgid "Recursive ownership changes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):788 +msgid "" +"Both <c>chown</c> and <c>chgrp</c> have a -R option that can be used to tell " +"them to recursively apply ownership and group changes to an entire directory " +"tree. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):794 +msgid "Using chown and chgrp with -R option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):794 +#, no-wrap +msgid "" +"\n" +"# <i>chown -R drobbins /home/drobbins</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):801 +msgid "Introducing chmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):804 +msgid "" +"<c>chown</c> and <c>chgrp</c> can be used to change the owner and group of a " +"filesystem object, but another program -- called <c>chmod</c> -- is used to " +"change the rwx permissions that we can see in an <c>ls -l</c> listing. " +"<c>chmod</c> takes two or more arguments: a \"mode\", describing how the " +"permissions should be changed, followed by a file or list of files that " +"should be affected:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):813 +msgid "Adding x permission with chmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):813 +#, no-wrap +msgid "" +"\n" +"$ <i>chmod +x scriptfile.sh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):817 +msgid "" +"In the above example, our \"mode\" is +x. As you might guess, a +x mode " +"tells <c>chmod</c> to make this particular file executable for both the user " +"and group and for anyone else." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):823 +msgid "If we wanted to remove all execute permissions of a file, we'd do this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):827 +msgid "Removing x permission with chmod" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):827 +#, no-wrap +msgid "" +"\n" +"$ <i>chmod -x scriptfile.sh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):834 +msgid "User/group/other granularity" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):837 +msgid "" +"So far, our <c>chmod</c> examples have affected permissions for all three " +"triplets -- the user, the group, and all others. Often, it's handy to modify " +"only one or two triplets at a time. To do this, simply specify the symbolic " +"character for the particular triplets you'd like to modify before the + or - " +"sign. Use u for the \"user\" triplet, g for the \"group\" triplet, and o for " +"the \"other/everyone\" triplet:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):846 +msgid "Using triplets" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):846 +#, no-wrap +msgid "" +"\n" +"$ <i>chmod go-w scriptfile.sh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):850 +msgid "" +"We just removed write permissions for the group and all other users, but " +"left \"owner\" permissions untouched." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):858 +msgid "Resetting permissions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):861 +msgid "" +"In addition to flipping permission bits on and off, we can also reset them " +"altogether. By using the = operator, we can tell <c>chmod</c> that we want " +"the specified permissions and no others:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):867 +msgid "Flipping permission bits" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):867 +#, no-wrap +msgid "" +"\n" +"$ <i>chmod =rx scriptfile.sh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):871 +msgid "" +"Above, we just set all \"read\" and \"execute\" bits, and unset all \"write" +"\" bits. If you just want to reset a particular triplet, you can specify the " +"symbolic name for the triplet before the = as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):877 +msgid "Reseting triplet" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):877 +#, no-wrap +msgid "" +"\n" +"$ <i>chmod u=rx scriptfile.sh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):884 +msgid "Numeric modes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):887 +msgid "" +"Up until now, we've used what are called symbolic modes to specify " +"permission changes to <c>chmod</c>. However, there's another common way of " +"specifying permissions: using a 4-digit octal number. Using this syntax, " +"called numeric permissions syntax, each digit represents a permissions " +"triplet. For example, in 1777, the 777 sets the \"owner\", \"group\", and " +"\"other\" flags that we've been discussing in this section. The 1 is used to " +"set the special permissions bits, which we'll cover later (see \"<uri link=" +"\"https://www6.software.ibm.com/developerworks/education/l-lpir23/l-" +"lpir23-3-23.html\">The elusive first digit</uri>\" at the end of this " +"section). This chart shows how the second through fourth digits (777) are " +"interpreted:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):902 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1005 +msgid "Mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):903 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1006 +msgid "Digit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):906 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1009 +msgid "rwx" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):907 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1010 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1268 +msgid "7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):910 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1013 +msgid "rw-" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):911 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1014 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1274 +msgid "6" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):914 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1017 +msgid "r-x" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):915 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1018 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1280 +msgid "5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):918 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1021 +msgid "r--" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):919 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1022 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1286 +msgid "4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):922 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1025 +msgid "-wx" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):923 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1026 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1292 +msgid "3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):926 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1029 +msgid "-w-" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):927 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1030 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1298 +msgid "2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):930 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1033 +msgid "--x" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):931 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1034 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1304 +msgid "1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):934 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1037 +msgid "---" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):935 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1038 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1310 +msgid "0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):942 +msgid "Numeric permission syntax" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):945 +msgid "" +"Numeric permission syntax is especially useful when you need to specify all " +"permissions for a file, such as in the following example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):950 +msgid "Adding numeric permission" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):950 +#, no-wrap +msgid "" +"\n" +"$ <i>chmod 0755 scriptfile.sh</i>\n" +"$ <i>ls -l scriptfile.sh</i>\n" +"-rwxr-xr-x 1 drobbins drobbins 0 Jan 9 17:44 scriptfile.sh\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):956 +msgid "" +"In this example, we used a mode of 0755, which expands to a complete " +"permissions setting of -rwxr-xr-x." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):964 +msgid "The umask" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):967 +msgid "" +"When a process creates a new file, it specifies the permissions that it " +"would like the new file to have. Often, the mode requested is 0666 (readable " +"and writable by everyone), which is more permissive that we would like. " +"Fortunately, Linux consults something called a \"umask\" whenever a new file " +"is created. The system uses the umask value to reduce the originally " +"specified permissions to something more reasonable and secure. You can view " +"your current umask setting by typing umask at the command line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):977 +msgid "Viewing current umask" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):977 +#, no-wrap +msgid "" +"\n" +"$ <i>umask</i>\n" +"0022\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):982 +msgid "" +"On Linux systems, the umask normally defaults to 0022, which allows others " +"to read your new files (if they can get to them) but not modify them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):987 +msgid "" +"To make new files more secure by default, you can change the umask setting:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):991 +msgid "Changing umask setting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):991 +#, no-wrap +msgid "" +"\n" +"$ <i>umask 0077</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):995 +msgid "" +"This umask will make sure that the group and others will have absolutely no " +"permissions for any newly created files. So, how does the umask work? Unlike " +"\"regular\" permissions on files, the umask specifies which permissions " +"should be turned off. Let's consult our mode-to-digit mapping table so that " +"we can understand what a umask of 0077 means:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1042 +msgid "" +"Using our table, the last three digits of 0077 expand to ---rwxrwx. Now, " +"remember that the <c>umask</c> tells the system which permissions to " +"disable. Putting two and two together, we can see that all \"group\" and " +"\"other\" permissions will be turned off, while \"user\" permissions will " +"remain untouched." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1052 +msgid "Introducing suid and sgid" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1055 +msgid "" +"When you initially log in, a new shell process is started. You already know " +"that, but you may not know that this new shell process (typically bash) runs " +"using your user id. As such, the bash program can access all files and " +"directories that you own. In fact, we as users are totally dependent on " +"other programs to perform operations on our behalf. Because the programs you " +"start inherit your user id, they cannot access any filesystem objects for " +"which you haven't been granted access." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1065 +msgid "" +"For example, the passwd file cannot be changed by normal users directly, " +"because the \"write\" flag is off for every user except root:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1070 +msgid "ls -l /etc/passwd" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1070 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -l /etc/passwd</i>\n" +"-rw-r--r-- 1 root wheel 1355 Nov 1 21:16 /etc/passwd\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1075 +msgid "" +"However, normal users do need to be able to modify /etc/passwd (at least " +"indirectly) whenever they need to change their password. But, if the user is " +"unable to modify this file, how exactly does this work?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1084 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1259 +msgid "suid" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1087 +msgid "" +"Thankfully, the Linux permissions model has two special bits called <c>suid</" +"c> and <c>sgid</c>. When an executable program has the <c>suid</c> bit set, " +"it will run on behalf of the owner of the executable, rather than on behalf " +"of the person who started the program." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1094 +msgid "" +"Now, back to the <path>/etc/passwd</path> problem. If we take a look at the " +"<c>passwd</c> executable, we can see that it's owned by root:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1099 +msgid "Checking owner of /usr/bin/passwd file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1099 +#, no-wrap +msgid "" +"\n" +"$ <i>ls -l /usr/bin/passwd</i>\n" +"-rwsr-xr-x 1 root wheel 17588 Sep 24 00:53 /usr/bin/passwd\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1104 +msgid "" +"You'll also note that in place of an x in the user's permission triplet, " +"there's an s. This indicates that, for this particular program, the <c>suid</" +"c> and executable bits are set. Because of this, when <c>passwd</c> runs, it " +"will execute on behalf of the root user (with full superuser access) rather " +"than that of the user who ran it. And because <c>passwd</c> runs with root " +"access, it's able to modify the <path>/etc/passwd</path> file with no " +"problem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1116 +msgid "suid/sgid caveats" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1119 +msgid "" +"We've seen how <c>suid</c> works, and <c>sgid</c> works in a similar way. It " +"allows programs to inherit the group ownership of the program rather than " +"that of the current user." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(impo):1125 +msgid "" +"Here's some miscellaneous yet important information about <c>suid</c> and " +"<c>sgid</c>. First, <c>suid</c> and <c>sgid</c> bits occupy the same space " +"as the x bits in a ls -l listing. If the x bit is also set, the respective " +"bits will show up as s (lowercase). However, if the x bit is not set, it " +"will show up as a S (uppercase)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(impo):1133 +msgid "" +"Another important note: suid and sgid come in handy in many circumstances, " +"but improper use of these bits can allow the security of a system to be " +"breached. It's best to have as few suid programs as possible. The passwd " +"command is one of the few that must be suid." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1143 +msgid "Changing suid and sgid" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1146 +msgid "" +"Setting and removing the <c>suid</c> and <c>sgid</c> bits is fairly " +"straightforward. Here, we set the suid bit:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1151 +msgid "Setting suid bit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1151 +#, no-wrap +msgid "" +"\n" +"# <i>chmod u+s /usr/bin/myapp</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1155 +msgid "" +"And here, we remove the <c>sgid</c> bit from a directory. We'll see how the " +"<c>sgid</c> bit affects directories in just a few panels:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1160 +msgid "Removing sgid bit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1160 +#, no-wrap +msgid "" +"\n" +"# <i>chmod g-s /home/drobbins</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1167 +msgid "Permissions and directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1170 +msgid "" +"So far, we've been looking at permissions from the perspective of regular " +"files. When it comes to directories, things are a bit different. Directories " +"use the same permissions flags, but they are interpreted to mean slightly " +"different things." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1177 +msgid "" +"For a directory, if the \"read\" flag is set, you may list the contents of " +"the directory; \"write\" means you may create files in the directory; and " +"\"execute\" means you may enter the directory and access any sub-directories " +"inside. Without the \"execute\" flag, the filesystem objects inside a " +"directory aren't accessible. Without a \"read\" flag, the filesystem objects " +"inside a directory aren't viewable, but objects inside the directory can " +"still be accessed as long as someone knows the full path to the object on " +"disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1190 +msgid "Directories and sgid" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1193 +msgid "" +"And, if a directory has the \"sgid\" flag enabled, any filesystem objects " +"created inside it will inherit the group of the directory. This particular " +"feature comes in handy when you need to create a directory tree to be used " +"by a group of people that all belong to the same group. Simply do this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1200 +msgid "Creating directory for a group of people" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1200 +#, no-wrap +msgid "" +"\n" +"# <i>mkdir /home/groupspace</i>\n" +"# <i>chgrp mygroup /home/groupspace</i>\n" +"# <i>chmod g+s /home/groupspace</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1206 +msgid "" +"Now, any users in the group mygroup can create files or directories inside " +"<path>/home/groupspace</path>, and they will be automatically assigned a " +"group ownership of mygroup as well. Depending on the users' umask setting, " +"new filesystem objects may or may not be readable, writable, or executable " +"by other members of the mygroup group." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1217 +msgid "Directories and deletion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1220 +msgid "" +"By default, Linux directories behave in a way that may not be ideal in all " +"situations. Normally, anyone can rename or delete a file inside a directory, " +"as long as they have write access to that directory. For directories used by " +"individual users, this behavior is usually just fine." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1227 +msgid "" +"However, for directories that are used by many users, especially <path>/tmp</" +"path> and <path>/var/tmp</path>, this behavior can be bad news. Since anyone " +"can write to these directories, anyone can delete or rename anyone else's " +"files -- even if they don't own them! Obviously, it's hard to use <path>/" +"tmp</path> for anything meaningful when any other user can type <c>rm -rf /" +"tmp/*</c> at any time and destroy everyone's files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1236 +msgid "" +"Thankfully, Linux has something called the sticky bit. When <path>/tmp</" +"path> has the sticky bit set (with a <c>chmod +t</c>), the only people who " +"are able to delete or rename files in <path>/tmp</path> are the directory's " +"owner (typically root), the file's owner, or root. Virtually all Linux " +"distributions enable <path>/tmp</path>'s sticky bit by default, but you may " +"find that the sticky bit comes in handy in other situations." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1248 +msgid "The elusive first digit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1251 +msgid "" +"And to conclude this section, we finally take a look at the elusive first " +"digit of a numeric mode. As you can see, this first digit is used for " +"setting the sticky, <c>suid</c>, and <c>sgid</c> bits:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1260 +msgid "sgid" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1261 +msgid "sticky" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1262 +msgid "mode digit" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1265 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1266 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1267 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1271 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1272 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1277 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1279 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1283 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1290 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1291 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1296 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1303 +msgid "on" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1273 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1278 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1284 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1285 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1289 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1295 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1297 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1301 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1302 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1307 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1308 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1309 +msgid "off" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1314 +msgid "" +"Here's an example of how to use a 4-digit numeric mode to set permissions " +"for a directory that will be used by a workgroup:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1319 +msgid "Setting numeric permissions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1319 +#, no-wrap +msgid "" +"\n" +"# <i>chmod 1775 /home/groupfiles</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1323 +msgid "" +"As homework, figure out the meaning of the 1755 numeric permissions " +"setting. :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1332 +msgid "Linux account managment" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1334 +msgid "Introducing /etc/passwd" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1337 +msgid "" +"In this section, we'll look at the Linux account management mechanism, " +"starting with the <path>/etc/passwd</path> file, which defines all the users " +"that exist on a Linux system. You can view your own <path>/etc/passwd</path> " +"file by typing less <path>/etc/passwd</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1344 +msgid "" +"Each line in <path>/etc/passwd</path> defines a user account. Here's an " +"example line from my <path>/etc/passwd</path> file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1349 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1561 +msgid "/etc/passwd" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1349 +#, no-wrap +msgid "" +"\n" +"drobbins:x:1000:1000:Daniel Robbins:/home/drobbins:/bin/bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1353 +msgid "" +"As you can see, there is quite a bit of information on this line. In fact, " +"each <path>/etc/passwd</path> line consists of multiple fields, each " +"separated by a :." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1359 +msgid "" +"The first field defines the username (drobbins)), and the second field " +"contains an x. On ancient Linux systems, this field contained an encrypted " +"password to be used for authentication, but virtually all Linux systems now " +"store this password information in another file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1366 +msgid "" +"The third field (1000) defines the numeric user id associated with this " +"particular user, and the fourth field (1000) associates this user with a " +"particular group; in a few panels, we'll see where group 1000 is defined." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1372 +msgid "" +"The fifth field contains a textual description of this account -- in this " +"case, the user's name. The sixth field defines this user's home directory, " +"and the seventh field specifies the user's default shell -- the one that " +"will be automatically started when this user logs in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1382 +msgid "/etc/passwd tips and tricks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1385 +msgid "" +"You've probably noticed that there are many more user accounts defined in " +"<path>/etc/passwd</path> than actually log in to your system. This is " +"because various Linux components use user accounts to enhance security. " +"Typically, these system accounts have a user id (\"uid\") of under 100, and " +"many of them will have something like /bin/false listed as a default shell. " +"Since the <path>/bin/false</path> program does nothing but exit with an " +"error code, this effectively prevents these accounts from being used as " +"login accounts -- they are for internal use only." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1399 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1410 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1590 +msgid "/etc/shadow" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1402 +msgid "" +"So, user accounts themselves are defined in <path>/etc/passwd</path>. Linux " +"systems contain a companion file to <path>/etc/passwd</path> that's called " +"<path>/etc/shadow</path>. This file, unlike <path>/etc/passwd</path>, is " +"readable only by root and contains encrypted password information. Let's " +"look at a sample line from <path>/etc/shadow</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1410 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1590 +#, no-wrap +msgid "" +"\n" +"drobbins:$1$1234567890123456789012345678901:11664:0:-1:-1:-1:-1:0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1414 +msgid "" +"Each line defines password information for a particular account, and again, " +"each field is separated by a :. The first field defines the particular user " +"account with which this shadow entry is associated. The second field " +"contains an encrypted password. The remaining fields are described in the " +"following table:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1424 +msgid "field 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1425 +msgid "# of days since 1/1/1970 that the password was modified" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1428 +msgid "field 4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1429 +msgid "" +"# of days before password will be allowed to be changed (0 for \"change " +"anytime\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1435 +msgid "field 5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1436 +msgid "" +"# of days before system will force user to change to a new password (-1 for " +"\"never\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1442 +msgid "field 6" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1443 +msgid "" +"# of days before password expires that user will be warned about expiration " +"(-1 for \"no warning\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1449 +msgid "field 7" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1450 +msgid "" +"# of days after password expiration that this account is automatically # " +"disabled by the system (-1 for \"never disable\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1456 +msgid "field 8" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1457 +msgid "" +"# of days that this account has been disabled (-1 for \"this account is " +"enabled\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1463 +msgid "field 9" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1464 +msgid "Reserved for future use" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1471 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1479 +msgid "/etc/group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1474 +msgid "" +"Next, we take a look at the <path>/etc/group</path> file, which defines all " +"the groups on a Linux system. Here's a sample line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1479 +#, no-wrap +msgid "" +"\n" +"drobbins:x:1000:\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1483 +msgid "" +"The <path>/etc/group</path> field format is as follows. The first field " +"defines the name of the group; the second field is a vestigial password " +"field that now simply holds an x, and the third field defines the numeric " +"group id of this particular group. The fourth field (empty in the above " +"example) defines any users that are members of this group." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1491 +msgid "" +"You'll recall that our sample <path>/etc/passwd</path> line referenced a " +"group id of 1000. This has the effect of placing the drobbins user in the " +"drobbins group, even though the drobbins username isn't listed in the fourth " +"field of <path>/etc/group</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1501 +msgid "Group notes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1504 +msgid "" +"A note about associating users with groups: on some systems, you'll find " +"that every new login account is associated with an identically named (and " +"usually identically numbered) group. On other systems, all login accounts " +"will belong to a single users group. The approach that you use on the system" +"(s) you administrate is up to you. Creating matching groups for each user " +"has the advantage of allowing users to more easily control access to their " +"own files by placing trusted friends in their personal group." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1517 +msgid "Adding a user and group by hand" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1520 +msgid "" +"Now, I'll show you how to create your own user and group account. The best " +"way to learn how to do this is to add a new user to the system manually. To " +"begin, first make sure that your EDITOR environment variable is set to your " +"favorite text editor:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1527 +msgid "Checking favorite text editor variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1527 +#, no-wrap +msgid "" +"\n" +"# <i>echo $EDITOR</i>\n" +"vim\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1532 +msgid "If it isn't, you can set EDITOR by typing something like:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1536 +msgid "Setting EDITOR variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1536 +#, no-wrap +msgid "" +"\n" +"# <i>export EDITOR=/usr/bin/emacs</i>\n" +"# <i>vipw</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1541 +msgid "" +"You should now find yourself in your favorite text editor with the <path>/" +"etc/passwd</path> file loaded up on the screen. When modifying system " +"<path>passwd</path> and <path>group</path> files, it's very important to use " +"the <c>vipw</c> and <c>vigr</c> commands. They take extra precautions to " +"ensure that your critical <path>passwd</path> and <path>group</path> files " +"are locked properly so they don't become corrupted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1553 +msgid "Editing /etc/passwd" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1556 +msgid "" +"Now that you have the <path>/etc/passwd</path> file up, go ahead and add the " +"following line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1561 +#, no-wrap +msgid "" +"\n" +"testuser:x:3000:3000:LPI tutorial test user:/home/testuser:/bin/false\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1565 +msgid "" +"We've just added a \"testuser\" user with a UID of 3000. We've added him to " +"a group with a GID of 3000, which we haven't created just yet. " +"Alternatively, we could have assigned this user to the GID of the users " +"group if we wanted. This new user has a comment that reads LPI tutorial test " +"user; the user's home directory is set to <path>/home/testuser</path>, and " +"the user's shell is set to <path>/bin/false</path> for security purposes. If " +"we were creating an non-test account, we would set the shell to <path>/bin/" +"bash</path>. OK, go ahead and save your changes and exit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1579 +msgid "Editing /etc/shadow" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1582 +msgid "" +"Now, we need to add an entry in <path>/etc/shadow</path> for this particular " +"user. To do this, type <c>vipw -s</c>. You'll be greeted with your favorite " +"editor, which now contains the <path>/etc/shadow</path> file. Now, go ahead " +"and copy the line of an existing user account (one that has a password and " +"is longer than the standard system account entries):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1594 +msgid "" +"Now, change the username on the copied line to the name of your new user, " +"and ensure that all fields (particularly the password aging ones) are set to " +"your liking:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1600 +msgid "Modifed /etc/shadow" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1600 +#, no-wrap +msgid "" +"\n" +"testuser:$1$1234567890123456789012345678901:11664:0:-1:-1:-1:-1:0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1604 +msgid "Now, save and exit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1611 +msgid "Setting a password" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1614 +msgid "" +"You'll be back at the prompt. Now, it's time to set a password for your new " +"user:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1619 +msgid "Setting password for new user" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1619 +#, no-wrap +msgid "" +"\n" +"# <i>passwd testuser</i>\n" +"Enter new UNIX password: <comment>(enter a password for testuser)</comment>\n" +"Retype new UNIX password: <comment>(enter testuser's new password again)</comment>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1628 +msgid "Editing /etc/group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1631 +msgid "" +"Now that <path>/etc/passwd</path> and <path>/etc/shadow</path> are set up, " +"it's now time to get <path>/etc/group</path> configured properly. To do " +"this, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1636 +msgid "Configuring /etc/group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1636 +#, no-wrap +msgid "" +"\n" +"# <i>vigr</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1640 +msgid "" +"Your <path>/etc/group</path> file will appear in front of you, ready for " +"editing. Now, if you chose to assign a default group of users for your " +"particular test user, you do not need to add any groups to <path>/etc/" +"groups</path>. However, if you chose to create a new group for this user, go " +"ahead and add the following line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1648 +msgid "Adding new group manually" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1648 +#, no-wrap +msgid "" +"\n" +"testuser:x:3000:\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1652 +msgid "Now save and exit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1659 +msgid "Creating a home directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1662 +msgid "" +"We're nearly done. Type the following commands to create testuser's home " +"directory:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1667 +msgid "Creating home directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1667 +#, no-wrap +msgid "" +"\n" +"# <i>cd /home</i>\n" +"# <i>mkdir testuser</i>\n" +"# <i>chown testuser.testuser testuser</i>\n" +"# <i>chmod o-rwx testuser</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1674 +msgid "" +"Our user's home directory is now in place and the account is ready for use. " +"Well, almost ready. If you'd like to use this account, you'll need to use " +"vipw to change testuser's default shell to <path>/bin/bash</path> so that " +"the user can log in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1684 +msgid "Account admin utils" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1687 +msgid "" +"Now that you know how to add a new account and group by hand, let's review " +"the various time-saving account administration utilities available under " +"Linux. Due to space constraints, we won't cover a lot of detail describing " +"these commands. Remember that you can always get more information about a " +"command by viewing the command's man page. If you are planning to take the " +"LPIC 101 exam, you should spend some time getting familiar with each of " +"these commands." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1696 +msgid "newgrp" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1700 +msgid "" +"By default, any files that a user creates are assigned to the user's group " +"specified in <path>/etc/passwd</path>. If the user belongs to other groups, " +"he or she can type newgrp thisgroup to set current default group membership " +"to the group thisgroup. Then, any new files created will inherit thisgroup " +"membership." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1710 +msgid "" +"The <c>chage</c> command is used to view and change the password aging " +"setting stored in <path>/etc/shadow</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1717 +msgid "A general-purpose group administration tool." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1720 +msgid "<c>groupadd</c>/<c>groupdel</c>/<c>groupmod</c>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1721 +msgid "Used to add/delete/modify groups in <path>/etc/group</path>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1724 +msgid "<c>useradd</c>/<c>userdel</c>/<c>usermod</c>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1725 +msgid "" +"Used to add/delete/modify users in <path>/etc/passwd</path>. These commands " +"also perform various other convenience functions. See the man pages for more " +"information." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1732 +msgid "<c>pwconv</c>/<c>grpconv</c>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1733 +msgid "" +"Used to convert <path>passwd</path> and <path>group</path> files to \"new-" +"style\" shadow passwords. Virtually all Linux systems already use shadow " +"passwords, so you should never need to use these commands." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1746 +msgid "Tuning the user environment" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1748 +msgid "Introducing \"fortune\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1751 +msgid "" +"Your shell has many useful options that you can set to fit your personal " +"preferences. So far, however, we haven't discussed any way to have these " +"settings set up automatically every time you log in, except for re-typing " +"them each time. In this section we will look at tuning your login " +"environment by modifying startup files." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1759 +msgid "" +"First, let's add a friendly message for when you first log in. To see an " +"example message, run <c>fortune</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1764 +msgid "Running fortune command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1764 +#, no-wrap +msgid "" +"\n" +"$ <i>fortune</i>\n" +"No amount of careful planning will ever replace dumb luck.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1772 +msgid ".bash_profile" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1775 +msgid "" +"Now, let's set up <c>fortune</c> so that it gets run every time you log in. " +"Use your favorite text editor to edit a file named <path>.bash_profile</" +"path> in your home directory. If the file doesn't exist already, go ahead " +"and create it. Insert a line at the top:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1782 +msgid "~/.bash_profile" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1782 +#, no-wrap +msgid "" +"\n" +"fortune\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1786 +msgid "" +"Try logging out and back in. Unless you're running a display manager like " +"xdm, gdm, or kdm, you should be greeted cheerfully when you log in:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1791 +msgid "Results of fortune command in .bash_profile file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1791 +#, no-wrap +msgid "" +"\n" +"mycroft.flatmonk.org login: chouser\n" +"Password:\n" +"Freedom from incrustations of grime is contiguous to rectitude.\n" +"$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1801 +msgid "The login shell" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1804 +msgid "" +"When bash started, it walked through the <path>.bash_profile</path> file in " +"your home directory, running each line as though it had been typed at a bash " +"prompt. This is called sourcing the file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1810 +msgid "" +"Bash acts somewhat differently depending on how it is started. If it is " +"started as a login shell, it will act as it did above -- first sourcing the " +"system-wide <path>/etc/profile</path>, and then your personal <path>~/." +"bash_profile</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1816 +msgid "" +"There are two ways to tell bash to run as a login shell. One way is used " +"when you first log in: bash is started with a process name of -bash. You can " +"see this in your process listing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1822 +msgid "Process listing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1822 +#, no-wrap +msgid "" +"\n" +"$ <i>ps u</i>\n" +"USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND\n" +"chouser 404 0.0 0.0 2508 156 tty2 S 2001 0:00 -bash\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1828 +msgid "" +"You will probably see a much longer listing, but you should have at least " +"one COMMAND with a dash before the name of your shell, like -bash in the " +"example above. This dash is used by the shell to determine if it's being run " +"as a login shell." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1838 +msgid "Understanding --login" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1841 +msgid "" +"The second way to tell bash to run as a login shell is with the <c>--login</" +"c> command-line option. This is sometimes used by terminal emulators (like " +"xterm) to make their bash sessions act like initial login sessions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1847 +msgid "" +"After you have logged in, more copies of your shell will be run. Unless they " +"are started with <c>--login</c> or have a dash in the process name, these " +"sessions will not be login shells. If they give you a prompt, however, they " +"are called interactive shells. If bash is started as interactive, but not " +"login, it will ignore <path>/etc/profile</path> and <path>~/.bash_profile</" +"path> and will instead source <path>~/.bashrc</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1858 +msgid "interactive" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1859 +msgid "login" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1860 +msgid "profile" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(th):1861 +msgid "rc" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1864 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1865 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1870 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1877 +msgid "yes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1866 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1873 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1878 +msgid "source" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1867 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1872 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1879 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1884 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1885 +msgid "ignore" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1871 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1876 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1882 +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(ti):1883 +msgid "no" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1892 +msgid "Testing for interactivity" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1895 +msgid "" +"Sometimes bash sources your <path>~/.bashrc</path>, even though it isn't " +"really interactive, such as when using commands like rsh and scp. This is " +"important to keep in mind because printing out text, like we did with the " +"fortune command earlier, can really mess up these non-interactive bash " +"sessions. It's a good idea to use the PS1 variable to detect whether the " +"current shell is truly interactive before printing text from a startup file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1904 +msgid "Testing PS1 varibale" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1904 +#, no-wrap +msgid "" +"\n" +"if [ -n \"$PS1\" ]; then\n" +"fortune\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1913 +msgid "/etc/profile and /etc/skel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1916 +msgid "" +"As a system administrator, you are in charge of <path>/etc/profile</path>. " +"Since it is sourced by everyone when they first log in, it is important to " +"keep it in working order. It is also a powerful tool in making things work " +"correctly for new users as soon as they log into their new account." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1923 +msgid "" +"However, there are some settings that you may want new users to have as " +"defaults, but also allow them to change easily. This is where the <path>/etc/" +"skel</path> directory comes in. When you use the <c>useradd</c> command to " +"create a new user account, it copies all the files from <path>/etc/skel</" +"path> into the user's new home directory. That means you can put helpful " +"<path>.bash_profile</path> and <path>.bashrc</path> files in <path>/etc/" +"skel</path> to get new users off to a good start." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1936 +msgid "export" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1939 +msgid "" +"Variables in bash can be marked so that they are set the same in any new " +"shells that it starts; this is called being marked for export. You can have " +"bash list all of the variables that are currently marked for export in your " +"shell session:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1946 +msgid "results of export command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1946 +#, no-wrap +msgid "" +"\n" +"$ <i>export</i>\n" +"declare -x EDITOR=\"vim\"\n" +"declare -x HOME=\"/home/chouser\"\n" +"declare -x MAIL=\"/var/spool/mail/chouser\"\n" +"declare -x PAGER=\"/usr/bin/less\"\n" +"declare -x PATH=\"/bin:/usr/bin:/usr/local/bin:/home/chouser/bin\"\n" +"declare -x PWD=\"/home/chouser\"\n" +"declare -x TERM=\"xterm\"\n" +"declare -x USER=\"chouser\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1961 +msgid "Marking variables for export" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1964 +msgid "" +"If a variable is not marked for export, any new shells that it starts will " +"not have that variable set. However, you can mark a variable for export by " +"passing it to the <c>export</c> built-in:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1970 +msgid "Marking variable for export" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1970 +#, no-wrap +msgid "" +"\n" +"$ <i>FOO=foo</i>\n" +"$ <i>BAR=bar</i>\n" +"$ <i>export BAR</i>\n" +"$ <i>echo $FOO $BAR</i>\n" +"foo bar\n" +"$ <i>bash</i>\n" +"$ <i>echo $FOO $BAR</i>\n" +"bar\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):1981 +msgid "" +"In this example, the variables FOO and BAR were both set, but only BAR was " +"marked for export. When a new bash was started, it had lost the value for " +"FOO. If you exit this new bash, you can see that the original one still has " +"values for both FOO and BAR:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):1988 +msgid "Checking settings in original bash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):1988 +#, no-wrap +msgid "" +"\n" +"$ <i>exit</i>\n" +"$ <i>echo $FOO $BAR</i>\n" +"foo bar\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):1997 +msgid "Export and set -x" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2000 +msgid "" +"Because of this behavior, variables can be set in <path>~/.bash_profile</" +"path> or <path>/etc/profile</path> and marked for export, and then never " +"need to be set again. There are some options that cannot be exported, " +"however, and so they must be put in put in your <path>~/.bashrc</path> and " +"your <e>profile</e> in order to be set consistently. These options are " +"adjusted with the set built-in:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2008 +msgid "Using set command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2008 +#, no-wrap +msgid "" +"\n" +"$ <i>set -x</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2012 +msgid "" +"The <c>-x</c> option causes bash to print out each command it is about to " +"run:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2016 +msgid "Checking results of -x option" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2016 +#, no-wrap +msgid "" +"\n" +"$ <i>echo $FOO</i>\n" +"$ <i>echo foo</i>\n" +"foo\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2022 +msgid "" +"This can be very useful for understanding unexpected quoting behavior or " +"similar strangeness. To turn off the <c>-x</c> option, do <c>set +x</c>. See " +"the bash man page for all of the options to the set built-in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2031 +msgid "Setting variables with \"set\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2034 +msgid "" +"The <c>set</c> built-in can also be used for setting variables, but when " +"used that way, it is optional. The bash command <c>set FOO=foo</c> means " +"exactly the same as <c>FOO=foo</c>. Un-setting a variable is done with the " +"<c>unset</c> built-in:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2041 +msgid "Un-setting variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2041 +#, no-wrap +msgid "" +"\n" +"$ <i>FOO=bar</i>\n" +"$ <i>echo $FOO</i>\n" +"bar\n" +"$ <i>unset FOO</i>\n" +"$ <i>echo $FOO</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2052 +msgid "Unset vs. FOO=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2055 +msgid "" +"This is <e>not</e> the same as setting a variable to nothing, although it is " +"sometimes hard to tell the difference. One way to tell is to use the <c>set</" +"c> built-in with no parameters to list all current variables:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2061 +msgid "Comparison of unset and FOO=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2061 +#, no-wrap +msgid "" +"\n" +"$ <i>FOO=bar</i>\n" +"$ <i>set | grep ^FOO</i>\n" +"FOO=bar\n" +"$ <i>FOO=</i>\n" +"$ <i>set | grep ^FOO</i>\n" +"FOO=\n" +"$ <i>unset FOO</i>\n" +"$ <i>set | grep ^FOO</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2072 +msgid "" +"Using <c>set</c> with no parameters like this is similar to using the " +"<c>export</c> built-in, except that <c>set</c> lists all variables instead " +"of just those marked for export." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2081 +msgid "Exporting to change command behavior" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2084 +msgid "" +"Often, the behavior of commands can be altered by setting environment " +"variables. Just as with new bash sessions, other programs that are started " +"from your bash prompt will only be able to see variables that are marked for " +"export. For example, the command <c>man</c> checks the variable PAGER to see " +"what program to use to step through the text one page at a time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2092 +msgid "Exporting PAGER variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2092 +#, no-wrap +msgid "" +"\n" +"$ <i>PAGER=less</i>\n" +"$ <i>export PAGER</i>\n" +"$ <i>man man</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2098 +msgid "" +"With PAGER set to <c>less</c>, you will see one page at a time, and pressing " +"the space bar moves on to the next page. If you change PAGER to <c>cat</c>, " +"the text will be displayed all at once, without stopping." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2104 +msgid "Setting PAGER variable to cat" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2104 +#, no-wrap +msgid "" +"\n" +"$ <i>PAGER=cat</i>\n" +"$ <i>man man</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2112 +msgid "Using \"env\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2115 +msgid "" +"Unfortunately, if you forget to set PAGER back to <c>less</c>, <c>man</c> " +"(as well as some other commands) will continue to display all their text " +"without stopping. If you wanted to have PAGER set to <c>cat</c> just once, " +"you could use the <c>env</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre:caption):2122 +msgid "Using env command to set variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(pre):2122 +#, no-wrap +msgid "" +"\n" +"$ <i>PAGER=less</i>\n" +"$ <i>env PAGER=cat man man</i>\n" +"$ <i>echo $PAGER</i>\n" +"less\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2129 +msgid "" +"This time, PAGER was exported to <c>man</c> with a value of <c>cat</c>, but " +"the PAGER variable itself remained unchanged in the bash session." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2139 +msgid "Summary and resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2141 +msgid "Summary" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2144 +msgid "" +"Congratulations on finishing Part 3 of this tutorial series! At this point, " +"you should know how to locate information in system and Internet " +"documentation, and you should have a good grasp of the Linux permissions " +"model, user account management, and login environment tuning." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2154 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2157 +msgid "" +"Be sure to check out the various Linux documentation resources covered in " +"this tutorial -- particularly the <uri link=\"http://www.tldp.org/\">Linux " +"Documentation Project</uri>. You'll find its collection of guides, HOWTOs, " +"FAQs, and man pages to be invaluable. Be sure to check out <uri link=" +"\"http://www.tldp.org/LDP/LG/current/\">Linux Gazette</uri> and <uri link=" +"\"http://www.tldp.org/linuxfocus/index.html\">LinuxFocus</uri> as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2166 +msgid "" +"The <uri link=\"http://www.tldp.org/guides.html\">Linux System " +"Administrators guide</uri> (available from the \"Guides\" section at www." +"tldp.org) is a good complement to this series of tutorials -- give it a " +"read! You may also find Eric S. Raymond's <uri link=\"http://www.tldp.org/" +"HOWTO/Unix-and-Internet-Fundamentals-HOWTO/\">Unix and Internet Fundamentals " +"HOWTO</uri> to be helpful." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2175 +msgid "" +"You can read the GNU Project's online documentation for the GNU info system " +"(also called \"texinfo\") at <uri link=\"http://www.gnu.org/manual/texinfo/" +"index.html\">GNU's texinfo documentation page</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2182 +msgid "" +"Browse the <uri link=\"http://www.tldp.org/links/#ng\">Linux newsgroup list</" +"uri> on the LDP site, and the newsgroup archives at <uri link=\"http://" +"groups.google.com/googlegroups/deja_announcement.html\">Deja News</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2189 +msgid "" +"In the Bash by example article series on developerWorks, Daniel shows you " +"how to use bash programming constructs to write your own bash scripts. This " +"bash series (particularly Parts 1 and 2) is good preparation for the LPIC " +"Level 1 exam and reinforces the concepts covered in this tutorial's \"Tuning " +"the user environment\" section:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):2199 +msgid "/doc/en/articles/bash-by-example-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):2199 +msgid "" +"Bash by example, Part 1: Fundamental programming in the Bourne-again shell" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):2203 +msgid "/doc/en/articles/bash-by-example-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):2203 +msgid "Bash by example, Part 2: More bash programming fundamentals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri:link):2207 +msgid "/doc/en/articles/bash-by-example-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(uri):2207 +msgid "Bash by example, Part 3: Exploring the ebuild system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2212 +msgid "" +"We highly recommend the <uri link=\"http://www-106.ibm.com/developerworks/" +"linux/library/l-faq/\">Technical FAQ by Linux Users</uri> by Mark Chapman, a " +"50-page in-depth list of frequently-asked Linux questions, along with " +"detailed answers. The FAQ itself is in PDF (Adobe Acrobat) format. If you're " +"a beginning or intermediate Linux user, you really owe it to yourself to " +"check this FAQ out. We also recommend the <uri link=\"http://www-106.ibm.com/" +"developerworks/linux/library/l-gloss/index.html\">Linux glossary for Linux " +"users</uri>, also from Mark." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2224 +msgid "" +"If you're not familiar with the vi editor, check out Daniel's <uri link=" +"\"http://www-106.ibm.com/developerworks/edu/l-dw-linuxvi-i.html\">Vi intro " +"-- the cheat sheet method tutorial</uri>. This tutorial will give you a " +"gentle yet fast-paced introduction to this powerful text editor. Consider " +"this must-read material if you don't know how to use vi." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2232 +msgid "" +"For an intro to the Emacs editor, see the developerWorks tutorial, <uri link=" +"\"http://www-106.ibm.com/developerworks/edu/l-dw-linuxemacs-i.html\">Living " +"in Emacs</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(title):2241 +msgid "Feedback" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2244 +msgid "" +"Please let us know whether this tutorial was helpful to you and how we could " +"make it better. We'd also like to hear about other tutorial topics you'd " +"like to see covered in developerWorks tutorials." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(p):2250 +msgid "For questions about the content of this tutorial, contact the authors:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(li):2257 +msgid "Aron Griffis, at <mail>agriffis@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/lpi-101-intermediate-p3.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/lvm-p1.xml.po b/article/gettext/ru/lvm-p1.xml.po new file mode 100644 index 0000000..874a852 --- /dev/null +++ b/article/gettext/ru/lvm-p1.xml.po @@ -0,0 +1,590 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(guide:link):5 +msgid "/doc/en/articles/lvm-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):6 +msgid "Learning Linux LVM, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by: Joshua Saddler (nightmorph@gentoo.org) +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(abstract):13 +msgid "" +"In this article, Daniel introduces you to the concepts behind Linux LVM " +"(Logical Volume Management) and shows you how to get the latest kernel " +"patches and tools installed on your system. LVM allows you to create logical " +"volumes out of the physical storage resources on your machine. However, " +"unlike physical volumes, the logical volumes can be expanded and shrunk " +"while the system is still running, providing Linux system administrators " +"with the storage flexibility that they've until now only dreamed of." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(version):28 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(date):29 +msgid "2006-01-22" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):32 +msgid "Storage management magic with Logical Volume Management" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):34 +msgid "LVM intro" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):37 +msgid "" +"In this series, I'm going to show you how to install and use the new Logical " +"Volume Management support built-in to the Linux 2.4 kernel. If you've never " +"used a form of LVM before, you're in for a treat; it's a wonderful " +"technology. Before we actually get LVM up and running, I'm going to explain " +"exactly what it is and how it works. Then, we'll be ready to test out LVM " +"and get the most out of it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):46 +msgid "" +"If you're like me, then your experience with UNIX and Linux began on a PC " +"platform, rather than on large, commercial UNIX servers and workstations. On " +"the basic PC, we've always had to deal with partitioning our hard drives. PC " +"people are generally well-acquainted with tools such as <c>fdisk</c>, which " +"are used to create and delete primary and extended partitions on hard disks. " +"Hard disk partitioning is an annoying but accepted part of the process of " +"getting an operating system up and running." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):56 +msgid "" +"Hard drive partitioning can be annoying because to do a good job you really " +"need to accurately estimate how much space you'll need for each partition. " +"If you make a poor estimation, your Linux system could possibly be crippled " +"-- to fix the problem, it's possible that you might even need to perform a " +"full system backup, wipe your hard drives clean, and then restore all your " +"data to a new (and presumably better) partition layout. Ick! These are " +"exactly the kinds of situations that sysadmins try their best to avoid in " +"the first place." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):66 +msgid "" +"While partitions were once static storage regions, thankfully, we now have a " +"proliferation of PC repartitioning tools (PowerQuest's Partition Magic " +"product is one of the most popular). These tools allow you to boot your " +"system with a special disk and dynamically resize your partitions and " +"filesystems. Once you reboot, you have newly resized partitions, hopefully " +"getting you out of your storage crunch. These partition resizing tools are " +"great and solve the problem storage management for some. But are they " +"perfect? Not exactly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):76 +msgid "" +"Tools like Partition Magic are great for workstations, but aren't really " +"adequate for servers. First of all, they require you to reboot your system. " +"This is something most sysadmins desperately try to avoid doing. What if you " +"simply can't reboot your machine every time your storage needs change, such " +"as if your storage needs change dramatically on a weekly basis? What happens " +"if you need to expand a filesystem so that it spans more than one hard " +"drive, or what do you do if you need to dynamically expand or shrink a " +"volume's storage capacity while allowing Apache to continue to serve Web " +"pages? In a highly available, dynamic environment, a basic partition resizer " +"just won't work. For these and other situations, Logical Volume Management " +"is an excellent (if not perfect) solution." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):93 +msgid "Enter LVM" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):96 +msgid "" +"Now, let's take a look at how LVM solves these problems. To create an LVM " +"logical volume, we follow a three-step process. First, we need to select the " +"physical storage resources that are going to be used for LVM. Typically, " +"these are standard partitions but can also be Linux software RAID volumes " +"that we've created. In LVM terminology, these storage resources are called " +"\"physical volumes\". Our first step in setting up LVM involves properly " +"initializing these partitions so that they can be recognized by the LVM " +"system. This involves setting the correct partition type if we're adding a " +"physical partition, and running the pvcreate command." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):108 +msgid "" +"Once we have one or more physical volumes initialized for use by LVM, we can " +"move on to step two -- creating a volume group. You can think of a volume " +"group as a pool of storage that consists of one or more physical volumes. " +"While LVM is running, we can add physical volumes to the volume group or " +"even remove them. However, we can't mount or create filesystems on a volume " +"group directly. Instead, we can tell LVM to create one or more \"logical " +"volumes\" using our volume group storage pool:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(figure:link):119 +msgid "/images/docs/l-lvm-1.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(figure:caption):119 +msgid "A volume group is created out of physical volumes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):121 +msgid "" +"Creating an LVM logical volume is really easy, and once it's created we can " +"go ahead and put a filesystem on it, mount it, and start using the volume to " +"store our files. To create a logical volume, we use the <c>lvcreate</c> " +"command, specifying the name of our new volume, the size we'd like the " +"volume to be, and the volume group that we'd like this particluar logical " +"volume to be part of. The LVM system will then allocate storage from the " +"volume group we specify and create our new volume, which is now ready for " +"use. Once created, we can put an ext2 or ReiserFS filesystem on it, mount " +"it, and use it as we like." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(figure:link):133 +msgid "/images/docs/l-lvm-2.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(figure:caption):133 +msgid "Creating two logical volumes from our existing volume group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):138 +msgid "Extents" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):141 +msgid "" +"Behind the scenes, the LVM system allocates storage in equal-sized \"chunks" +"\", called extents. We can specify the particular extent size to use at " +"volume group creation time. The size of an extent defaults to 4Mb, which is " +"perfect for most uses. One of the beauties of LVM is that the physical " +"storage locations of the extents used for one of our logical volumes (in " +"other words, what disk they're stored on) can be dynamically changed while " +"our logical volume is mounted and in use! The LVM system ensures that our " +"logical volumes continue to operate perfectly while allowing the " +"administrator to physically change where everything is stored." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):153 +msgid "" +"Of course, since everything is created out of equally-sized extents, it's " +"really easy to allocate some additional extents for an already-existing " +"logical volume -- in other words, dynamically \"grow\" the volume:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(figure:link):161 +msgid "/images/docs/l-lvm-3.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(figure:caption):161 +msgid "" +"Adding additional extents from our volume group, expanding the size of our " +"logical volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):163 +msgid "" +"Once the logical volume has been expanded, you can then expand your ext2 or " +"ReiserFS filesystem to take advantage of this new space. If you use a " +"program such as <c>resize_reiserfs</c>, this filesystem expansion can also " +"happen while the volume is mounted and being used! Truly amazing -- with LVM " +"and online filesystem expansion utilties, it's no longer necessary to reboot " +"your system or even drop to runlevel 1 to change your storage configuration." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):172 +msgid "" +"The only time you need to shut down your system is when you need to add new " +"physical disks. Once new disks have been added, you then can add these new " +"physical volumes to your volume group(s) to create a fresh supply of extents." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):181 +msgid "Setting up LVM" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):184 +msgid "" +"OK, let's get LVM installed. LVM consists of two parts: a kernel part and a " +"suite of user-space tools. To start, head over to the main LVM page (see " +"<uri link=\"#resources\">Resources</uri> later in this article) and download " +"the most recent version of the LVM tarball (currently lvm_0.9.1_beta3.tar." +"gz) you can find. The LVM tarball contains all the user-space tools, as well " +"as a bunch of kernel patches. Here is where things get interesting." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):193 +msgid "" +"If you already have a 2.4-series kernel installed, you may already have LVM " +"support available on your system, and if not, it's a simple matter to " +"recompile your kernel to enable LVM support. However, you may not want to " +"use the LVM support included with your stock (or distribution-supplied) 2.4 " +"kernel. If you want to use the latest LVM version, you'll want to apply " +"patches from the LVM tarball to your current 2.4 kernel source tree. Here's " +"how to do it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):202 +msgid "" +"To start, enter your kernel source directory (<path>/usr/src/linux</path>) " +"and create a directory called <path>extras</path>. Then, enter this " +"directory and extract your LVM tarball:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):208 +msgid "Extracting the patches" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):208 +#, no-wrap +msgid "" +"\n" +"# <i>cd /usr/src/linux</i>\n" +"# <i>mkdir extras</i>\n" +"# <i>cd extras</i>\n" +"# <i>tar xzvf /path/to/location/of/lvm_0.9.1_beta3.tar.gz</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):215 +msgid "" +"Once you've done that, you'll notice a new directory in extras called " +"<path>LVM</path> that contains another directory named after the version of " +"LVM that you just unpacked. Enter these two directories to get to the LVM " +"sources:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):221 +msgid "Getting to the LVM sources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):221 +#, no-wrap +msgid "" +"\n" +"# <i>cd LVM/0.9.1_beta3</i>\n" +"# <i>ls</i>\n" +"ABSTRACT COPYING INSTALL Makefile README autoconf config.status kernel make.tmpl.in\n" +"CHANGELOG COPYING.LIB KNOWN_BUGS Makefile.in TODO config.cache configure lvm_input_msg scripts\n" +"CONTRIBUTORS FAQ LVM-HOWTO PATCHES WHATSNEW config.log configure.in make.tmpl tools\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):229 +msgid "" +"You'll see several text files, scripts, and source directories. You'll find " +"the installation instructions in the <path>INSTALL</path> file; I'll guide " +"you through this process. First, we'll want to run the configure script, as " +"follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):236 +msgid "Configuring the LVM sources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):236 +#, no-wrap +msgid "" +"\n" +"# <i>./configure --prefix=/ --mandir=/usr/man</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):243 +msgid "Patching" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):246 +msgid "" +"After executing this command, the Makefiles will be created and configured " +"to install all the LVM tools in <path>/sbin</path> and the man pages in " +"<path>/usr/man</path>. If your man pages are in <path>/usr/share/man</path> " +"(as per FHS 2.1), then adjust the above path accordingly. And, if your " +"kernel sources aren't in <path>/usr/src/linux</path>, then add a <c>--with-" +"kernel_dir=/path/to/usr/src/linux</c> option to the line as well. Once the " +"configure script completes, we're ready to install the tools and generate a " +"patch for your current kernel. Let's patch the kernel first. Enter the " +"<path>PATCHES</path> directory:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):258 +msgid "Changing directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):258 +#, no-wrap +msgid "" +"\n" +"# <i>cd PATCHES</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):262 +msgid "" +"Now, we're going to type <c>make</c>. The Makefile will generate a patch " +"specifically for our particular 2.4-series kernel sources:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):267 +msgid "Creating the patch" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):267 +#, no-wrap +msgid "" +"\n" +"# <i>make</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):271 +msgid "" +"The patch will be named <c>lvm-[lvmversion]-[kernelversion].patch</c>. For " +"example, since I'm using version 0.9.1_beta3 of LVM and kernel 2.4.0-ac11, " +"my patch is called <c>lvm-0.9.1_beta3-2.4.0-ac11.patch</c>. You'll find it " +"in your current directory. Now, it's time to apply the patch. To do this, " +"you'll want to change directories to the location of your kernel sources and " +"use the patch command as shown:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):280 +msgid "The patch command" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):280 +#, no-wrap +msgid "" +"\n" +"# <i>cd /usr/src/linux</i>\n" +"# <i>patch -l -p1 < /usr/src/linux/extras/LVM/0.9.1_beta3/PATCHES/lvm-0.9.1_beta3-2.4.0-ac11.patch</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):285 +msgid "" +"While the LVM INSTALL documentation doesn't mention it, I typically pass the " +"<c>-l</c> option to patch. This option allows the patch program to " +"compensate for any changes in whitespace (such as minor indentation changes) " +"that would ordinarily cause some hunks of the patch to fail. If the above " +"command completes without any \"FAILED\" lines, then you're ready to install " +"the user-space tools. If not, you'll need to scan your <path>/usr/src/linux</" +"path> directory for <c>.rej</c> files and insert the rejected hunks into the " +"sources by hand using a text editor -- ick! However, in most all situations " +"the patch will apply cleanly and you'll be ready to go." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):300 +msgid "Configuring, compiling, and installing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):303 +msgid "" +"OK, you now have a kernel that's been patched so that it has the most " +"current LVM code available. Now, you'll want to configure your kernel so " +"that LVM support is enabled. I recommend that you compile LVM support " +"directly into the kernel rather than configuring it to compile as a module. " +"Fire up your favorite Linux kernel configuration method:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):311 +msgid "Configuring the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):311 +#, no-wrap +msgid "" +"\n" +"# <i>cd /usr/src/linux</i>\n" +"# <i>make menuconfig</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):316 +msgid "" +"You'll find the LVM options under the \"Multi-device support (RAID and " +"LVM)\" section. Once you enable the first option:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):321 +msgid "RAID and LVM support" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):321 +#, no-wrap +msgid "" +"\n" +"[*] Multiple devices driver support (RAID and LVM)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):325 +msgid ". . . you'll see the following option, which you should also enable:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):329 +msgid "Enable LVM support" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):329 +#, no-wrap +msgid "" +"\n" +"<*> Logical volume manager (LVM) support\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):333 +msgid "" +"Depending on your LVM version, there may be other LVM-related options that " +"you'll want to enable as well. Once you're done, save your kernel " +"configuration and perform your standard kernel compilation routine and " +"reboot. Congratulations -- you now have kernel LVM support enabled. Now, we " +"need to get the user-space tools compiled and installed. This step is easy:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):341 +msgid "Creating the user-space tools" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):341 +#, no-wrap +msgid "" +"\n" +"# <i>cd /usr/src/linux/extras/LVM/0.9.1_beta3</i>\n" +"# <i>make</i>\n" +"# <i>make install</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):347 +msgid "" +"There's just one more step, and it's optional. If you're going to be doing " +"more than just testing out LVM, you'll want to add the following lines to " +"your startup rc scripts:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):353 +msgid "Editing the startup rc script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):353 +#, no-wrap +msgid "" +"\n" +"/sbin/vgscan\n" +"/sbin/vgchange -a y\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):358 +msgid "" +"These lines will scan for all available volume groups and activate them. " +"Then, add the following line to your shutdown rc script, and make sure that " +"it executes after all filesystems have been unmounted:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre:caption):364 +msgid "Editing the shutdown rc script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(pre):364 +#, no-wrap +msgid "" +"\n" +"/sbin/vgchange -a n\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):368 +msgid "" +"If you're just testing out LVM, then you can skip these steps. Just remember " +"that after every reboot, you'll need to type <c>vgscan</c> and <c>vgchange -" +"a y</c> as root before your logical volumes are available for use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(p):374 +msgid "" +"That's it for this article. Next article, I'll show you how to create your " +"own logical volumes and unleash the power of LVM. I'll see you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(title):382 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):386 +msgid "" +"Download the <uri link=\"ftp://sources.redhat.com/pub/lvm2\">LVM tarball</" +"uri> from RedHat." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):390 +msgid "" +"The impatient will want to check out <uri link=\"http://www.linux.org/docs/" +"ldp/howto/LVM-HOWTO.html\">Heinz Mauelshagen's LVM HOWTO</uri>, which shows " +"you how to set up physical volumes, volume groups, and logical volumes. This " +"is something we'll cover in my next article." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):397 +msgid "" +"There's also an interesting HOWTO that shows you <uri link=\"http://www.the-" +"infinite.org/archive/docs/lvm/howto-boot-off-root-lv.txt\"> how to set up " +"your root filesystem on a logical volume</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):402 +msgid "" +"Andreas Dilger is involved with the Linux LVM project and has a nice-looking " +"<e>online</e><uri link=\"http://www-mddsp.enel.ucalgary.ca/People/adilger/" +"online-ext2/\">ext2 filesystem resizer</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):408 +msgid "" +"<uri link=\"http://www.namesys.com\">ReiserFS</uri> is an excellent " +"filesystem (especially in combination with LVM). If you're using ReiserFS, " +"you'll want to grab the reiserfs-utils tarball, which contains a program " +"called <c>reiserfs_resize</c> -- allowing online resizing of ReiserFS " +"filesystems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):415 +msgid "" +"For more information on setting up Linux software RAID volumes, see <uri " +"link=\"/doc/en/articles/software-raid-p1.xml\">Part 1</uri> and <uri link=\"/" +"doc/en/articles/software-raid-p2.xml\">Part 2</uri> of Daniel's series on " +"software RAID." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(li):421 +msgid "" +"For a refresher, see Daniel's <uri link=\"/doc/en/articles/linux-kernel-" +"compiling.xml\">tutorial on compiling the Linux kernel</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/lvm-p2.xml.po b/article/gettext/ru/lvm-p2.xml.po new file mode 100644 index 0000000..962cebe --- /dev/null +++ b/article/gettext/ru/lvm-p2.xml.po @@ -0,0 +1,684 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(guide:link):5 +msgid "/doc/en/articles/lvm-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):6 +msgid "Learning Linux LVM, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by: Joshua Saddler (nightmorph@gentoo.org) +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(abstract):13 +msgid "" +"In this article, Daniel shares his experiences converting cvs.gentoo.org's /" +"home filesystem to an LVM logical volume. After the transition, we get to " +"see the benefits of LVM when cvs.gentoo.org's /home partition is dynamically " +"resized in real-time, without rebooting, unmounting /home, or even dropping " +"to runlevel 1. All processes continue to work without any interruption. " +"Daniel's step-by-step details of the conversion will help anyone interested " +"in peforming a similar transition on their own machine." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(version):28 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(date):29 +msgid "2006-01-22" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):32 +msgid "The cvs.gentoo.org upgrade" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):34 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):37 +msgid "" +"In <uri link=\"/doc/en/articles/lvm-p1.xml\">my first LVM article</uri>, I " +"explained the concepts behind LVM. Now it's time to put LVM into action. In " +"this article, I'm going to set up LVM on the official Gentoo Linux cvs " +"server, cvs.gentoo.org. Although cvs.gentoo.org has only one hard drive, " +"LVM's flexibility still provides an incredible improvement over the standard " +"static partitioning approach. I'll show you all the steps of the LVM " +"conversion process, so that if you're interested you can perform a similar " +"conversion on one of your machines." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(warn):48 +msgid "" +"Because implementing LVM is a major change to the system (involving the " +"creation of new partitions and other potentially hazardous actions) it's a " +"really good idea to perform a full system backup before beginning this " +"process. If you're not going to perform a backup, I hope you're using a test " +"box with no important data on it. I should mention that I didn't experience " +"any problems while converting to LVM, but it's best to be prepared in case " +"something goes wrong." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):58 +msgid "" +"That said, let's continue. Before starting the conversion process, I " +"upgraded cvs.gentoo.org so that it was using the following packages. At the " +"time I performed the LVM transition, these were the latest versions " +"available (see <uri link=\"#resources\">Resources</uri> later in this " +"article):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):66 +msgid "Linux kernel 2.4.1-ac19" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):67 +msgid "LVM 0.9.1_beta5" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):68 +msgid "reiserfs-utils 3.6.25" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):71 +msgid "" +"Now, for the hard drive. cvs.gentoo.org had a nice new IBM 45 GB hard drive " +"sitting in it; however, when I installed Gentoo Linux on cvs, I only " +"partitioned about 10 gigabytes of the drive, keeping the remaining 35 GB for " +"future partitions. Such are the little tricks you need to employ when not " +"using LVM -- leaving part of the drive unpartitioned is a primitive but " +"effective way to allow for future expansion. However, with LVM there is a " +"better approach." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):83 +msgid "The space problem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):86 +msgid "" +"In the past few weeks, I had been noticing that my root ReiserFS partition " +"had been slowly filling up, as you can see from this <c>df</c> output:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):91 +msgid "Shrinking free space" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):91 +#, no-wrap +msgid "" +"\n" +"Filesystem 1k-blocks Used Available Use% Mounted on\n" +"/dev/hda3 9765200 6989312 2775888 72% /\n" +"tmpfs 269052 0 269052 0% /dev/shm\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):97 +msgid "" +"Now, a 72% full root partition isn't exactly a crisis, but it isn't a " +"wonderful situation either. ReiserFS, like many other filesystems, starts " +"slowing down as it gets more and more full, and it was just a matter of time " +"before my root filesystem would fill up completely and filesystem " +"performance would take a hit." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):105 +msgid "" +"I decided to fix this problem by using LVM to create a new logical volume " +"out of the 35 GB of currently unpartitioned space at the end of my hard " +"drive. Then, I'd create a filesystem on this volume and move a good chunk of " +"the contents of <path>/dev/hda3</path> to it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):112 +msgid "" +"If you're thinking of making a similar transition on one of your machines, " +"the first thing you need to do is find a suitable piece of your root " +"filesystem to move to a logical volume. For me, the choice was easy -- my " +"<path>/home</path> tree was taking up around 5.7 GB. By moving <path>/home</" +"path> to its own LVM logical volume, my root filesystem would then be at " +"about 20% capacity. Since most new data is being added to <path>/home</" +"path>, my root filesystem would likely stay at around 20% capacity as well " +"-- a very healthy situation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):125 +msgid "The beginnings of a solution" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):128 +msgid "" +"To begin the conversion, I first had to partition the unused space at the " +"end of my hard drive. Using <c>cfdisk</c>, I created a 35 GB partition " +"(<path>/dev/hda5</path>) and set the partition type of the partition to " +"<c>8E</c> (the official LVM partition type). After this change, I rebooted " +"to force a reread of my partition table. After the reboot, my partition " +"table looked like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):137 +msgid "The new partition table" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):137 +#, no-wrap +msgid "" +"\n" +"# <i>sfdisk -l</i>\n" +"Disk /dev/hda: 89355 cylinders, 16 heads, 63 sectors/track\n" +"Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0\n" +" Device Boot Start End #cyls #blocks Id System\n" +"/dev/hda1 * 0+ 247 248- 124960+ 83 Linux\n" +"/dev/hda2 248 743 496 249984 82 Linux swap\n" +"/dev/hda3 744 20119 19376 9765504 83 Linux\n" +"/dev/hda4 20120 89354 69235 34894440 5 Extended\n" +"/dev/hda5 20120+ 89354 69235- 34894408+ 8e Linux LVM\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):149 +msgid "" +"Now that I had an empty 35 GB partition, I was ready to initialize it for " +"LVM. Here's the procedure -- first, I would initialize the 35 gigabytes as a " +"<e>physical</e> volume; then, I would create a <e>volume</e> group using " +"this physical volume, and finally, I would allocate some of the extents on " +"the volume group, creating a <e>logical volume</e> that would contain my new " +"filesystem and house all the files currently in <path>/home</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):158 +msgid "" +"To begin the process, I used the <c>pvcreate</c> command to initialize " +"<path>/dev/hda5</path> as a physical volume:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):163 +msgid "Creating the physical volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):163 +#, no-wrap +msgid "" +"\n" +"# <i>pvcreate /dev/hda5</i>\n" +"pvcreate -- physical volume \"/dev/hda5\" successfully created\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):168 +msgid "" +"<c>pvcreate</c> set up a special \"accounting\" area on <path>/dev/hda5</" +"path>, called the VGDA (volume group descriptor area). LVM uses this area to " +"keep track of how the physical extents are allocated, among other things." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):174 +msgid "" +"My next step was to create a volume group and add <path>/dev/hda5</path> to " +"this group. The volume group would act as a pool of extents (chunks of " +"storage blocks). Once the volume group was created, I could create as many " +"logical volumes as I wanted. I decided that my volume group would be called " +"\"main\":" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):181 +msgid "Creating the volume group" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):181 +#, no-wrap +msgid "" +"\n" +"# <i>vgcreate main /dev/hda5</i>\n" +"vgcreate -- INFO: using default physical extent size 4 MB\n" +"vgcreate -- INFO: maximum logical volume size is 255.99 Gigabyte\n" +"vgcreate -- doing automatic backup of volume group \"main\"\n" +"vgcreate -- volume group \"main\" successfully created and activated\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):189 +msgid "" +"The <c>vgcreate</c> command did a couple of things. In addition to creating " +"the \"main\" volume group, it also set up <path>/dev/hda5</path> to use 4 MB " +"extents, the default extent size. This means that any logical volumes I " +"create from this volume group can be expanded and shrunk in 4 MB increments." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):196 +msgid "" +"Due to kernel limitations, the extent size determines the maximum size that " +"a logical volume can be. As you can see from the above output, a 4 MB extent " +"size imposes a logical volume size limitation of 256 gigabytes, which is an " +"easily attainable logical volume size if you're adding several high-capacity " +"drives to your volume group. If your volumes could end up being greater than " +"256 GB apiece, I recommend specifying a larger extent size at <c>vgcreate</" +"c> time. Extents can range anywhere from 8 KB to 512 MB, and must always be " +"a multiple of two. By increasing the extent size above 4 MB, the maximum " +"physical volume size will be scaled accordingly, up to a maximum of 1 " +"petabyte (although the current real-world size limit is 2 terabytes on x86 " +"systems). For example, if I wanted to create a volume group with 32 megabyte " +"extents, I'd type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):210 +msgid "A larger extent size" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):210 +#, no-wrap +msgid "" +"\n" +"# <i>vgcreate -s 32M main /dev/hda5</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):214 +msgid "" +"32 MB is a good extent size, since a 32 MB granularity is still manageable " +"and pushes the maximum logical volume size to 2 terabytes to boot. Once your " +"volume group is created, you can view its information by typing " +"<c>vgdisplay</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):220 +msgid "Examining volume information" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):220 +#, no-wrap +msgid "" +"\n" +"# <i>vgdisplay</i>\n" +"--- Volume group ---\n" +"VG Name main\n" +"VG Access read/write\n" +"VG Status available/resizable\n" +"VG # 0\n" +"MAX LV 256\n" +"Cur LV 0\n" +"Open LV 0\n" +"MAX LV Size 255.99 GB\n" +"Max PV 256\n" +"Cur PV 1\n" +"Act PV 1\n" +"VG Size 33.28 GB\n" +"PE Size 4 MB\n" +"Total PE 8519\n" +"Alloc PE / Size 0 / 0\n" +"Free PE / Size 8519 / 33.28 GB\n" +"VG UUID 2qC2H2-iA8s-qW6F-cwXx-JVIh-I6VC-VVCGmn\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):242 +msgid "" +"Now that I had my volume group, I was ready to create a logical volume. I " +"decided to initially make it 8 gigabytes in size and call it \"lv_home\":" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):247 +msgid "Creating the logical volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):247 +#, no-wrap +msgid "" +"\n" +"# <i>lvcreate -L8G -nlv_home main</i>\n" +"lvcreate -- doing automatic backup of \"main\"\n" +"lvcreate -- logical volume \"/dev/main/lv_home\" successfully created\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):253 +msgid "Then, I created a filesystem on the volume:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):257 +msgid "Filesystem creation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):257 +#, no-wrap +msgid "" +"\n" +"# <i>mkreiserfs /dev/main/lv_home</i>\n" +"\n" +"\n" +" <----------- MKREISERFSv2 ----------->\n" +"\n" +" Block size 4096 bytes\n" +" Block count 2097152\n" +" Used blocks 8275\n" +" Journal - 8192 blocks (18-8209), journal header is in block 8210\n" +" Bitmaps: 17, 32768, 65536, 98304, 131072, 163840,\n" +" 196608, 229376, 262144, 294912, 327680, 360448,\n" +" 393216, 425984, 458752, 491520, 524288, 557056,\n" +" 589824, 622592, 655360, 688128, 720896, 753664,\n" +" 786432, 819200, 851968, 884736, 917504, 950272,\n" +" 983040, 1015808, 1048576, 1081344, 1114112,\n" +" 1146880, 1179648, 1212416, 1245184, 1277952,\n" +" 1310720, 1343488, 1376256, 1409024, 1441792,\n" +" 1474560, 1507328, 1540096, 1572864, 1605632,\n" +" 1638400, 1671168, 1703936, 1736704, 1769472,\n" +" 1802240, 1835008, 1867776, 1900544, 1933312,\n" +" 1966080, 1998848, 2031616, 2064384\n" +" Root block 8211\n" +"Hash function \"r5\"\n" +"ATTENTION: ALL DATA WILL BE LOST ON '/dev/main/lv_home'! (y/n)y\n" +"journal size 8192 (from 18)\n" +"Initializing journal - 0%....20%....40%....60%....80%....100%\n" +"Syncing..done.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):287 +msgid "" +"Now that the filesystem was created, I could mount it at <path>/mnt/newhome</" +"path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):292 +msgid "Mounting the new volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):292 +#, no-wrap +msgid "" +"\n" +"# <i>mkdir /mnt/newhome</i>\n" +"# <i>mount /dev/main/lv_home /mnt/newhome</i>\n" +"# <i>df</i>\n" +"Filesystem 1k-blocks Used Available Use% Mounted on\n" +"/dev/hda3 9765200 6989840 2775360 72% /\n" +"tmpfs 291388 0 291388 0% /dev/shm\n" +"/dev/main/lv_home 8388348 32840 8355508 1% /mnt/newhome\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):302 +msgid "" +"As you can see above, I was almost ready to copy over all my data in <path>/" +"home</path>. Before I began, I dropped to runlevel 1 to ensure that no users " +"or processes would be accessing or modifying files in <path>/home</path> as " +"they were being copied over:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):309 +msgid "Runlevel 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):309 +#, no-wrap +msgid "" +"\n" +"# <i>init 1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):313 +msgid "Then, I began copying the files:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):317 +msgid "Copying files to the new directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):317 +#, no-wrap +msgid "" +"\n" +"# <i>cp -avx /home/* /mnt/newhome</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):321 +msgid "" +"The copy completed in about ten minutes. Then, I backed up my original " +"<path>/home</path> to <path>/home.old</path>, just in case something was " +"wrong with my copy. I created a new mount point, and remounted the new home " +"at <path>/home</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):328 +msgid "The new mount point" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):328 +#, no-wrap +msgid "" +"\n" +"# <i>cd /</i>\n" +"# <i>mv home home.old</i>\n" +"# <i>mkdir home</i>\n" +"# <i>umount /mnt/newhome</i>\n" +"# <i>mount /dev/main/lv_home /home</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):336 +msgid "" +"Then, it was time to set up the server so that my new <path>/home</path> " +"partition would be available every time the machine started up. First, I " +"modified my <path>/etc/fstab</path> so that it included a new <path>/home</" +"path> entry:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):343 +msgid "Editing fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):343 +#, no-wrap +msgid "" +"\n" +"<comment>\n" +"#fs mountpoint type opts dump/pass</comment>\n" +"/dev/hda3 / reiserfs defaults 1 1\n" +"/dev/main/lv_home /home reiserfs defaults 2 2\n" +"/dev/hda2 none swap sw 0 0\n" +"/dev/hda1 /boot reiserfs noauto 0 0\n" +"/dev/cdrom /mnt/cdrom iso9660 noauto,ro 0 0\n" +"proc /proc proc defaults 0 0\n" +"none /dev/pts devpts mode=620 0 0\n" +"tmpfs /dev/shm tmpfs defaults 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):356 +msgid "" +"Then, I made minor modifications to my initialization scripts. I modified my " +"\"checkroot\" startup script so that the following commands would run " +"immediately after my root partition was remounted read/write:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):362 +msgid "Modifying the startup script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):362 +#, no-wrap +msgid "" +"\n" +"/sbin/vgscan\n" +"/sbin/vgchange -a y\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):367 +msgid "" +"Then, I modified my filesystem unmounting script that gets run on shutdown, " +"so that the following command would run immediately after all filesystems " +"were unmounted:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):373 +msgid "Modifying the shutdown script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):373 +#, no-wrap +msgid "" +"\n" +"/sbin/vgchange -a n\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):377 +msgid "" +"Once I had completed these steps, I rebooted the machine, and to my delight " +"everything worked perfectly. After a day or so of absolutely no problems, I " +"deleted <path>/home.old</path> to free up some space on my root filesystem. " +"Yay! The transition to LVM was a success." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):387 +msgid "The beauty of LVM" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):390 +msgid "" +"While the transition to LVM is a bit of an ordeal, once the transition is " +"complete, managing filesystems becomes tremendously easier. As an example, I " +"decided to resize my new <path>/home</path> logical volume, adding about 2 " +"gigabytes worth of space to the end of the filesystem. First, I added " +"additional capacity to my \"lv_home\" logical volume, and then I used the " +"<c>resize_reiserfs</c> utility to expand the filesystem so that it would use " +"this additional capacity. Here are the two commands that did all this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):400 +msgid "Using additional space" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):400 +#, no-wrap +msgid "" +"\n" +"# <i>lvextend -L+2G /dev/main/lv_home</i>\n" +"# <i>resize_reiserfs -f /dev/main/lv_home</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):405 +msgid "" +"In about a second, I had enlarged my <path>/home</path> filesystem by 2 GB; " +"amazingly, I didn't need to reboot, drop to runlevel 1, or even unmount " +"<path>/home</path> to perform the resize. Everything continued to work as it " +"had before. Isn't that great? Here's the current state of my filesystems:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre:caption):412 +msgid "Filesystem space" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(pre):412 +#, no-wrap +msgid "" +"\n" +"# <i>df</i>\n" +"Filesystem 1k-blocks Used Available Use% Mounted on\n" +"/dev/hda3 9765200 1413340 8351860 15% /\n" +"/dev/main/lv_home 10485436 5609836 4875600 54% /home\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(p):419 +msgid "" +"You can see how LVM really can make an administrator's work a whole lot " +"easier. In the future, I hope to move additional parts of my root filesystem " +"over to LVM, and eventually even convert my root filesystem over to an LVM " +"logical volume. The resources below will help you learn even more about LVM." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(title):429 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):433 +msgid "" +"For LVM concepts and advice on get the latest kernel patches and tools " +"installed on your system, see my previous article, <uri link=\"/doc/en/" +"articles/lvm-p1.xml\">Learning Linux LVM, Part 1</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):438 +msgid "" +"Download the <uri link=\"ftp://sources.redhat.com/pub/lvm2\">LVM tarball</" +"uri> from RedHat." +msgstr "" + +#. Comment out Sistina links, Bug #119882 +#. <li> +#. Sistina now has an excellent <uri +#. link="http://www.sistina.com/lvm/doc/lvm_howto/index.html">LVM HOWTO</uri> +#. available (it's closer to a full-blown manual than a simple HOWTO). +#. </li> +#. <li> +#. Be sure to check out the <uri +#. link="http://www.sistina.com/cgi-bin/lvm-faqprocessor.cgi">Linux LVM +#. FAQ</uri>. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):454 +msgid "" +"The impatient will want to check out <uri link=\"http://www.linux.org/docs/" +"ldp/howto/LVM-HOWTO.html\">Heinz Mauelshagen's LVM HOWTO</uri>, which " +"contains more examples on how to set up volume groups and logical volumes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):460 +msgid "" +"There's also an interesting HOWTO that shows you <uri link=\"http://www.the-" +"infinite.org/archive/docs/lvm/howto-boot-off-root-lv.txt\"> how to set up " +"your root filesystem on a logical volume</uri>. Once LVM-0.9.1_final is out, " +"I may try doing this." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):466 +msgid "" +"Andreas Dilger is involved with the Linux LVM project and has a nice-looking " +"<e>online</e><uri link=\"http://www-mddsp.enel.ucalgary.ca/People/adilger/" +"online-ext2/\">ext2 filesystem resizer</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):472 +msgid "" +"<uri link=\"http://www.namesys.com\">ReiserFS</uri> is an excellent " +"filesystem (especially in combination with LVM). If you're using ReiserFS, " +"you'll want to grab the reiserfs-utils tarball, which contains a program " +"called <c>reiserfs_resize</c> -- allowing online resizing of ReiserFS " +"filesystems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):479 +msgid "" +"For more information on setting up Linux software RAID volumes, see <uri " +"link=\"/doc/en/articles/software-raid-p1.xml\">Part 1</uri> and <uri link=\"/" +"doc/en/articles/software-raid-p2.xml\">Part 2</uri> of Daniel's series on " +"software RAID." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(li):485 +msgid "" +"For a refresher, see Daniel's <uri link=\"/doc/en/articles/linux-kernel-" +"compiling.xml\">tutorial on compiling the Linux kernel</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/making-the-distro-p1.xml.po b/article/gettext/ru/making-the-distro-p1.xml.po new file mode 100644 index 0000000..4de676e --- /dev/null +++ b/article/gettext/ru/making-the-distro-p1.xml.po @@ -0,0 +1,442 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(guide:link):5 +msgid "/doc/en/articles/making-the-distro-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):6 +msgid "Making the distribution, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="fox2mike@gentoo.org">Shyam Mani</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(abstract):15 +msgid "" +"Each of us has a story to tell about our experiences with Linux. This is " +"Daniel Robbins' Linux story. In this first of three articles, he talks about " +"how he became a Stampede Linux developer, and why he eventually left " +"Stampede to start his own distribution called Enoch." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(version):27 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(date):28 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):31 +msgid "Birth of the Gentoo Linux distribution" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):33 +msgid "Linux and me" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):36 +msgid "" +"For every Linux geek there's a time when Linux becomes more than just a name " +"and reveals itself as something more wonderful, powerful, and intriguing " +"than anything a developer has ever encountered. My revelation came while I " +"was working at the University of New Mexico as a sysadmin. Our NT server was " +"running pretty well and I had some extra time on my hands. So I got Debian " +"set up on a Pentium 166 server box and started learning ... and learning and " +"learning and learning. And then I was hooked." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):46 +msgid "" +"First I learned the basic ins and outs of Linux: how to get around, perform " +"backups, get Samba running, etc. Then I set up qmail and Apache and learned " +"python and shell programming. I built a departmental Intranet. I got Linux " +"installed at home and began trying different distributions. Finally I " +"settled with Stampede Linux. You know how the progression goes: first you " +"struggle with grasping Linux basics; then, when you have a decent grip, you " +"customize your Linux, learning as you go. Because Linux has nothing to hide, " +"you can explore the technology and tools that make it tick while you grow in " +"Linux fluency." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):61 +msgid "Linux is about potential" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):64 +msgid "" +"Linux offered something I had never seen before. If I had to put that " +"magical something into words, I'd call it potential: the potential to " +"change, to improve, to fix things, and yes, even to break things. As I " +"upgraded to new kernel versions I saw Linux improve before my eyes and " +"transform itself almost daily. And I was along for the ride! I was a part of " +"the transformation. It was fun." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):73 +msgid "" +"If you're anything like me, before you were exposed to Linux and open source " +"you looked to those big companies in Redmond and Cupertino to provide a next-" +"generation operating system that finally worked exactly the way you wanted " +"it to. But alas, that dream never became reality. And while we were waiting, " +"Linux came along. And although it had a lot of rough edges, it provided " +"something for us hacker guys and gals that we could improve upon while we " +"waited for the next big thing. Then one day we awoke to find that Linux had " +"become the next big thing. And smiling all the while, we continued to hack " +"away." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):88 +msgid "Linux is about people" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):91 +msgid "" +"The next thing I learned was that Linux is about people. Isn't that " +"refreshing? Linux isn't just a bunch of source code. It's a community. We " +"rely on this community to get our questions answered, and we become part of " +"the community when we start helping others by contributing our time and " +"expertise." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):98 +msgid "" +"IRC (Internet relay chat) is a great place to meet people and waste a " +"tremendous amount of time. The #stampede channel on irc.openprojects.net " +"became my official hangout. That's where I'd ask my Linux questions. It's " +"also where I first began to help other people out. #stampede desperately " +"needed experienced Linux users to help out newbies who had just gotten the " +"distribution installed. As is common on IRC, many of the experienced " +"Stampede people had lost their zeal for answering (yet another) newbie " +"question. But I was so excited that I actually knew the answer to newbies' " +"questions, that I couldn't resist helping out! And that's how my involvement " +"with Stampede began. I was just another guy who liked to answer questions. " +"Of course, it wasn't entirely altruistic, because I also helped myself to " +"expert Linux knowledge that the more experienced people on the channel (not " +"to mention the Stampede developers themselves!) had to offer." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):117 +msgid "Getting involved" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):120 +msgid "" +"When people ask me how to get involved in an open source project, I tell " +"them to find a place where they can be helpful, even if it's just by helping " +"with basic Linux questions. A sincere desire to help others is a great " +"ticket into the Linux community because this sentiment is at the heart of " +"all open source development (including Linux). At least, it should be." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):128 +msgid "" +"Along the way you'll inevitably run into people who know more than you. And " +"you'll learn from them just as newbies continue to learn from you. It's also " +"likely that as you gain more experience you'll come across opportunities to " +"help in new ways. Maybe some of the project developers you come across will " +"suggest something, or they'll ask for help themselves. They may even invite " +"you to become part of the development team. If you're focused on helping " +"others, they'd be foolish to pass you by. If you're helping a lot of people " +"out, you will definitely be noticed in the community. That's sort of how it " +"happened with Stampede and me." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):140 +msgid "" +"Gradually I became more and more involved in Stampede development. Before " +"long, I was an official Stampede developer. With the blessing of skibum " +"(Matt Wood, Stampede's head honcho), I began working on a new version of " +"Stampede's primitive .slp packaging format. At the time the .slp package " +"format consisted of a .tar.bz2 archive with a fixed-length footer stuck on " +"the end that contained information about the package author, a description " +"of the contents, the package creator, etc. This approach had two major " +"problems: the fields were a fixed length and the footer really wasn't that " +"big, and there was no extensibility built into the format (there was no way " +"to add any additional fields to the .slp format in the future). Obviously " +"this thing needed a major overhaul." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):153 +msgid "" +"Working with the senior Stampede developers, I wrote up a proposal of how to " +"deal with the problem. Then I started coding the prototype tools in Python. " +"The new format (codenamed slpv6) was somewhat similar to the IFF file format " +"from the Amiga world. This next-generation .slp format allowed for 2 32 " +"fields, 2 32 categories of fields, and a maximum field data length of 2 32 " +"bytes. Not only was the format very extensible, it was also more compact " +"than plain-text and easy to parse. Both text and binary data could be stored " +"in the format, which allowed for a lot of possibilities for the future. The " +"idea was to stick this next-generation dynamic header on the end of the " +"archive file, thereby producing a next-generation .slp format that would " +"serve Stampede users for years to come and at the same time maintain " +"compatibility with standard UNIX archive formats." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):170 +msgid "People can get ugly" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):173 +msgid "" +"slpv6 development was going well and all the senior developers were happy " +"with my progress. But unfortunately, two lower-level Stampede developers " +"wanted to control the slpv6 project. They didn't like the direction I was " +"taking, and they spent most of their time insulting the new slpv6 system. " +"Though I spent hours in heated development discussions defending the " +"proposal against their attacks, we weren't able to resolve anything. " +"Eventually it became clear that they were just naturally argumentative and " +"wouldn't be happy until they had their way. Fortunately for me, my project " +"had the approval of the senior Stampede developers. But these discussions " +"began to wear on me and made Stampede development very unpleasant. Ugh!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):186 +msgid "" +"I couldn't avoid these guys since I had to hang out on #stampede to chat " +"with higher-level developers. And every time I was on the channel they " +"became combative, trying to undermine my work. They'd use devious techniques " +"like calling for development meetings (really just an opportunity to insult " +"my work in front of the senior developers). They'd also try to call for " +"votes, attempting to seize control of Stampede. Of course they'd only call " +"for a vote when they thought they had convinced enough people to agree with " +"them. Throughout all of this I continued my slpv6 development. Needless to " +"say, the senior development loved my work and wanted me to continue (without " +"their support I wouldn't have been able to stick it out)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):202 +msgid "Understanding the freak" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):205 +msgid "" +"These two guys belong to a category of developer I like to call \"the freak" +"\". But although they made my development work very unpleasant, I also " +"learned a lot from having to deal with them. At this point I'd like to offer " +"you an expos?f the freak developers, a sort of comprehensive overview: the " +"qualities that make a freak, the freak's modus operandi, and how you, the " +"development project leader, can confront and possibly reform the freak " +"without exerting a lot of effort." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):215 +msgid "" +"In order to avoid emotional damage, you'll need one prerequisite: a " +"backbone. If you're unable to confront the freak in a respectful but firm " +"manner, there's no hope. The freak's goal is to control as much of your " +"project as possible so that he or she will feel powerful. The freak will use " +"several techniques to make this happen. First they'll start unfairly " +"criticizing or bitterly complaining about a project and/or the developers " +"working on a project. Then they will refrain from offering any constructive " +"solutions. They will also not be willing to help with the project in any " +"other way unless they are promoted to the role of project manager. Their " +"goal is to convince you to give them as much authority as possible so that " +"they can solve problems that only they, with their finely trained freak " +"eyes, can see." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):229 +msgid "" +"If the criticism and complaining aren't effective, they'll request a " +"developer meeting. This will be their opportunity to try and divide your " +"development team into two factions. When they think that they've gotten " +"enough people on their side, they'll request a vote (knowing they will win). " +"If they don't win the vote or they are overruled, they'll push for another " +"developer meeting next week in which they'll again try to divide your " +"development team. They'll repeat this process endlessly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):239 +msgid "" +"If the developer meeting approach doesn't work, freaks will become " +"reformers. By adopting this role they will try to streamline (read: " +"undermine) the oppressive and unfair executive decision-making process by " +"attempting to replace it with something more democratic (read: easily " +"manipulated.) This will often involve convincing you that you should do " +"whatever the majority of your developers want. Freaks love this because then " +"you can't override those developer meeting votes anymore (muhahaha!). If you " +"allow this to happen, you've basically given the freak the keys to your " +"Lexus. You're powerless." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):250 +msgid "" +"In another approach, freaks will irritate and drive away your productive " +"developers. Then they'll work your entire team into a frenzy as they " +"forcefully try to reform the project's power structure. If their efforts are " +"finally defeated, they'll try to rally as many defectors together as " +"possible and fork from your project. Ouch!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):261 +msgid "Managing the freak" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):264 +msgid "" +"You can identify these guys pretty easily. They're the ones who aren't " +"writing any code (nor do they have any intention to). Instead they spend " +"their time talking about more important things. You know, those managerial " +"issues. If you're a project leader, it's pretty easy to deal with them. Just " +"tell them that you won't consider any proposal unless they produce working " +"code. Or insist that they constructively help the current project, which " +"includes obeying the current project manager, before giving them the " +"opportunity to offer any (constructive) criticism. If they write some nice " +"code or start being more helpful, great. If not, tell them to go away. " +"They'll either leave the project (if you ignore them long enough), or " +"they'll get their act together and start writing some code and generally " +"become more pleasant." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):278 +msgid "" +"Unfortunately the senior Stampede developers didn't take on freak " +"management. In other words, they allowed these two guys to pester me (and " +"others) to no end. While the senior developers were always in favor of my " +"development work, they didn't do much to get these guys under control. So " +"one day I decided that it would be easier to create my own distribution " +"rather than have to put up with the two freaks. I resigned from Stampede " +"development and started making plans to produce my own distro." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):288 +msgid "" +"While I felt a bit weird about leaving a project because of two lower-level " +"developers, the fact that they weren't dealt with really indicated that the " +"project had severe managerial problems. If the higher-level developers " +"weren't able or willing to make sure the Stampede development effort was " +"pleasant and rewarding, then I didn't want to be there." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):299 +msgid "Starting afresh" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):302 +msgid "" +"Once I left I breathed a big sigh of relief. Wow! Finally, things were calm " +"and quiet. Now it was time to define what my distribution would be about and " +"what it would contribute to the Linux distribution scene. One of the things " +"that attracted me to Stampede was its raw performance (thanks to its use of " +"the experimental Pentium-optimized pgcc compiler). So I decided to focus " +"first on performance. In addition to minimizing CPU utilization, I also " +"wanted to minimize bloat. Too many distributions (especially those popular " +"shrink-wrapped ones) enable so many daemons by default that you barely have " +"any RAM left after opening an xterm. I wanted my distribution to be lean and " +"mean, and focused on maximizing the performance of the hardware that it ran " +"on. I decided to take a holistic approach and tackle the performance problem " +"from all angles." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):316 +msgid "" +"But I had a serious lack of resources, since I was the only developer for my " +"distribution! How could I possibly create something that was comparable to " +"Caldera or RedHat off the ground on my own? The answer was automation. I had " +"to write scripts to automate everything, so that I would have a minimal " +"amount of time-consuming, repetitive labor. After all, that's what computers " +"do best, right?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):325 +msgid "" +"I quickly saw that writing simple scripts for the kind of automation I " +"needed wasn't going to be enough. I needed to design a complete system for " +"generating a Linux distribution from scratch. I tentatively called it the " +"ebuild system and got to work. The ebuild system would be able to " +"automatically create all the distribution binaries, automating everything " +"from unpacking and patching the sources to compilation, installation and " +"packaging. After getting a basic ebuild prototype working, I started " +"creating ebuild scripts for the key components of a Linux distribution (like " +"gcc, glibc, binutils, util-linux, and friends). My Stampede development box " +"was gradually turning into my own system, as I redesigned the initialization " +"scripts (basing them on the Stampede initialization scripts that I had " +"previously designed) and testing and installing every new package that I " +"created." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):340 +msgid "" +"A few months later I had a complete, self-hosted Linux distribution. I named " +"it Enoch and sat back and smiled contentedly. But what became of Enoch, and " +"how did Gentoo Linux evolve? Join me in my next article as I tell the story " +"of how Enoch became Gentoo Linux, and the many new challenges I faced along " +"the way." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):350 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(li):354 +msgid "" +"Continue reading my story with \"Making the distribution, <uri link=\"/doc/" +"en/articles/making-the-distro-p2.xml\">Part 2</uri> and <uri link=\"/doc/en/" +"articles/making-the-distro-p3.xml\">Part 3</uri>\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(li):359 +msgid "" +"Visit the <uri link=\"/index.xml\">Gentoo Linux Web site</uri> for more " +"information on the distribution." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(li):363 +msgid "" +"Learn more about the Gentoo Linux ebuild system in Daniel's article, <uri " +"link=\"http://www.gentoo.org/doc/en/articles/bash-by-example-p3.xml\">Bash " +"by example, Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(title):373 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(p):376 +msgid "" +"Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of " +"Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a " +"contributing author of several books published by MacMillan: Caldera " +"OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has " +"been involved with computers in some fashion since the second grade when he " +"was first exposed to the Logo programming language and a potentially lethal " +"dose of Pac Man. This probably explains why he has since served as a Lead " +"Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys " +"spending time with his wife Mary and his new baby daughter, Hadassah. You " +"can contact Daniel at <mail link=\"drobbins@gentoo.org\">drobbins@gentoo." +"org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/making-the-distro-p2.xml.po b/article/gettext/ru/making-the-distro-p2.xml.po new file mode 100644 index 0000000..31ea68f --- /dev/null +++ b/article/gettext/ru/making-the-distro-p2.xml.po @@ -0,0 +1,469 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(guide:link):5 +msgid "/doc/en/articles/making-the-distro-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):6 +msgid "Making the distribution, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="fox2mike@gentoo.org">Shyam Mani</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(abstract):15 +msgid "" +"In his previous article, Daniel Robbins told the story of how he became a " +"Stampede Linux developer and why he eventually left Stampede to start the " +"Enoch Linux distribution. In this go-round he lets you in on the strange " +"events that happened after the Enoch development team discovered a little-" +"known, blazingly fast compiler." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(version):28 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(date):29 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):32 +msgid "From Enoch to Gentoo, via minor setbacks and corporate run-ins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):34 +msgid "First steps to Enoch" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):37 +msgid "" +"In my <uri link=\"/doc/en/articles/making-the-distro-p1.xml\">previous " +"article</uri>, I gave you the low-down on my days with the Stampede " +"development team and why I left (to get away from lower-level politically-" +"minded, project-controlling \"freaks\"). Because of the interference from " +"these meddlesome by-standers, I figured it would be easier to put together " +"my own Linux distribution than to continue improving Stampede under such " +"dirty conditions! Fortunately I took with me a considerable amount of " +"experience based on my (may I say substantial?) work for Stampede, including " +"maintaining several of their packages, designing the initialization scripts, " +"and leading the slpv6 (next-generation package management project)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):50 +msgid "" +"The distribution I began working on, code-named Enoch, was going to be " +"blazingly fast because it would completely automate the package creation and " +"upgrading process. I have to admit that this was in large part because I was " +"a one-member team and couldn't afford to spend my time on repetitive work " +"that my development box could be automated to do for me. And since I was " +"designing a complete distribution from scratch (rather than \"spinning off\" " +"from someone like RedHat), I had my work cut out for me and needed all the " +"free time I could scrounge up." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):60 +msgid "" +"After getting my basic Enoch system up and running, I headed back to irc." +"openprojects.net and started my own channel called #enoch. From there I " +"gradually assembled a team of about ten developers. In those early days we " +"all hung out on IRC and worked on the distribution in our spare time. As we " +"communally and cooperatively hacked away at it, finding and fixing new bugs, " +"Enoch became more functional and professional every day." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):72 +msgid "The first roadblock" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):75 +msgid "" +"One inevitable day, Enoch hit its first roadblock. After adding Xfree86, " +"glib, and gtk+, I decided to get xmms (an X11/gtk+-based MP3/CD player app) " +"working. I figured it was time to celebrate with some music! But after " +"installing xmms, I tried to start it... and X locked up! At first I thought " +"xmms locked up because I used insane compiler optimizations (\"-O6 -" +"mpentiumpro\", in case you were wondering). My first thought, to compile " +"xmms with standard optimizations, didn't solve the problem. So I started " +"looking elsewhere. After spending a full week of development time trying to " +"track down the problem, I got an e-mail from an Enoch user, Omegadan, who " +"was also experiencing xmms lockups." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):87 +msgid "" +"We corresponded for a while, and after many hours of testing we determined " +"that the problem was a POSIX threads-related issue. For some reason, a " +"pthread_mutex_trylock() call did not return the way it should. As the " +"creator of a distribution, these were the types of bugs I really didn't want " +"to encounter. I counted on the developers to release perfect sources so I " +"could focus on enhancing the Linux experience rather than getting buggy " +"sources to work. Of course I soon learned that this was an unrealistic " +"expectation, and that problems like will always pop up from time to time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):98 +msgid "" +"As it turned out, the problem wasn't with xmms, gtk+, or glib. And it wasn't " +"an issue with Xfree86 3.3.5 not being thread-safe and locking up. " +"Surprisingly, we found the bug in the Linux POSIX threads implementation " +"itself, part of the GNU C library (glibc) version 2.1.2. I was shocked at " +"the time to find that such a critical part of Linux had such a major bug. " +"(And we used a release version of glibc in Enoch, not a prerelease or CVS " +"version!)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):107 +msgid "" +"So how did we track down the problem? Actually, we never were able to come " +"up with a bug fix, but at one point I stumbled across a couple of e-mails on " +"the glibc developer mailing list from another person who had the same " +"problem. The glibc developer who replied posted a patch that solved the " +"thread problem for us. But I was curious why RedHat 6 (which also used glibc " +"2.1.2) didn't suffer from this problem since the patch was just posted and " +"RedHat 6 had been available for some time. To find out, I downloaded " +"RedHat's glibc SRPM (source RPM) and took a look at their patches." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):118 +msgid "" +"RedHat had their own homegrown glibc patch that solved the " +"pthread_mutex_trylock() issue. Apparently they experienced the same problem " +"and created their own custom fix. Too bad they didn't send this patch " +"\"upstream\" to the glibc developers so it could be shared with the rest of " +"the world. But who knows, maybe RedHat sent the patch upstream and for some " +"reason the glibc developers didn't accept it. Or maybe the thread bug was " +"triggered by a specific combination of compiler and binutils versions, and " +"RedHat never ran into it (although they did have a thread patch in their " +"SRPM). I suppose we'll never know exactly what happened. But I did learn " +"that RedHat SRPMs contain a lot of private bug fixes and tweaks that never " +"seem to make it upstream to the original developers. I'm going to rant about " +"this for a little while." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):135 +msgid "Rant" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):138 +msgid "" +"When you put together a Linux distribution it's really important that any " +"bug fixes you create are sent upstream to the original developers. As I see " +"it, this is one of the many ways that distribution creators contribute to " +"Linux. We're the guys who actually get all these different programs working " +"as a unified whole. We should send our fixes upstream as we unify so that " +"other users and distributions can benefit from our discoveries. If you " +"decide to keep bug fixes to yourself, you're not helping anyone; you're just " +"ensuring that a lot of people will waste time fixing the same problem over " +"and over again. This kind of policy goes against the whole open source ethic " +"and stunts the growth of Linux development. Maybe I should say that it \"bugs" +"\" us all." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):151 +msgid "" +"It's unfortunate that some distributions (ahem) aren't as good (RedHat) as " +"others (Debian) about sharing their work with the community." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):159 +msgid "Compiler drama" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):162 +msgid "" +"During the time we were trying to fix the glibc threads problem, I e-mailed " +"Ulrich Drepper (one of the guys at Cygnus who is heavily involved with glibc " +"development). I mentioned the POSIX thread problem we were having, and that " +"Enoch was using pgcc for optimum performance. And he responded with " +"something like this (I'm paraphrasing here): \"Our own compiler included " +"with the CodeFusion product has an excellent x86 backend that produces " +"executables far faster than those generated with pgcc.\" Obviously, I was " +"very interested in testing out this mystery \"turbo\" compiler the Cygnus " +"guys had created." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):173 +msgid "" +"I thereupon requested a demo copy of Cygnus Codefusion 1.0 so that I could " +"test it out, and Omegadan and I were amazed to find that this compiler was " +"everything that Ulrich claimed and then some. The x86 backend increased the " +"performance of some of the CPU-intensive executables (like bzip2) by close " +"to 90%! All applications seemed to benefit from at least a 10% real-world " +"performance increase, and all we did was swap out compilers. Enoch even " +"booted 30 - 40% faster. The performance gains were far, far greater than " +"what we gained by switching from gcc to pgcc. Obviously, after experiencing " +"it for ourselves, we wanted to use this compiler for Enoch. Fortunately, the " +"sources were included on the CodeFusion CD and were released under the GPL, " +"so we were fully permitted to use this compiler... or so we thought." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):190 +msgid "Let the freakiness begin" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):193 +msgid "" +"I sent an e-mail to the marketing manager at Cygnus to let them know our " +"intentions, expecting a \"yeah, go for it, thanks for using our compiler\" " +"response. Instead the reply was that although we were (technically) allowed " +"to use the Cygnus compiler, we were strongly urged not to use or include the " +"compiler sources with Enoch. I responded by asking why they had released the " +"source under the GPL, if that was the case. It's my guess that if they had a " +"choice, they wouldn't have used the GPL, but because they derived their " +"compiler from egcs (released under the GPL), they had no choice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):204 +msgid "" +"This is a good example of a situation where the GPL prevented a company from " +"creating a proprietary product based on open sources. My educated guess is " +"that Cygnus was afraid that if we used their compiler we would undermine " +"their boxed product sales, which would be especially strange because none of " +"their marketing materials (nor the InfoWorld review) mentioned the new " +"compiler included with CodeFusion. CodeFusion was marketed solely as a " +"\"development IDE\" product, not as a compiler." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):214 +msgid "" +"In an attempt to put some of their paranoia to rest, I offered to endorse " +"CodeFusion and place the endorsement on our Web site with a link to help " +"spur CodeFusion sales. Personally I didn't think that a \"turbo\" Enoch " +"would negatively affect their sales, since CodeFusion was marketed as an " +"IDE. But I tried nevertheless to make them happy. The IDE component of " +"CodeFusion was a commercial product, and we had no desire or intention (or " +"right) to distribute it with Enoch." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):224 +msgid "" +"I e-mailed my (generous?) offer to Cygnus and received another strange " +"response. They wanted authority over all of our \"marketing materials" +"\" (apparently, this also included the content of our Web site!) Another " +"shocker. The Cygnus marketing team seemed to have no grasp of how the Linux " +"community or the GPL worked, so I decided to cut off communication with " +"Cygnus for the indefinite future. In the mean time, we created a private " +"\"turbo\" and public \"non-turbo\" version of Enoch, leaving the final " +"decision for later." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):234 +msgid "" +"But after several months they integrated the CodeFusion x86 backend into gcc " +"2.95.2. Now everyone could benefit from the nice new backend, not just the " +"people who knew about the \"secret GPL compiler\" included on the CodeFusion " +"CD. But we decided to go ahead and use gcc rather than the CodeFusion " +"compiler. In addition to being more stable, gcc 2.95.2 also allowed us avoid " +"Cygnus, which by this time had been purchased by RedHat for a ridiculous sum " +"of money. (Note: the new x86 backend in gcc 2.95.2 is what gave newer Linux " +"distributions the significant speed boost that we all got to experience. It " +"also gave FreeBSD 4.0 a nice speed boost over 3.3.6. Notice the difference?)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):249 +msgid "On the soapbox" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):252 +msgid "" +"Thanks to this and other experiences, I've learned a lot about for-profit " +"open source companies. There's absolutely nothing bad about being a for-" +"profit open source company. Nor is there anything morally wrong with " +"producing proprietary closed-source software, if that's what you'd like to " +"do. But it doesn't make any sense for open source companies to subvert or " +"refuse to cooperate with the rest of the open source world, either by not " +"supporting the GPL or by any other means. This is a practical point that " +"clearly makes business sense." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):262 +msgid "" +"Open source companies should realize that the free exchange of ideas and " +"code is what they profit from. By opposing things like the standard GPL " +"practices, they undermine the environment they rely upon to prosper and " +"grow. If open source is the soil from which your business has sprouted, it " +"makes sense to keep the soil healthy." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):270 +msgid "" +"I understand that there's a temptation to keep at least some information " +"secret for short-term financial gain. Advanced code or special techniques " +"provide a coveted competitive advantage, which could potentially result in " +"increased sales and profit. But if the goal is to be the sole provider of a " +"product, the product should be commercial rather than open source. Open " +"source does not allow for exclusive access to the inner workings of " +"anything. That's what it means." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):282 +msgid "Back to Enoch" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):285 +msgid "Now, I'll step down from my soapbox and continue my story." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):289 +msgid "" +"As Enoch became more and more refined, we decided that a name change was in " +"order, and \"Gentoo Linux\" was born. By this time we had released a couple " +"of versions of Enoch (now Gentoo), and were racing to get to Gentoo Linux " +"version 1.0. Around this time I also decided to upgrade my old Celeron 300 " +"box (overclocked and rock-solid at 450Mhz) to a brand-new Abit BP6 (a dual " +"Celeron board that had just hit the market). I sold my old box and put my " +"dual Celeron 366 system together. After overclocking the processors to " +"something on the order of 500Mhz, I was cruising. But I noticed that my new " +"machine wasn't very stable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):300 +msgid "" +"Obviously my first reaction was to go back down to 2x366Mhz. But now I " +"experienced an even stranger problem. As long as my machine kept the CPUs " +"chugging away, the machine didn't lock up. But if I left the machine idle " +"overnight, there was a good probability that the system would lock up " +"completely. Yes, an idle bug -- argh! After some research, I found several " +"other Linux users with the same problem on this particular motherboard. A " +"chip on the BP6 (was it the PCI controller?) seemed to be flaky or out of " +"spec, which caused Linux to lock up at idle." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):311 +msgid "" +"I was more than a wee bit upset, and because I couldn't afford to order more " +"PC parts, Gentoo development effectively halted. I became more and more " +"pessimistic about Linux and decided to switch over to FreeBSD. Yes, FreeBSD. " +"And that's where I'll end this installment -- see you in Part 3. :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):321 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):325 +msgid "" +"Start at the beginning of my story with \"Making the distribution\", <uri " +"link=\"/doc/en/articles/making-the-distro-p1.xml\">Part 1</uri>, and finish " +"up with <uri link=\"/doc/en/articles/making-the-distro-p3.xml\">Part 3</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):330 +msgid "" +"Find out more about <uri link=\"/index.xml\">Gentoo Linux</uri> from our Web " +"site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):334 +msgid "" +"Check out the competetion at <uri link=\"http://www.freebsd.org/\">FreeBSD</" +"uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):338 +msgid "" +"Read up on the <uri link=\"http://www.gnu.org/copyleft/gpl.html\">GPL</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):341 +msgid "" +"Take a look at the official <uri link=\"http://www.stampede.org/\">Stampede " +"site</uri>." +msgstr "" + +#. <li> +#. Hang out on <uri +#. link="http://irc.openprojects.net/">irc.openprojects.net</uri>. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):349 +msgid "" +"Find out more about the <uri link=\"http://www.xfree86.org/\">Free X86 " +"Project</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):353 +msgid "" +"Get the <uri link=\"http://developer.gnome.org/doc/API/gtk/\">GTK+ Reference " +"Documentation</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):357 +msgid "" +"Check out the <uri link=\"http://www.xmms.org/\">XMultiMedia System</uri>, " +"an X11/gtk+-based MP3/CD player app." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):361 +msgid "" +"Get started on threads with a <uri link=\"http://www.math.arizona.edu/swig/" +"pthreads/threads.html\">POSIX Threads tutorial</uri> from the University of " +"Arizona." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):366 +msgid "" +"Get the latest on the <uri link=\"http://www.rpm.org/\">RPM Packaging Tool</" +"uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):370 +msgid "" +"Visit the good folks at <uri link=\"http://www.debian.org/\">Debian</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(li):373 +msgid "And see the official <uri link=\"http://gcc.gnu.org/\">GCC</uri> site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(title):381 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(p):384 +msgid "" +"Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of " +"Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a " +"contributing author of several books published by MacMillan: Caldera " +"OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has " +"been involved with computers in some fashion since the second grade when he " +"was first exposed to the Logo programming language and a potentially lethal " +"dose of Pac Man. This probably explains why he has since served as a Lead " +"Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys " +"spending time with his wife Mary and his new baby daughter, Hadassah. You " +"can contact Daniel at <mail link=\"drobbins@gentoo.org\">drobbins@gentoo." +"org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/making-the-distro-p3.xml.po b/article/gettext/ru/making-the-distro-p3.xml.po new file mode 100644 index 0000000..5cc41aa --- /dev/null +++ b/article/gettext/ru/making-the-distro-p3.xml.po @@ -0,0 +1,501 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(guide:link):5 +msgid "/doc/en/articles/making-the-distro-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):6 +msgid "Making the distribution, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="fox2mike@gentoo.org">Shyam Mani</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(abstract):15 +msgid "" +"This article concludes his story -- about how he ended up creating his own " +"distribution called Gentoo Linux. He wraps up the series by telling how he " +"left the Linux world to move to FreeBSD, and then came back to the Linux " +"world, restarting Gentoo Linux development with a fresh perspective. In " +"addition to comparing Linux and FreeBSD in a number of areas, he also " +"describe current Gentoo Linux development progress and share a future vision " +"for the distribution." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(version):30 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(date):31 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):34 +msgid "The author strays from Linux and then returns" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):38 +msgid "" +"At the end of my <uri link=\"/doc/en/articles/making-the-distro-p2.xml" +"\">previous article</uri>, I described how Gentoo Linux development had " +"effectively been brought to a halt by a strange idle-lockup bug that I began " +"experiencing as soon as I upgraded to a new dual-Celeron motherboard (an " +"Abit BP6). Because I was unable to fix the problem, and at the time didn't " +"have the funds to replace my motherboard, I decided to halt Gentoo Linux " +"development and switch over to FreeBSD. I needed a working system, and since " +"Linux was locking up all the time, this would be an excellent time to get " +"familiar with a BSD operating system. So I installed FreeBSD, started " +"learning, and didn't touch Linux at all for several months." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):54 +msgid "FreeBSD impressions" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):57 +msgid "" +"All in all, I really liked FreeBSD. I felt that the operating system was " +"well put together and that nearly every part of the system had a " +"consistently high-level of refinement that's almost never found in the Linux " +"world. I enjoyed the fact that FreeBSD contained a full complement of man " +"pages, unlike Linux where many programs only have GNU info documentation, " +"which I don't particularly like using." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):66 +msgid "" +"Most of all, I was impressed with FreeBSD's ports system, the technology " +"used to maintain and upgrade the system. Unlike the Linux approach, ports " +"didn't use binary packages but instead automatically compiled everything " +"locally from their original sources. Whether you were installing Samba or " +"upgrading the core system, everything was compiled right on your local " +"machine. This approach appealed to me and was very similar to the one I had " +"been creating under Gentoo Linux. In this and many other ways, FreeBSD's " +"design agreed with my sensibilities as a developer and a system " +"administrator. For this reason, FreeBSD provided a comfortable work " +"environment for many months, and I'm glad I took the time to get familiar " +"with this excellent operating system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):82 +msgid "FreeBSD pros" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):85 +msgid "" +"A lot of the differences between Linux and FreeBSD come from their different " +"development structures. Linux development is very decentralized, and we rely " +"on distributions to pull in and unite the various pieces of Linux scattered " +"throughout the Internet. Compare this to FreeBSD and the other BSDs (OpenBSD " +"and NetBSD), where there's a unified development team plugging away at a " +"single, unified set of sources. Well, at least each BSD has its own set of " +"unified sources. This can be a good thing, and results in FreeBSD not having " +"a \"patched together\" feel like many Linux distributions do." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):96 +msgid "" +"Next, we can compare the technology under the hood. Many a FreeBSD fan will " +"assert that FreeBSD is better suited to being a server than Linux is. " +"They'll tell you that FreeBSD is better under high loads, and has a better " +"TCP/IP stack. If you're comparing Linux 2.2 or earlier with FreeBSD, I'd " +"have to agree. FreeBSD is a great server OS, that's for sure. But, that's " +"just Linux 2.2 and earlier. I happen to be a big fan of the 2.4 test kernels " +"that I've been running. They're really, really great and contain a nice TCP/" +"IP stack and a totally redesigned \"netfilter\" system that really rocks. In " +"the end, I think that Linux will be the one to set new performance standards " +"and make free UNIX servers even more competitive versus their commercial " +"counterparts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):112 +msgid "FreeBSD cons" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):115 +msgid "" +"As for the desktop, rather than the server world, there's really no " +"comparison -- Linux is where the action is. All the latest desktop " +"developments appear on Linux first, and Linux is ahead in its support of " +"accelerated 3D graphics and sound cards. With Linux 2.4 approaching, Linux " +"will continue its dominance in this area." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):123 +msgid "" +"The one thing I don't like about FreeBSD is its use of the UFS filesystem. " +"While UFS is more reliable and rugged than ext2, it's also mind-numbingly " +"slow. It's possible to use a special UFS extension called soft updates, " +"which is able to speed up the filesystem by aggregating IO operations into " +"bigger chunks. While soft updates improves UFS tremendously, I can't say " +"that UFS really outperforms ext2 in any way. Of course, it's more reliable, " +"so FreeBSD ends up beating Linux in the filesystem war. Again, at least this " +"is true when comparing older Linux 2.2 distributions to FreeBSD." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):134 +msgid "" +"However, the tables turn when we start to compare modern Linux 2.2 and Linux " +"2.4 to FreeBSD. ReiserFS (a new journalling filesystem available for Linux) " +"is just amazing. Linux also has ext3, IBM's JFS, and XFS to look forward to, " +"from which we expect excellent performance and reliability as well. As of " +"now, ReiserFS gives Linux a major speed advantage over FreeBSD, and is one " +"of the reasons I believe that Linux 2.4 overturns many of the old arguments " +"of FreeBSD's superiority over Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):147 +msgid "Back to Gentoo Linux development" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):150 +msgid "" +"After a few months, I decided to rejoin the Linux world and get Gentoo Linux " +"running on a new development box. At first, the decision to restart Gentoo " +"Linux development was more of a business decision -- I had invested a lot of " +"my time in becoming Linux-knowledgeable, and it would be a waste to throw " +"all this knowledge away by sticking with BSD. However, shortly after I began " +"updating Gentoo Linux, I found several new reasons why Linux was worth " +"switching back to, namely all the filesystem and kernel improvements " +"mentioned above. FreeBSD was a peaceful home, but a little too boring, too " +"staid. Linux is where the action was, where major progress was being made. " +"There's no doubt that if you're looking for excitement and innovation, Linux " +"is the place to be." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):163 +msgid "" +"To me, the Linux 2.2 era was a disappointing letdown from the 2.0 era, but " +"the 2.4 era promised to be worth the wait. So, Gentoo Linux was reborn, and " +"I was excited." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):169 +msgid "" +"There was another key to Gentoo Linux's rebirth -- Achim Gottinger, my " +"development team lead. I want to take some space to thank Achim for helping " +"me restart Gentoo Linux development. I started getting e-mails from Achim " +"shortly before my return to the Linux world. In almost every e-mail, he'd " +"include some new .ebuild (autobuild) scripts for Gentoo Linux, or some " +"desperately needed bugfixes. As I restarted Gentoo Linux development, Achim " +"continued to contribute his time and resources to help get the distribution " +"back on its feet. Up until recently, Achim and I have been the only two " +"people working on Gentoo Linux, and this has been by choice. Because we both " +"have a similar vision for the distribution, and because of Achim's skill, we " +"were able to get a tremendous amount of work done and I never really felt " +"that adding a third developer would significantly help our progress. Now, " +"Achim serves as the Gentoo Linux development lead, and continues to make " +"major improvements to Gentoo Linux on an almost daily basis. We've reached " +"the point where we're ready for others to start working on our CVS tree, and " +"have begun to gradually and carefully expand the Gentoo Linux development " +"team." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):191 +msgid "The new vision" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):194 +msgid "" +"I don't feel that the time I spent in the BSD world was in any way wasted. " +"In fact, it gave me a tremendous opportunity to reflect on the happenings in " +"the entire Linux community and how Gentoo Linux could help to improve things." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):200 +msgid "" +"In the new version of Gentoo Linux, I made the decision to not use pgcc " +"anymore, nor use very high optimizations to compile all binaries. Since " +"stability was paramount, we would use reasonable (\"-O2 -mpentium\") " +"optimizations but provide an easy way for users to customize these " +"optimizations to their liking by using our autobuild system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):208 +msgid "" +"FreeBSD gave me a really good idea of how an autobuild system should " +"function. I decided to add several FreeBSD features to make our autobuild " +"system (now called Portage) a true next-generation ports system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):214 +msgid "" +"Portage is the heart of Gentoo Linux, and is more than a simple package " +"management or maintenance system. Consisting of a set of build tools and " +"build scripts, Portage allows you to rebuild the entire distribution from " +"original sources. But more importantly to me, Portage gives the user full " +"access to the intelligence of how Gentoo Linux was built. To us, this is " +"very important because it means that we are documenting how to build a " +"distribution while at the same time moving Gentoo Linux development forward. " +"And, because Portage is easy to use and understand, we hope that it will " +"open up Linux internals to even more people, so that others can begin to " +"contribute to our sources and scripts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):226 +msgid "" +"Portage is our way of opening up Linux technology to others. By studying the " +"autobuild scripts, you can see how all the various packages fit together " +"into a unified whole. If necessary, you can grab our entire CVS tree and " +"hack away at it, producing your own custom distribution or Linux-based " +"technology. We believe that this is a good thing -- we want to give people " +"the knowledge they need to take Linux into new realms." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):238 +msgid "Commercial concerns" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):241 +msgid "" +"Since its inception, there have been many people of various backgrounds " +"involved with Gentoo Linux development. And I wasn't surprised to find that " +"our developers had wildly different opinions of how we should approach the " +"money-making end of Gentoo Linux. Basically, there were two groups of " +"developers: one group was generally opposed to money-making pursuits, while " +"the other group was excited about helping Gentoo Linux become a successful " +"commercial product. This was an expected split; the first group saw " +"commercial involvement as a corrupting influence, while the second saw no " +"such negative associations." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):253 +msgid "" +"In the Enoch days, I used to waver on this issue and didn't really know the " +"right approach. I recognized the fact that distributions like Debian were " +"truly committed to free distribution of their software. I liked that. " +"Compared to other commercial distributions, they made things easy for the " +"user by providing detailed instructions on their Web site. That was a good " +"thing, and something I wanted to emulate." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):262 +msgid "" +"At the same time, I really wanted Gentoo Linux to be commercially " +"successful. I struggled to find a balance, but never really found one until " +"recently." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):270 +msgid "What to do?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):273 +msgid "" +"So, how are we planning to balance commercial and non-commercial interests? " +"The key is to remember our foundation -- the foundation of Gentoo Linux is " +"Open Source software. Thus, the foundation for all our endeavors must focus " +"on Open Source. It's not good enough to just acknowledge Open Source " +"software, or just to use it. We must also encourage its development and " +"distribution, and never oppose this stance for commercial gain. More " +"importantly, we must never structure our business model so that there's a " +"temptation to restrict the free distribution of our sources. Our development " +"team needs to be open and accessible to the public, and free distribution of " +"Gentoo Linux must not only be allowed, but encouraged. We need to be Open " +"Source advocates, not just in word, but in action also." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):287 +msgid "" +"If a company wants to use Gentoo Linux for a commercial Linux-based " +"technology, they can just grab the contents of our CVS tree and start using " +"it, since all our work is distributed under the GPL. We don't want to limit " +"the use of our work in any way, except to ensure that all derivative " +"products comply with the GNU Public License." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):295 +msgid "" +"We'd like as many people as possible to benefit from our work, but we'd also " +"like to benefit as much as possible from your improvements to Gentoo Linux. " +"If you're part of a company using Gentoo Linux as a base for your product, " +"we hope that you'll send any freely-distributable improvements to us so that " +"we can add them to our CVS tree. That way, everyone benefits. We can " +"continue to maintain and improve your additions, and you in turn can benefit " +"from these improvements. We want to foster collaboration between commercial " +"and non-commercial entities. This way, both the sysadmin using Gentoo Linux " +"at his ISP and the corporation building a commercial server product can " +"benefit from each other's improvements and fixes to Gentoo Linux. It's time " +"to promote the free exchange of code between everyone. Only Open Source " +"makes it possible." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):312 +msgid "What does the future hold?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):315 +msgid "" +"Right now, we're at the verge of releasing Gentoo Linux 1.0 (it may be " +"available by the time you read this article on developerWorks.) But what " +"does the future hold?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):321 +msgid "" +"As we move towards 2.0, I hope to continue to improve Portage, the " +"technology at the heart of Gentoo Linux. Any major improvement to Gentoo " +"Linux generally starts with an improvement to Portage. I'd like to continue " +"the process of converting the majority of the code from bash to python, " +"which will allow us to add new features like object-oriented design to our " +"autobuild system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):329 +msgid "" +"In addition to changes to Portage, I hope to continue to slowly and " +"carefully grow our development team by finding skilled developers who share " +"our same vision. As our development team grows, we will be able to vastly " +"expand the number of autobuild scripts available for Gentoo Linux. But even " +"more important than this, a slightly larger development team will give us " +"the resources we need to continue to keep Gentoo Linux on the cutting edge " +"of Linux technology. That's where the fun is :)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):339 +msgid "" +"We also hope that commercial Linux technology companies will choose Gentoo " +"Linux as a base for their products. We currently have one such relationship " +"and we hope to have many more in the future. These kinds of collaborations " +"promise to be lots of fun and to be a great benefit to all Gentoo Linux " +"users." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):346 +msgid "" +"In the end, our primary goal is to contribute something meaningful to the " +"Linux community. Although there are many Linux distributions to choose from, " +"we know that Gentoo Linux offers something that really isn't available " +"anywhere else. We're excited about the future of Gentoo Linux development, " +"and we hope you are too." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):357 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):361 +msgid "" +"Start at the beginning of my story with \"Making the distribution\", <uri " +"link=\"/doc/en/articles/making-the-distro-p1.xml\"> Part 1</uri>, and <uri " +"link=\"/doc/en/articles/making-the-distro-p2.xml\">Part 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):366 +msgid "" +"Find out more about <uri link=\"/index.xml\">Gentoo Linux</uri> from our Web " +"site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):370 +msgid "" +"Check out the competetion at <uri link=\"http://www.freebsd.org/\">FreeBSD</" +"uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):374 +msgid "" +"Read up on the <uri link=\"http://www.gnu.org/copyleft/gpl.html\">GPL</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):377 +msgid "" +"Take a look at the official <uri link=\"http://www.stampede.org/\">Stampede " +"site</uri>." +msgstr "" + +#. <li> +#. Hang out on <uri +#. link="http://irc.openprojects.net/">irc.openprojects.net</uri>. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):385 +msgid "" +"Find out more about the <uri link=\"http://www.xfree86.org/\">Free X86 " +"Project</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):389 +msgid "" +"Get the <uri link=\"http://developer.gnome.org/doc/API/gtk/\">GTK+ Reference " +"Documentation</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):393 +msgid "" +"Check out the <uri link=\"http://www.xmms.org/\">XMultiMedia System</uri>, " +"an X11/gtk+-based MP3/CD player app." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):397 +msgid "" +"Get started on threads with a <uri link=\"http://www.math.arizona.edu/swig/" +"pthreads/threads.html\">POSIX Threads tutorial</uri> from the University of " +"Arizona." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):402 +msgid "" +"Get the latest on the <uri link=\"http://www.rpm.org/\">RPM Packaging Tool</" +"uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):406 +msgid "" +"Visit the good folks at <uri link=\"http://www.debian.org/\">Debian</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(li):409 +msgid "And see the official <uri link=\"http://gcc.gnu.org/\">GCC</uri> site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(title):417 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(p):420 +msgid "" +"Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of " +"Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a " +"contributing author of several books published by MacMillan: Caldera " +"OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has " +"been involved with computers in some fashion since the second grade when he " +"was first exposed to the Logo programming language and a potentially lethal " +"dose of Pac Man. This probably explains why he has since served as a Lead " +"Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys " +"spending time with his wife Mary and his new baby daughter, Hadassah. You " +"can contact Daniel at <mail link=\"drobbins@gentoo.org\">drobbins@gentoo." +"org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/making-the-distro-p3.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/maximum-swappage.xml.po b/article/gettext/ru/maximum-swappage.xml.po new file mode 100644 index 0000000..8df818c --- /dev/null +++ b/article/gettext/ru/maximum-swappage.xml.po @@ -0,0 +1,280 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(guide:link):5 +msgid "/doc/en/articles/maximum-swappage.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(title):6 +msgid "Maximum swappage" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(abstract):15 +msgid "" +"Learn how to improve the swap performance on your Linux server by several " +"orders of magnitude. Author Daniel Robbins takes you through this quick tip " +"on getting the most from your server." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(version):26 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(date):27 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(title):30 +msgid "Getting the most out of swap" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):34 +msgid "" +"When you set up a brand new Linux server, do you create a single 128 MB swap " +"partition? If so, did you know that you are severely limiting swap " +"performance? Would you like to increase swap performance by several orders " +"of magnitude, and to create swap partitions larger than 1 GB? It's possible, " +"requiring no kernel patches or special hardware, just pure geek know-how!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):42 +msgid "" +"Some of you may not really care about swap. After all, Linux systems are " +"typically very memory efficient, and swap is often barely touched. While " +"often true on desktop systems, servers are another story. Because servers " +"may handle unexpected stresses, such as runaway processes, denial of service " +"attacks, or even the Slashdot effect, they need to have adequate high-speed " +"swap so that they do not grind to a halt and possibly crash when all " +"physical memory (and then some) is exhausted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):52 +msgid "" +"Still not convinced that this is a big deal? I'll show you how easy it is to " +"bring down a server by launching a massive amount of new processes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(warn):57 +msgid "" +"Please, if you try this, do it only on a non-production server that you " +"actually administer!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):62 +msgid "" +"Let's say you have two customized <c>grep</c> commands in <path>/usr/bin</" +"path>, called <c>bobgrep</c> and <c>jimgrep</c>. Now, let's assume that " +"<c>bobgrep</c> is simply a shell script that calls the ELF executable " +"<c>jimgrep</c>, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(pre:caption):69 +msgid "The bobgrep script" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(pre):69 +#, no-wrap +msgid "" +"\n" +"#!/bin/bash\n" +"jimgrep -r $*\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):74 +msgid "" +"Everything looks good so far, but what happens if <c>jimgrep</c> gets " +"accidentally replaced with a symbolic link to <c>bobgrep</c>? Well, in that " +"case, calling <c>bobgrep</c> or <c>jimgrep</c> will cause an infinite loop, " +"causing hundreds of bash processes to be spawned in mere seconds. This " +"actually happened to me once, and believe me, it hurt!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):82 +msgid "" +"If a server doesn't have adequate swap, a situation like this can cause the " +"machine to lock up in much less than a minute. How do we fix the problem? " +"One way is to increase the swap size beyond 128 MB. Fortunately for us, " +"there is absolutely no 128 MB limit on swap under Linux 2.2.x+ and later " +"kernels, as there was in the past. The current limits are approximately 2 GB " +"on x86, PowerPC, and MC680x0 systems, 512 MB on MIPS systems, 128 GB on " +"Alpha, and a whopping 3 terabytes on UltraSparc platforms!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(pre:caption):92 +msgid "Swap partition size limits under modern Linux kernels" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(pre):92 +#, no-wrap +msgid "" +"\n" +"x86 2 Gigabytes\n" +"PowerPC 2 Gigabytes\n" +"Motorola 680x0 2 Gigabytes\n" +"Sparc 1 Gigabyte\n" +"MIPS 512 Megabytes\n" +"Alpha 128 Gigabytes\n" +"UltraSparc 3 Terabytes\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):102 +msgid "" +"While it's nice to be able to increase swap partition size to beyond 128 MB, " +"how about increasing performance? Ideally, it would be nice if we could set " +"up swap partitions in a RAID 0 stripe, so that reads and writes are equally " +"distributed between all partitions. If these partitions are on separate " +"drives and/or controllers, this will multiply swap file performance, " +"allowing your servers to handle temporary memory usage \"spikes\" without " +"getting dramatically bogged down." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):112 +msgid "" +"Amazingly, all modern Linux kernels, by default (with no special kernel " +"options or patches) allow you to parallelize swap, just like a RAID 0 " +"stripe. By using the <c>pri</c> option in <path>/etc/fstab</path> to set " +"multiple swap partitions to the same priority, we tell Linux to use them in " +"parallel:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(pre:caption):119 +msgid "Set multiple swap partitions to the same priority" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(pre):119 +#, no-wrap +msgid "" +"\n" +"/dev/sda2 none swap sw,pri=3 0 0\n" +"/dev/sdb2 none swap sw,pri=3 0 0\n" +"/dev/sdc2 none swap sw,pri=3 0 0\n" +"/dev/sdd2 none swap sw,pri=1 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):126 +msgid "" +"In the above example, Linux will use swap partitions sda2, sdb2, and sdc2 in " +"parallel. Since these partitions are on different drives, and possibly even " +"different SCSI controllers, read and write throughput will nearly triple. " +"The fourth swap partition, sdd2, will be used only after the first three " +"partitions have been exhausted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):134 +msgid "" +"The <c>pri</c> option is really easy to use. The priority must be a number " +"between 0 and 32767, with 32767 being the highest priority. The swap " +"partitions will be used from highest priority to lowest priority, meaning " +"that a partition with a priority of x will only be used only if all " +"partitions with a priority greater than x are already full. If several " +"partitions have the same priority, Linux will automatically parallelize " +"access between them. This allows you to not only parallelize swap, but also " +"prioritize access so that the partitions on the fastest drives (or regions " +"of the drives) are used first. So, you can set up an emergency swap " +"partition on an old, slower drive that will be used only if all high-speed " +"swap is exhausted first." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):147 +msgid "" +"Now it's time to put some of this swapping knowledge into action. To loosely " +"quote Mr. Miyagi of Karate Kid fame: \"Swap on, swap off, geek-san!\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(title):155 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(li):159 +msgid "" +"In <uri link=\"/doc/en/articles/partitioning-p1.xml\">Partitioning in " +"action: Moving /home</uri>, I show you step-by-step how to move <path>/home</" +"path> to a new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(li):164 +msgid "" +"In <uri link=\"/doc/en/articles/partitioning-p2.xml\">Partitioning in " +"action</uri>, I show you step-by-step how to move <path>/var</path> and " +"<path>/tmp</path> to a new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(li):169 +msgid "" +"In my second tip, <uri link=\"/doc/en/articles/partition-planning-tips.xml" +"\">Partition planning tips</uri>, I share several ways of effectively " +"organizing your partition layout." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(li):175 +msgid "" +"The <uri link=\"http://www.redhat.com/mirrors/LDP/LDP/sag/index.html\">Linux " +"system administrator's guide</uri> mirrored on Red Hat's home page." +msgstr "" + +#. Link doesn't work anymore, commenting for the time being - fox2mike +#. <li> +#. A good high-level <uri link="http://www.gwdg.de/gs-2.0/chapter2_6.html"> +#. overview of Linux system administration</uri>. +#. </li> +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(li):185 +msgid "" +"For more information on optimizing file system performance, take a look at " +"Linas Vepstas' <uri link=\"http://www.tldp.org\">Linux Software RAID HOWTO</" +"uri>. Since the most recent software RAID code has been merged into the 2.3 " +"series kernels, it is a viable option for further enhancing Linux disk " +"performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(title):197 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(p):200 +msgid "" +"Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of " +"Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a " +"contributing author of several books published by MacMillan: Caldera " +"OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has " +"been involved with computers in some fashion since the second grade when he " +"was first exposed to the Logo programming language and a potentially lethal " +"dose of Pac Man. This probably explains why he has since served as a Lead " +"Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys " +"spending time with his wife Mary and his new baby daughter, Hadassah. You " +"can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/maximum-swappage.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/openssh-key-management-p1.xml.po b/article/gettext/ru/openssh-key-management-p1.xml.po new file mode 100644 index 0000000..58684b8 --- /dev/null +++ b/article/gettext/ru/openssh-key-management-p1.xml.po @@ -0,0 +1,591 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):6 +msgid "OpenSSH key management, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(author:title):7 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(mail:link):8 +msgid "drobbins" +msgstr "" + +#. xmlified by Max Lorenz (anarchyisgoodforthee@gmail.com) +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(abstract):12 +msgid "" +"In this series, you'll learn how RSA and DSA authentication work, and see " +"how to set up passwordless authentication the right way. In the first " +"article of the series, Daniel Robbins focuses on introducing the RSA and DSA " +"authentication protocols and showing you how to get them working over the " +"network." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(version):25 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(date):26 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):29 +msgid "Understanding RSA/DSA authentication" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):33 +msgid "" +"Many of us use the excellent OpenSSH (see <uri link=\"#resources" +"\">Resources</uri> later in this article) as a secure, encrypted replacement " +"for the venerable <c>telnet</c> and <c>rsh</c> commands. One of OpenSSH's " +"more intriguing features is its ability to authenticate users using the RSA " +"and DSA authentication protocols, which are based on a pair of complementary " +"numerical keys. As one of its main appeals, RSA and DSA authentication " +"promise the capability of establishing connections to remote systems " +"<e>without supplying a password</e>. While this is appealing, new OpenSSH " +"users often configure RSA/DSA the quick and dirty way, resulting in " +"passwordless logins, but opening up a big security hole in the process." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):49 +msgid "What is RSA/DSA authentication?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):52 +msgid "" +"SSH, specifically OpenSSH (a completely free implementation of SSH), is an " +"incredible tool. Like <c>telnet</c> or <c>rsh</c>, the ssh client can be " +"used to log in to a remote machine. All that's required is for this remote " +"machine to be running <c>sshd</c>, the <c>ssh</c> server process. However, " +"unlike <c>telnet</c>, the ssh protocol is very secure. It uses special " +"algorithms to encrypt the data stream, ensure data stream integrity and even " +"perform authentication in a safe and secure way." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):62 +msgid "" +"However, while <c>ssh</c> is really great, there is a certain component of " +"<c>ssh</c> functionality that is often ignored, dangerously misused, or " +"simply misunderstood. This component is OpenSSH's RSA/DSA key authentication " +"system, an alternative to the standard secure password authentication system " +"that OpenSSH uses by default." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):70 +msgid "" +"OpenSSH's RSA and DSA authentication protocols are based on a pair of " +"specially generated cryptographic keys, called the <e>private key</e> and " +"the <e>public key</e>. The advantage of using these key-based authentication " +"systems is that in many cases, it's possible to establish secure connections " +"without having to manually type in a password." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):78 +msgid "" +"While the key-based authentication protocols are relatively secure, problems " +"arise when users take certain shortcuts in the name of convenience, without " +"fully understanding their security implications. In this article, we'll take " +"a good look at how to correctly use RSA and DSA authentication protocols " +"without exposing ourselves to any unnecessary security risks. In my next " +"article, I'll show you how to use <c>ssh-agent</c> to cache decrypted " +"private keys, and introduce <c>keychain</c>, an <c>ssh-agent</c> front-end " +"that offers a number of convenience advantages without sacrificing security. " +"If you've always wanted to get the hang of the more advanced authentication " +"features of OpenSSH, then read on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):94 +msgid "How RSA/DSA keys work" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):97 +msgid "" +"Here's a quick general overview of how RSA/DSA keys work. Let's start with a " +"hypothetical scenario where we'd like to use RSA authentication to allow a " +"local Linux workstation (named <e>localbox</e>) to open a remote shell on " +"<e>remotebox</e>, a machine at our ISP. Right now, when we try to connect to " +"<e>remotebox</e> using the <c>ssh</c> client, we get the following prompt:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):105 +msgid "Connecting to remotebox" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):105 +#, no-wrap +msgid "" +"\n" +"$ <i>ssh drobbins@remotebox</i>\n" +"drobbins@remotebox's password:\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):110 +msgid "" +"Here we see an example of the <c>ssh</c><e>default</e> way of handling " +"authentication. Namely, it asks for the password of the <e>drobbins</e> " +"account on <e>remotebox</e>. If we type in our password for <e>remotebox</" +"e>, <c>ssh</c> uses its secure password authentication protocol, " +"transmitting our password over to <e>remotebox</e> for verification. " +"However, unlike what <c>telnet</c> does, here our password is encrypted so " +"that it can not be intercepted by anyone sniffing our data connection. Once " +"<e>remotebox</e> authenticates our supplied password against its password " +"database, if successful, we're allowed to log on and are greeted with a " +"<e>remotebox</e> shell prompt. While the <c>ssh</c> default authentication " +"method is quite secure, RSA and DSA authentication open up some new " +"possibilities." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):124 +msgid "" +"However, unlike the <c>ssh</c> secure password authentication, RSA " +"authentication requires some initial configuration. We need to perform these " +"initial configuration steps only once. After that, RSA authentication " +"between <e>localbox</e> and <e>remotebox</e> will be totally painless. To " +"set up RSA authentication, we first need to generate a pair of keys, one " +"private and one public. These two keys have some very interesting " +"properties. The public key can be used to encrypt a message, and only the " +"holder of the private key can decrypt it. The public key can only be used " +"for <e>encryption</e>, and the private key can only be used for " +"<e>decryption</e> of a message encoded by the matching public key. The RSA " +"(and DSA) authentication protocols use the special properties of key pairs " +"to perform secure authentication, without needing to transmit any " +"confidential information over the network." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):139 +msgid "" +"To get RSA or DSA authentication working, we perform a single one-time " +"configuration step. We copy our <e>public key</e> over to <e>remotebox</e>. " +"The public key is called \"public\" for a reason. Since it can only be used " +"to <e>encrypt</e> messages for us, we don't need to be too concerned about " +"it falling into the wrong hands. Once our public key has been copied over to " +"<e>remotebox</e> and placed in a special file (<path>~/.ssh/authorized_keys</" +"path>) so that <e>remotebox</e>'s <c>sshd</c> can locate it, we're ready to " +"use RSA authentication to log onto <e>remotebox</e>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):151 +msgid "" +"To do this, we simply type <c>ssh drobbins@remotebox</c> at <e>localbox</" +"e>'s console, as we always have. However, this time, <c>ssh</c> lets " +"<e>remotebox</e>'s <c>sshd</c> know that it would like to use the RSA " +"authentication protocol. What happens next is rather interesting. " +"<e>Remotebox</e>'s <c>sshd</c> generates a random number, and encrypts it " +"using our public key that we copied over earlier. Then, it sends this " +"encrypted random number back to the <c>ssh</c> running on <e>localbox</e>. " +"In turn, our <c>ssh</c> uses our <e>private key</e> to decrypt this random " +"number, and then sends it back to <e>remotebox</e>, saying in effect \"See, " +"I really <e>do</e> hold the matching private key; I was able to successfully " +"decrypt your message!\" Finally, <c>sshd</c> concludes that we should be " +"allowed to log in, since we hold a matching private key. Thus, the fact that " +"we hold a matching private key grants us access to <e>remotebox</e>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):170 +msgid "Two observations" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):173 +msgid "" +"There are two important observations about the RSA and DSA authentication. " +"The first is that we really only need to generate one pair of keys. We can " +"then copy our public key to the remote machines that we'd like to access and " +"they will all happily authenticate against our single private key. In other " +"words, we don't need a key pair for <e>every</e> system we'd like to access. " +"Just one pair will suffice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):182 +msgid "" +"The other observation is that our <e>private key should not fall into the " +"wrong hands</e>. The private key is the one thing that grants us access to " +"our remote systems, and anyone that possesses our private key is granted " +"exactly the same privileges that we are. Just as we wouldn't want strangers " +"to have keys to our house, we should protect our private key from " +"unauthorized use. In the world of bits and bytes, this means that no one " +"should be able to read or copy our private key." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):192 +msgid "" +"Of course, the <c>ssh</c> developers are aware of the private keys' " +"importance, and have built a few safeguards into <c>ssh</c> and <c>ssh-" +"keygen</c> so that our private key is not abused. First, <c>ssh</c> is " +"configured to print out a big warning message if our key has file " +"permissions that would allow it to be read by anyone but us. Secondly, when " +"we create our public/private key pair using <c>ssh-keygen</c>, <c>ssh-" +"keygen</c> will ask us to enter a passphrase. If we do, our private key will " +"be encrypted using this passphrase, so that even if it is stolen, it will be " +"useless to anyone who doesn't happen to know the passphrase. Armed with that " +"knowledge, let's take a look at how to configure <c>ssh</c> to use the RSA " +"and DSA authentication protocols." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):208 +msgid "ssh-keygen up close" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):211 +msgid "" +"The first step in setting up RSA authentication begins with generating a " +"public/private key pair. RSA authentication is the original form of <c>ssh</" +"c> key authentication, so RSA should work with any version of OpenSSH, " +"although I recommend that you install the most recent version available, " +"which was openssh-2.9_p2 at the time this article was written. Generate a " +"pair of RSA keys as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):220 +msgid "Using ssh-keygen" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):220 +#, no-wrap +msgid "" +"\n" +"$ <i>ssh-keygen</i>\n" +"Generating public/private rsa1 key pair.\n" +"Enter file in which to save the key (/home/drobbins/.ssh/identity): <comment>(hit enter)</comment>\n" +"Enter passphrase (empty for no passphrase): <comment>(enter a passphrase)</comment>\n" +"Enter same passphrase again: <comment>(enter it again)</comment>\n" +"Your identification has been saved in /home/drobbins/.ssh/identity.\n" +"Your public key has been saved in /home/drobbins/.ssh/identity.pub.\n" +"The key fingerprint is:\n" +"a4:e7:f2:39:a7:eb:fd:f8:39:f1:f1:7b:fe:48:a1:09 drobbins@localbox\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):232 +msgid "" +"When <c>ssh-keygen</c> asks for a default location for the key, we hit enter " +"to accept the default of <path>/home/drobbins/.ssh/identity</path>. <c>ssh-" +"keygen</c> will store the private key at the above path, and the <e>public</" +"e> key will be stored right next to it, in a file called identity.pub." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):240 +msgid "" +"Also note that <c>ssh-keygen</c> prompted us to enter a passphrase. When " +"prompted, we entered a good passphrase (seven or more hard-to-predict " +"characters). <c>ssh-keygen</c> then encrypted our private key (<path>~/.ssh/" +"identity</path>) using this passphrase so that our private key will be " +"useless to anyone who does not know it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):251 +msgid "The quick compromise" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):254 +msgid "" +"When we specify a passphrase, it allows <c>ssh-keygen</c> to secure our " +"private key against misuse, but it also creates a minor inconvenience. Now, " +"every time we try to connect to our <e>drobbins@remotebox</e> account using " +"<c>ssh</c>, <c>ssh</c> will prompt us to enter the passphrase so that it can " +"decrypt our private key and use it for RSA authentication. Again, we won't " +"be typing in our password for the <e>drobbins</e> account on <e>remotebox</" +"e>, we'll be typing in the passphrase needed to locally decrypt our private " +"key. Once our private key is decrypted, our <c>ssh</c> client will take care " +"of the rest. While the mechanics of using our remote password and the RSA " +"passphrase are completely different, in practice we're still prompted to " +"type a \"secret phrase\" into <c>ssh</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):268 +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):285 +msgid "Logging in with passphrase" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):268 +#, no-wrap +msgid "" +"\n" +"$ <i>ssh drobbins@remotebox</i>\n" +"Enter passphrase for key '/home/drobbins/.ssh/identity': <comment>(enter passphrase)</comment>\n" +"Last login: Thu Jun 28 20:28:47 2001 from localbox.gentoo.org \n" +"\n" +"Welcome to remotebox!\n" +"\n" +"$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):278 +msgid "" +"Here's where people are often mislead into a quick compromise. A lot of the " +"time, people will create unencrypted private keys just so that they don't " +"need to type in a password. That way, they simply type in the ssh command, " +"and they're immediately authenticated via RSA (or DSA) and logged in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):285 +#, no-wrap +msgid "" +"\n" +"$ <i>ssh drobbins@remotebox</i>\n" +"Last login: Thu Jun 28 20:28:47 2001 from localbox.gentoo.org \n" +"\n" +"Welcome to remotebox!\n" +"\n" +"$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):294 +msgid "" +"However, while this is convenient, you shouldn't use this approach without " +"fully understanding its security impact. With an unencrypted private key, if " +"anyone ever hacks into <e>localbox</e>, they'll also get automatic access to " +"<e>remotebox</e> and any other systems that have been configured with the " +"public key." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):302 +msgid "" +"I know what you're thinking. Passwordless authentication, despite being a " +"bit risky does seem really appealing. I totally agree. But <e>there is a " +"better way!</e> Stick with me, and I'll show you how to gain the benefits of " +"passwordless authentication without compromising your private key security. " +"I'll show you how to masterfully use <c>ssh-agent</c> (the thing that makes " +"<e>secure</e> passwordless authentication possible in the first place) in my " +"next article. Now, let's get ready to use <c>ssh-agent</c> by setting up RSA " +"and DSA authentication. Here step-by-step directions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):316 +msgid "RSA key pair generation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):319 +msgid "" +"To set up RSA authentication, we'll need to perform the one-time step of " +"generating a public/private key pair. We do this by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):324 +msgid "Generating keys..." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):324 +#, no-wrap +msgid "" +"\n" +"$ <i>ssh-keygen</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):328 +msgid "" +"Accept the default key location when prompted (typically <path>~/.ssh/" +"identity</path> and <path>~/.ssh/identity.pub</path> for the public key), " +"and provide <c>ssh-keygen</c> with a secure passphrase. Once <c>ssh-keygen</" +"c> completes, you'll have a public key as well as a passphrase-encrypted " +"private key." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):339 +msgid "RSA public key install" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):342 +msgid "" +"Next, we'll need to configure remote systems running <c>sshd</c> to use our " +"<e>public</e> RSA key for authentication. Typically, this is done by copying " +"the public key to the remote system as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):348 +msgid "Copying the public key" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):348 +#, no-wrap +msgid "" +"\n" +"$ <i>scp ~/.ssh/identity.pub drobbins@remotebox:</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):352 +msgid "" +"Since RSA authentication isn't fully set up yet, we'll be prompted to enter " +"our password on <e>remotebox</e>. Do so. Then, log in to <e>remotebox</e> " +"and append the public key to the <path>~/.ssh/authorized_keys</path> file " +"like so:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):358 +msgid "Installing the public key" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):358 +#, no-wrap +msgid "" +"\n" +"$ <i>ssh drobbins@remotebox</i>\n" +"drobbins@remotebox's password: <comment>(enter password)</comment>\n" +"Last login: Thu Jun 28 20:28:47 2001 from localbox.gentoo.org \n" +"\n" +"Welcome to remotebox!\n" +"\n" +"$ <i>cat identity.pub >> ~/.ssh/authorized_keys</i>\n" +"$ <i>exit</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):369 +msgid "" +"Now, with RSA authentication configured, we should be prompted to enter our " +"RSA <e>passphrase</e> (rather than our <e>password</e>) when we try to " +"connect to <e>remotebox</e> using <c>ssh</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):375 +msgid "Logging in with pubkey authentication" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):375 +#, no-wrap +msgid "" +"\n" +"$ <i>ssh drobbins@remotebox</i>\n" +"Enter passphrase for key '/home/drobbins/.ssh/identity': \n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):380 +msgid "" +"Hurray, RSA authentication configuration complete! If you weren't prompted " +"for a passphrase, here are a few things to try. First, try logging in by " +"typing <c>ssh -1 drobbins@remotebox</c>. This will tell ssh to only use " +"version 1 of the ssh protocol, and may be required if for some reason the " +"remote system is defaulting to DSA authentication. If that doesn't work, " +"make sure that you don't have a line that reads <c>RSAAuthentication no</c> " +"in your <path>/etc/ssh/ssh_config</path>. If you do, comment it out by pre-" +"pending it with a \"#\". Otherwise, try contacting the <e>remotebox</e> " +"system administrator and verifying that they have enabled RSA authentication " +"on their end and have the appropriate settings in <path>/etc/ssh/" +"sshd_config</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):396 +msgid "DSA key generation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):399 +msgid "" +"While RSA keys are used by version 1 of the <c>ssh</c> protocol, DSA keys " +"are used for protocol level 2, an updated version of the <c>ssh</c> " +"protocol. Any modern version of OpenSSH should be able to use both RSA and " +"DSA keys. Generating DSA keys using OpenSSH's <c>ssh-keygen</c> can be done " +"similarly to RSA in the following manner:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre:caption):407 +msgid "Generating a DSA key pair" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(pre):407 +#, no-wrap +msgid "" +"\n" +"$ <i>ssh-keygen -t dsa</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):411 +msgid "" +"Again, we'll be prompted for a passphrase. Enter a secure one. We'll also be " +"prompted for a location to save our DSA keys. The default, normally <path>~/." +"ssh/id_dsa</path> and <path>~/.ssh/id_dsa.pub</path>, should be fine. After " +"our one-time DSA key generation is complete, it's time to install our DSA " +"public key to remote systems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):422 +msgid "DSA public key install" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):425 +msgid "" +"Again, DSA public key installation is almost identical to RSA. For DSA, " +"we'll want to copy our <path>~/.ssh/id_dsa.pub</path> file to <e>remotebox</" +"e>, and then append it to the <path>~/.ssh/authorized_keys2</path> on " +"<e>remotebox</e>. Note that this file has a different name than the RSA " +"<path>authorized_keys</path> file. Once configured, we should be able to log " +"in to <e>remotebox</e> by typing in our DSA private key passphrase rather " +"than typing in our actual <e>remotebox</e> password." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(note):435 +msgid "" +"Nowadays you should only use version 2 of the ssh protocol, as version 1 has " +"weaknesses." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):443 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(p):446 +msgid "" +"Right now, you should have RSA or DSA authentication working, but you still " +"need to type in your passphrase for every new connection. In my next " +"article, we'll see how to use <c>ssh-agent</c>, a really nice system that " +"allows us to establish connections <e>without</e> supplying a password, but " +"also allows us to keep our private keys encrypted on disk. I'll also " +"introduce <c>keychain</c>, a very handy <c>ssh-agent</c> front-end that " +"makes <c>ssh-agent</c> even more secure, convenient, and fun to use. Until " +"then, check out the handy resources below to keep yourself on track." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(title):461 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(li):466 +msgid "" +"Read Daniel's other two articles in this series, <uri link=\"/doc/en/" +"articles/openssh-key-management-p2.xml\">OpenSSH key management, Part 2</" +"uri> and <uri link=\"/doc/en/articles/openssh-key-management-p3.xml" +"\">OpenSSH key management, Part 3</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(li):473 +msgid "" +"Be sure to visit the home of <uri link=\"http://www.openssh.com\">OpenSSH</" +"uri> development." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(li):477 +msgid "" +"Check out the <uri link=\"http://www.openssh.com/faq.html\">OpenSSH FAQ</" +"uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(li):481 +msgid "" +"<uri link=\"http://www.chiark.greenend.org.uk/~sgtatham/putty/\">PuTTY</uri> " +"is an excellent <c>ssh</c> client for Windows machines." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(li):485 +msgid "" +"You may find O'Reilly's <e>SSH, The Secure Shell: The Definitive Guide</e> " +"to be helpful. The <uri link=\"http://www.snailbook.com/\">authors' site</" +"uri> contains information about the book, a FAQ, news, and updates." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/openssh-key-management-p2.xml.po b/article/gettext/ru/openssh-key-management-p2.xml.po new file mode 100644 index 0000000..72aaee4 --- /dev/null +++ b/article/gettext/ru/openssh-key-management-p2.xml.po @@ -0,0 +1,548 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(guide:link):5 +msgid "/doc/en/articles/openssh-key-management-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):6 +msgid "OpenSSH key management, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(abstract):12 +msgid "" +"Many developers use the excellent OpenSSH as a secure, encrypted replacement " +"for the venerable telnet and rsh commands. One of OpenSSH's more intriguing " +"features is its ability to authenticate users using the RSA and DSA " +"authentication protocols, which are based upon a pair of complementary " +"numerical \"keys\". One of the main appeals of RSA and DSA authentication is " +"the promise of being able to establish connections to remote systems without " +"supplying a password. In this second article, Daniel introduces ssh-agent (a " +"private key cache) and keychain, a special bash script designed to make key-" +"based authentication incredibly convenient and flexible." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(version):29 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(date):30 +msgid "2010-10-19" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):33 +msgid "Introducing ssh-agent and keychain" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):35 +msgid "Introducing ssh-agent" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):38 +msgid "" +"ssh-agent, included with the OpenSSH distribution, is a special program " +"designed to make dealing with RSA and DSA keys both pleasant and secure (see " +"Part 1 of this series for an introduction to RSA and DSA authentication.) " +"ssh-agent, unlike ssh, is a long-running daemon designed for the sole " +"purpose of caching your decrypted private keys." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):46 +msgid "" +"ssh includes built-in support that allows it to communicate with ssh-agent, " +"allowing ssh to acquire your decrypted private keys without prompting you " +"for a password for every single new connection. With ssh-agent you simply " +"use ssh-add to add your private keys to ssh-agent's cache. It's a one-time " +"process; after using ssh-add, ssh will grab your private key from ssh-agent, " +"rather than bugging you by prompting for a passphrase." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):58 +msgid "Using ssh-agent" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):61 +msgid "" +"Let's take a look at how this whole ssh-agent key caching system works. When " +"ssh-agent starts up, it spits out a few important environment variables " +"before detaching from the shell and continuing to run in the background. " +"Here's some example output generated by ssh-agent when it begins:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):68 +msgid "Running ssh-agent daemon" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):68 +#, no-wrap +msgid "" +"\n" +"$ <i>ssh-agent</i>\n" +"SSH_AUTH_SOCK=/tmp/ssh-XX4LkMJS/agent.26916; export SSH_AUTH_SOCK;\n" +"SSH_AGENT_PID=26917; export SSH_AGENT_PID;\n" +"echo Agent pid 26917;\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):75 +msgid "" +"As you can see, ssh-agent's output is actually a series of bash commands; if " +"executed, these commands would set a couple of environment variables, " +"SSH_AUTH_SOCK and SSH_AGENT_PID. Due to the included export commands, these " +"environment variables would be made available to any additional commands run " +"later. Well, all that would happen if these lines were actually evaluated by " +"the shell, but right now they're simply printed to stdout. To fix this, we " +"can invoke ssh-agent in the following way:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):85 +msgid "Different way of invoking ssh-agent" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):85 +#, no-wrap +msgid "" +"\n" +"$ <i>eval `ssh-agent`</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):89 +msgid "" +"This command tells bash to run ssh-agent and then evaluate ssh-agent's " +"output. Invoked this way (with back-quotes, not normal single quotes), the " +"SSH_AGENT_PID and SSH_AUTH_SOCK variables get set and exported by your " +"shell, making these variables available to any new processes you may start " +"during your login session." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):97 +msgid "" +"The best way to start ssh-agent is to add the above line to your <path>~/." +"bash_profile</path>; that way, all programs started in your login shell will " +"see the environment variables, be able to locate ssh-agent and query it for " +"keys as needed. The environment variable of particular importance is " +"SSH_AUTH_SOCK; the SSH_AUTH_SOCK contains a path to a UNIX domain socket " +"that ssh and scp can use to establish a dialogue with ssh-agent." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):109 +msgid "Using ssh-add" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):112 +msgid "" +"But of course, ssh-agent starts up with an empty cache of decrypted private " +"keys. Before we can really use ssh-agent, we first need to add add our " +"private key(s) to ssh-agent's cache using the ssh-add command. In the " +"following example, I use ssh-add to add my <path>~/.ssh/identity</path> " +"private RSA key to ssh-agent's cache:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):120 +msgid "Loading private RSA key to ssh-agent's cache" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):120 +#, no-wrap +msgid "" +"\n" +"$ <i>ssh-add ~/.ssh/identity</i>\n" +"Need passphrase for /home/drobbins/.ssh/identity\n" +"Enter passphrase for /home/drobbins/.ssh/identity \n" +"(enter passphrase)\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):127 +msgid "" +"As you can see, ssh-add asked for my passphrase so that the private key can " +"be decrypted and stored in ssh-agent's cache, ready for use. Once you've " +"used ssh-add to add your private key (or keys) to ssh-agent's cache and " +"SSH_AUTH_SOCK is defined in your current shell (which it should be, if you " +"started ssh-agent from your ~/.bash_profile), then you can use scp and ssh " +"to establish connections with remote systems without supplying your " +"passphrase." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):139 +msgid "Limitations of ssh-agent" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):142 +msgid "" +"ssh-agent is really cool, but its default configuration still leaves us with " +"a few minor inconveniences. Let's take a look at them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):147 +msgid "" +"For one, with <c>eval `ssh-agent`</c> in <path>~/.bash_profile</path>, a new " +"copy of ssh-agent is launched for every login session; not only is this a " +"tad bit wasteful, but it also means that you need to use ssh-add to add a " +"private key to each new copy of ssh-agent. If you only open a single " +"terminal or console on your system, this is no big deal, but most of us open " +"quite a few terminals and need to type in our passphrase every single time " +"we open a new console. Technically, there's no reason why we should need to " +"do this since a single ssh-agent process really should suffice." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):158 +msgid "" +"Another problem with the default ssh-agent setup is that it's not compatible " +"with cron jobs. Since cron jobs are started by the cron process, they won't " +"inherit the SSH_AUTH_SOCK variable from their environment, and thus won't " +"know that a ssh-agent process is running or how to contact it. It turns out " +"that this problem is also fixable." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):169 +msgid "Enter keychain" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):172 +msgid "" +"To solve these problems, I wrote a handy bash-based ssh-agent front-end " +"called keychain. What makes keychain special is the fact that it allows you " +"to use a single ssh-agent process per system, not just per login session. " +"This means that you only need to do one ssh-add per private key, period. As " +"we'll see in a bit, keychain even helps to optimize the ssh-add process by " +"only trying to add private keys that aren't already in the running ssh-" +"agent's cache." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):181 +msgid "" +"Here's a run-through of how keychain works. When started from your <path>~/." +"bash_profile</path>, it will first check to see whether an ssh-agent is " +"already running. If not, then it will start ssh-agent and record the " +"important SSH_AUTH_SOCK and SSH_AGENT_PID variables in the <path>~/.keychain/" +"<hostname>-sh</path> file for safe keeping and later use. Here's the " +"best way to start keychain; like using plain old ssh-agent, we perform the " +"necessary setup inside <path>~/.bash_profile</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):191 +msgid "Settings for ssh-agent in ~/.bash_profile" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):191 +#, no-wrap +msgid "" +"\n" +"#!/bin/bash\n" +"\n" +"<comment># example ~/.bash_profile file</comment>\n" +"/usr/bin/keychain ~/.ssh/id_rsa\n" +"\n" +"<comment># redirect ~/.keychain/ output to /dev/null to zap the annoying\n" +"# \"Agent PID\" message</comment>\n" +"source ~/.keychain/<hostname>-sh > /dev/null\n" +"\n" +"<comment># the environment variables are stored using a hostname-shell file,\n" +"# so replace <hostname> with your hostname, and the standard \"sh\" with\n" +"# \"csh\" or \"fish\" if you use either of those shells</comment>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):206 +msgid "" +"As you can see, with keychain we source the <path>~/.keychain/<" +"hostname>-sh</path> file rather than evaluating output as we did when " +"using ssh-agent directly. However, the result is the same -- our ever-" +"important SSH_AUTH_SOCK is defined, and ssh-agent is running and ready for " +"use. And because SSH_AUTH_SOCK is recorded in <path>~/.keychain/</path>, our " +"own shell scripts and cron jobs can easily connect with ssh-agent just by " +"sourcing the <path>~/.keychain/<hostname>-sh</path> file. keychain " +"itself also takes advantage of this file; you'll remember that when keychain " +"starts up, it checks to see whether an existing ssh-agent is running. If so, " +"it uses the appropriate file in <path>~/.keychain/</path> to acquire the " +"proper SSH_AUTH_SOCK setting, thus allowing it to use the existing agent " +"rather than starting a new one. keychain will start a new ssh-agent process " +"only if the <path>~/.keychain/</path> file is stale (points to a non-" +"existent ssh-agent) or if <path>~/.keychain/</path> itself does not exist." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):226 +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):233 +msgid "Installing keychain" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):229 +msgid "Installing keychain is easy:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):233 +#, no-wrap +msgid "" +"\n" +"# <i>emerge keychain</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):237 +msgid "" +"Now that keychain is in <path>/usr/bin/</path>, add it to your <path>~/." +"bash_profile</path>, supplying paths to your private keys as arguments. " +"Here's a good standard keychain-enabled <path>~/.bash_profile</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):244 +msgid "Enabling keychain in ~/.bash_profile" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):244 +#, no-wrap +msgid "" +"\n" +"#!/bin/bash\n" +"\n" +"<comment># on this next line, we start keychain and point it to the private keys that\n" +"# we'd like it to cache</comment>\n" +"/usr/bin/keychain ~/.ssh/id_rsa ~/.ssh/id_dsa\n" +"\n" +"<comment># the environment variables are stored using a hostname-shell file,\n" +"# so replace <hostname> with your hostname, and the standard \"sh\" with\n" +"# \"csh\" or \"fish\" if you use either of those shells</comment>\n" +"source ~/.keychain/<hostname>-sh > /dev/null\n" +"\n" +"<comment># sourcing ~/.bashrc is a good thing</comment>\n" +"source ~/.bashrc\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):263 +msgid "Keychain in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):266 +msgid "" +"Once you've configured your <path>~/.bash_profile</path> to call keychain at " +"every login, log out and log back in. When you do, keychain will start ssh-" +"agent, record the agent's environment variable settings in <path>~/.keychain/" +"</path>, and then prompt you for passphrases for any private keys specified " +"on the keychain command-line in <path>~/.bash_profile</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(figure:link):274 +msgid "/images/docs/l-ssh-1.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(figure:caption):274 +msgid "Keychain starts for the first time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):276 +msgid "" +"Once you enter your passphrases, you private keys will be cached, and " +"keychain will exit. Then, <path>~/.keychain/<hostname>-sh</path> will " +"be sourced, initializing your login session for use with ssh-agent. Now, if " +"you log out and log back in again, you'll find that keychain will find the " +"existing ssh-agent process; it didn't terminate when you logged out. In " +"addition, keychain will verify that the private key(s) you specified are " +"already in ssh-agent's cache. If not, then you'll be prompted for the " +"appropriate passphrases, but if all goes well, your existing ssh-agent will " +"still contain the private key that you previously added; this means that " +"you're not prompted for a password:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(figure:link):288 +msgid "/images/docs/l-ssh-2.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(figure:caption):288 +msgid "Keychain finds an existing ssh-agent" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):290 +msgid "" +"Congratulations; you've just logged in and should be able to ssh and scp to " +"remote systems; you didn't need to use ssh-add right after login, and ssh " +"and scp won't prompt you for a passphrase either. In fact, as long as your " +"initial ssh-agent process keeps running, you'll be able to log in and " +"establish ssh connections without supplying a password. And it's very likely " +"that your ssh-agent process will continue to run until the machine is " +"rebooted; since you're most likely setting this up on a Linux system, it's " +"possible that you may not need to enter your passphrase for several months! " +"Welcome to the world of secure, passwordless connections using RSA and DSA " +"authentication." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):302 +msgid "" +"Go ahead and create several new login sessions, and you'll see that keychain " +"will \"hook in\" to the exact same ssh-agent process each time. Don't forget " +"that you can also get your cron jobs and scripts to \"hook in\" to the " +"running ssh-agent process. To use ssh or scp commands from your shell " +"scripts and cron jobs, just make sure that they source your <path>~/." +"keychain/<hostname>-shell</path> file first:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre:caption):311 +msgid "Sourcing the appropriate ~/.keychain/ file" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(pre):311 +#, no-wrap +msgid "" +"\n" +"<comment>(The environment variables are stored using a hostname-shell file, so replace\n" +"<hostname> with your hostname, and the standard \"sh\" with \"csh\" or \"fish\"\n" +"if you use either of those shells)</comment>\n" +"$ <i>source ~/.keychain/<hostname>-sh</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):318 +msgid "" +"Then, any following ssh or scp commands will be able to find the currently-" +"running ssh-agent and establish secure passwordless connections just like " +"you can from the shell." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):327 +msgid "Keychain options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):330 +msgid "" +"After you have keychain up and running, be sure to type <c>keychain --help</" +"c> to familiarize yourself with all of keychain's command-line options. " +"We're going to take a look at one in particular: the <c>--clear</c> option." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):336 +msgid "" +"You'll recall that in Part 1, I explained that using unencrypted private " +"keys is a dangerous practice, because it allows someone to steal your " +"private key and use it to log in to your remote accounts from any other " +"system without supplying a password. Well, while keychain isn't vulnerable " +"to this kind of abuse (as long as you use encrypted private keys, that is), " +"there is a potentially exploitable weakness directly related to the fact " +"that keychain makes it so easy to \"hook in\" to a long-running ssh-agent " +"process. What would happen, I thought, if some intruder were somehow able to " +"figure out my password or passphrase and log into my local system? If they " +"were somehow able to log in under my username, keychain would grant them " +"instant access to my decrypted private keys, making it a no-brainer for them " +"to access my other accounts." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):350 +msgid "" +"Now, before I continue, let's put this security threat in perspective. If " +"some malicious user were somehow able to log in as me, keychain would indeed " +"allow them to access my remote accounts. Yet, even so, it would be very " +"difficult for the intruder to steal my decrypted private keys since they are " +"still encrypted on disk. Also, gaining access to my private keys would " +"require a user to actually log in as me, not just read files in my " +"directory. So, abusing ssh-agent would be a much more difficult task than " +"simply stealing an unencrypted private key, which only requires that an " +"intruder somehow gain access to my files in <path>~/.ssh</path>, whether " +"logged in as me or not. Nevertheless, if an intruder were successfully able " +"to log in as me, they could do quite a bit of additional damage by using my " +"decrypted private keys. So, if you happen to be using keychain on a server " +"that you don't log into very often or don't actively monitor for security " +"breaches, then consider using the <c>--clear</c> option to provide an " +"additional layer of security." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):367 +msgid "" +"The <c>--clear</c> option allows you to tell keychain to assume that every " +"new login to your account should be considered a potential security breach " +"until proven otherwise. When you start keychain with the <c>--clear</c> " +"option, keychain immediately flushes all your private keys from ssh-agent's " +"cache when you log in, before performing its normal duties. Thus, if you're " +"an intruder, keychain will prompt you for passphrases rather than giving you " +"access to your existing set of cached keys. However, even though this " +"enhances security, it does make things a bit more inconvenient and very " +"similar to running ssh-agent all by itself, without keychain. Here, as is " +"often the case, one can opt for greater security or greater convenience, but " +"not both." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):380 +msgid "" +"Despite this, using keychain with <c>--clear</c> still has advantages over " +"using ssh-agent all by itself; remember, when you use keychain <c>--clear</" +"c>, your cron jobs and scripts will still be able to establish passwordless " +"connections; this is because your private keys are flushed at login, not " +"logout. Since a logout from the system does not constitute a potential " +"security breach, there's no reason for keychain to respond by flushing ssh-" +"agent's keys. Thus, the <c>--clear</c> option an ideal choice for " +"infrequently accessed servers that need to perform occasional secure copying " +"tasks, such as backup servers, firewalls, and routers." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):395 +msgid "We're done!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(p):398 +msgid "" +"Now that the OpenSSH key management series is complete, you should be very " +"familiar with RSA and DSA keys and know how to use them in a convenient yet " +"secure way. Be sure to also check out the following resources:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(title):409 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(li):414 +msgid "" +"Read <uri link=\"/doc/en/articles/openssh-key-management-p1.xml\">Part 1</" +"uri> and <uri link=\"/doc/en/articles/openssh-key-management-p3.xml\">Part " +"3</uri> of Daniel's series on OpenSSH key management." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(li):419 +msgid "" +"Visit the <uri link=\"http://www.openssh.com/\">home of OpenSSH development</" +"uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(li):423 +msgid "" +"Check out the <uri link=\"http://www.openssh.com/faq.html\">OpenSSH FAQ</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(uri:link):427 +msgid "http://www.chiark.greenend.org.uk/~sgtatham/putty/" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(uri):427 +msgid "PuTTY is an excellent ssh client for Windows machine" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(li):430 +msgid "" +"You may find O'Reilly's \"SSH, The Secure Shell: The Definitive Guide\" book " +"helpful. <uri link=\"http://www.snailbook.com/\">The Authors' site</uri> " +"contains information about the book, a FAQ, news, and updates." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/openssh-key-management-p3.xml.po b/article/gettext/ru/openssh-key-management-p3.xml.po new file mode 100644 index 0000000..6c648d5 --- /dev/null +++ b/article/gettext/ru/openssh-key-management-p3.xml.po @@ -0,0 +1,666 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(guide:link):5 +msgid "/doc/en/articles/openssh-key-management-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):6 +msgid "OpenSSH key management, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(abstract):12 +msgid "" +"In this third article in a series, Daniel Robbins shows you how to take " +"advantage of OpenSSH agent connection forwarding to enhance security. He " +"also shares recent improvements to the keychain shell script." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(version):23 +msgid "1.3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(date):24 +msgid "2010-04-26" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):27 +msgid "Agent forwarding and keychain improvements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):31 +msgid "" +"Many of us use the excellent OpenSSH as a secure, encrypted replacement for " +"the venerable telnet and rsh commands. One of OpenSSH's more intriguing " +"features is its ability to authenticate users using the RSA and DSA " +"authentication protocols, which are based on a pair of complementary " +"numerical \"keys.\" One of the main appeals of RSA and DSA authentication is " +"the promise of being able to establish connections to remote systems without " +"supplying a password. For more background, see the previous installments of " +"this series on OpenSSH key management, which cover <uri link=\"/doc/en/" +"articles/openssh-key-management-p1.xml\">RSA/DSA authentication</uri> (Part " +"1) and ssh-agent and <uri link=\"/doc/en/articles/openssh-key-management-p2." +"xml\">keychain</uri> (Part 2), respectively." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):46 +msgid "" +"Since Part 2 was published on developerWorks in September 2001, and later " +"referenced on Slashdot and Freshmeat (see <uri link=\"#resources" +"\">Resources</uri> later in this article for links to these sites), a lot of " +"people have started using keychain, and it's undergone a lot of changes. " +"I've received approximately 20 or so high-quality patches from developers " +"around the world. I've incorporated many of these patches into the keychain " +"source, which is now at version 1.8 (see <uri link=\"#resources\">Resources</" +"uri>). I send my sincere thanks to all those who submitted patches, bug " +"reports, feature requests, and notes of appreciation." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):61 +msgid "Tightening ssh security" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):64 +msgid "" +"In my <uri link=\"/doc/en/articles/openssh-key-management-p2.xml\">last " +"article</uri>, I've spent some time discussing the security benefits and " +"tradeoffs of running ssh-agent. A few days after the second article appeared " +"on developerWorks, I received an e-mail from Charles Karney of Sarnoff " +"Corporation, who politely informed me of OpenSSH's new authentication agent " +"forwarding abilities, which we'll take a look at in a bit. In addition, " +"Charles emphasized that running ssh-agent on untrusted machines is quite " +"dangerous: if someone manages to get root access on the system, then your " +"decrypted keys can be extracted from ssh-agent. Even though extracting the " +"keys would be somewhat difficult, it is within the skill of professional " +"crackers. And the mere fact that private key theft is possible means that we " +"should take steps to guard against it happening in the first place." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):79 +msgid "" +"To formulate a strategy to protect our private keys, we must first put the " +"machines we access into one of two categories. If a particular host is well-" +"secured or isolated -- making successful root exploit against it quite " +"unlikely -- then that machine should be considered a trusted host. If, " +"however, a machine is used by many other people or you have some doubts " +"about the security of the system, then the machine should be considered an " +"untrusted host. To guard your private keys against extraction, ssh-agent " +"(and thus keychain) should never be run on an untrusted host. That way, even " +"if the system's security is compromised, there will be no ssh-agent around " +"for the intruder to extract keys from in the first place." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):92 +msgid "" +"However, this creates a problem. If you can't run ssh-agent on untrusted " +"hosts, then how do you establish secure, passwordless ssh connections from " +"these systems? The answer is to only use ssh-agent and keychain on trusted " +"hosts, and to use OpenSSH's new authentication forwarding abilities to " +"extend passwordless authentication to any untrusted hosts. In a nutshell, " +"authentication forwarding works by allowing remote ssh sessions to contact " +"an ssh-agent running on a trusted system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):105 +msgid "Authentication agent forwarding" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):108 +msgid "" +"To get an idea of how authentication forwarding works, let's first take a " +"look at a hypothetical situation where user drobbins has a trusted laptop " +"called lappy, a trusted server called trustbox, and two other untrusted " +"systems that he must access, called notrust1 and notrust2, respectively. " +"Currently, he uses ssh-agent along with keychain on all four machines, as " +"follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(figure:link):116 +msgid "/images/docs/l-ssh-3.jpg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(figure:caption):116 +msgid "ssh-agent running on trusted and untrusted machines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):118 +msgid "" +"The problem with this approach is that if someone gains root access on " +"notrust1 or notrust2, then it is of course possible for this person to " +"extract keys from the now vulnerable ssh-agent process. To fix this, " +"drobbins stops running ssh-agent and keychain on untrusted hosts notrust1 " +"and notrust2. In fact, to be even more careful, drobbins decides to only use " +"ssh-agent and keychain on lappy. This limits exposure of his decrypted " +"private keys, protecting him against private key theft:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(figure:link):128 +msgid "/images/docs/l-ssh-4.jpg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(figure:caption):128 +msgid "ssh-agent running only on lappy; a more secure configuration" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):130 +msgid "" +"Of course, the problem with this approach is that drobbins can now only " +"establish passwordless connections from lappy. Let's see how to enable " +"authentication forwarding and get around this problem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):136 +msgid "" +"Assuming that all machines are running recent versions of OpenSSH, we can " +"get around this problem by using authentication forwarding. Authentication " +"forwarding allows remote ssh processes to contact the ssh-agent that is " +"running on your local trusted machine -- rather than requiring a version of " +"ssh-agent to be running on the same machine that you are sshing out from. " +"This usually allows you to run ssh-agent (and keychain) on a single machine, " +"and means that all ssh connections that originate (either directly or " +"indirectly) from this machine will use your local ssh-agent." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):147 +msgid "" +"To enable authentication forwarding, we add the following line to lappy and " +"trustbox's <path>/etc/ssh/ssh_config</path>. Note that this is the config " +"file for ssh (<path>ssh_config</path>), not the ssh daemon sshd " +"(<path>sshd_config</path>):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):154 +msgid "Add this line to your /etc/ssh/ssh_config" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):154 +#, no-wrap +msgid "" +"\n" +"ForwardAgent Yes\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):158 +msgid "" +"Now, to take advantage of authentication forwarding, drobbins can connect " +"from lappy to trustbox, and then from trustbox to notrust1 without supplying " +"passphrases for any of the connections. Both ssh processes \"tap in\" to the " +"ssh-agent running on lappy:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):165 +msgid "Tapping lappy" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):165 +#, no-wrap +msgid "" +"\n" +"$ <i>ssh drobbins@trustbox</i>\n" +"Last login: Wed Sep 26 13:42:08 2001 from lappy\n" +"\n" +"Welcome to trustbox!\n" +"$ <i>ssh drobbins@notrust1</i>\n" +"Last login: Tue Sep 25 12:03:40 2001 from trustbox\n" +"\n" +"Welcome to notrust1!\n" +"$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):177 +msgid "" +"If you try a similar configuration and find that agent forwarding isn't " +"working, try using <c>ssh -A</c> instead of plain old ssh to explicitly " +"enable authentication forwarding. Here's a diagram of what went on behind " +"the scenes when we logged in to trustbox and notrust1 using authentication " +"forwarding, above:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(figure:link):185 +msgid "/images/docs/l-ssh-5.jpg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(figure:caption):185 +msgid "Agent forwarding in action" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):187 +msgid "" +"As you can see, when ssh connected to trustbox, it maintained a connection " +"to the ssh-agent running on lappy. When an ssh connection was made from " +"trustbox to notrust1, this new ssh process maintained the authentication " +"connection to the previous ssh, effectively extending the chain. Whether " +"this authentication chain can be extended beyond notrust1 to other hosts " +"depends on how notrust1's <path>/etc/ssh/ssh_config</path> is configured. As " +"long as agent forwarding is enabled, all parts of the chain will be able to " +"authenticate using the ssh-agent running on the trusted lappy." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):201 +msgid "Advantages of agent connection forwarding" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):204 +msgid "" +"Authentication forwarding offers a number of security advantages not touched " +"on here. To convince me of the importance of agent connection forwarding, " +"Charles Karney shared with me these three security advantages:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):211 +msgid "" +"The private key is stored only on the trusted machine. This prevents " +"malicious users from grabbing your encrypted key from disk and attempting to " +"crack the encryption." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):216 +msgid "" +"ssh-agent runs only on the trusted machine. This prevents an intruder from " +"doing a memory dump of a remote ssh-agent process and then extracting your " +"decrypted private keys from the dump." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):221 +msgid "" +"Since you only need to type in the passphrase on your trusted machine, you " +"prevent any keystroke loggers from stealthily grabbing your passphrase as it " +"is entered." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):228 +msgid "" +"The one drawback to relying on authentication agent connection forwarding is " +"that it doesn't solve the problem of allowing cron jobs to take advantage of " +"RSA/DSA authentication. One solution to this problem is to set up all cron " +"jobs that need RSA/DSA authentication so that they execute from a trusted " +"machine on your LAN. If necessary, these cron jobs can use ssh to connect to " +"remote systems to automate backups, synchronize files, and so on." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):237 +msgid "" +"Now that we've looked at authentication agent connection forwarding, let's " +"turn to recent improvements made to the keychain script itself." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):245 +msgid "Keychain functionality improvements" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):248 +msgid "" +"Thanks to user patch submissions, many significant improvements have been " +"made to the keychain source. Several of the user-submitted keychain patches " +"were functionality-related. For example, you'll recall that keychain created " +"an <path>~/.ssh-agent</path> file; the name of this file has now been " +"changed to <path>~/.ssh-agent-[hostname]</path> so that keychain works with " +"NFS-mounted home directories that may be accessed from several different " +"physical hosts. In addition to the <path>~/.ssh-agent-[hostname]</path> " +"file, there is now a <path>~/.ssh-agent-csh-[hostname]</path> file that can " +"be sourced by csh-compatible shells. Finally, a new <c>--nocolor</c> option " +"has been added so that colorization features can be disabled if you happen " +"to be using a non-vt100-compatible terminal." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):265 +msgid "Shell compatibility fixes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):268 +msgid "" +"While the functionality improvements have been significant, the vast " +"majority of fixes have dealt with shell compatibility issues. You see, while " +"keychain 1.0 required bash, later versions were changed to work with any sh-" +"compatible shell. This change allows keychain to work \"out of the box\" on " +"nearly any UNIX system, including Linux, BSD, Solaris, IRIX, and AIX as well " +"as other UNIX platforms. While the transition to sh and general UNIX " +"compatibility has been a bumpy ride, it has also been a tremendous learning " +"experience. Creating a single script that runs on all of these platforms has " +"been very tricky indeed, mainly because I simply don't have access to most " +"of these operating systems! Thankfully, keychain users from around the globe " +"do, and many have provided great assistance in identifying compatibility " +"problems and submitting patches to fix them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):283 +msgid "" +"There are really two kinds of compatibility problems that had to be fixed. " +"First, I needed to make sure that keychain only used built-ins, expressions, " +"and operators that were fully supported under all sh implementations, " +"including all the popular free and commercial UNIX sh shells, zsh (in sh-" +"compatibility mode), and bash versions 1 and 2. Here are some of the user-" +"submitted shell-compatibility fixes that were applied to the keychain source:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):292 +msgid "" +"Since older sh shells don't support the ~ convention to refer to a user's " +"home directory, lines that used ~ were changed to use <c>$HOME</c> instead:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):297 +msgid "Making it $HOME" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):297 +#, no-wrap +msgid "" +"\n" +"hostname=`uname -n`\n" +"pidf=${HOME}/.ssh-agent-${hostname}\n" +"cshpidf=${HOME}/.ssh-agent-csh-${hostname}\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):303 +msgid "" +"Next, all references to source were changed to . to ensure compatibility " +"with purist NetBSD's /bin/sh, which doesn't support the source command at " +"all:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):308 +msgid "Humoring NetBSD" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):308 +#, no-wrap +msgid "" +"\n" +"if [ -f $pidf ]\n" +"then\n" +" . $pidf\n" +"else\n" +"SSH_AGENT_PID=\"NULL\"\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):317 +msgid "" +"Along the way, I also applied some nice performance-related fixes. One savvy " +"shell scripter informed me that instead of \"touching\" a file by typing " +"touch foo, you can do this instead:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):323 +msgid "Touching files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):323 +#, no-wrap +msgid "" +"\n" +"> <i>foo</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):327 +msgid "" +"By relying on built-in shell syntax rather than using an external binary, a " +"fork() is avoided and the script becomes slightly more efficient. The > " +"foo should work with any sh-compatible shell; however, it does not appear to " +"be supported by ash. This shouldn't be a problem for most people, since ash " +"is more of an emergency-disk type shell rather than something people use on " +"a day-to-day basis." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):339 +msgid "Platform executable issues" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):342 +msgid "" +"Getting a script working under multiple UNIX operating systems requires more " +"than adhering to pure sh syntax. Remember, most scripts also call external " +"commands, such as grep, awk, ps, and others, and these commands must be " +"called in a standards-compliant way as much as possible. For example, while " +"the echo included with most versions of UNIX recognizes the <c>-e</c> " +"option, Solaris does not -- it simply prints a <c>-e</c> to stdout when it " +"is used. So in order to deal with Solaris, keychain now auto-detects whether " +"<c>echo -e</c> works:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):352 +msgid "Sniffing out Solaris" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):352 +#, no-wrap +msgid "" +"\n" +"if [ -z \"`echo -e`\" ]\n" +"then\n" +" E=\"-e\"\n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):359 +msgid "" +"Above, E is set to <c>-e</c> if -e escaping is supported. Then, echo can be " +"called as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):364 +msgid "Better echo" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):364 +#, no-wrap +msgid "" +"\n" +"echo $E Usage: ${CYAN}${0}${OFF} [ ${GREEN}options${OFF} ] ${CYAN}sshkey${OFF} ...\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):368 +msgid "" +"By using <c>echo $E</c> instead of <c>echo -e</c>, the -e option can be " +"dynamically enabled or disabled as needed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):376 +msgid "pidof, ps" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):379 +msgid "" +"Probably the most significant compatibility fix involved changing how " +"keychain detects currently running ssh-agent processes. Previously, I was " +"using the pidof command to do this, but it had to be removed since several " +"systems don't have a pidof. Really, pidof isn't the greatest solution anyway " +"since it lists all ssh-agent processes running on the system, regardless of " +"user, when we're really interested in all ssh-agent processes owned by the " +"current effective UID." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):389 +msgid "" +"So, instead of relying on pidof, we switched over to piping ps output to " +"grep and awk in order to extract the needed process ids. This was a user-" +"submitted fix:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):395 +msgid "Piping better than pidof" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):395 +#, no-wrap +msgid "" +"\n" +"mypids=`ps uxw | grep ssh-agent | grep -v grep | awk '{print $2}'`\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):399 +msgid "" +"The above pipeline will set the mypids variable to the values of all ssh-" +"agent processes owned by the current user. The grep -v grep command is part " +"of the pipeline to ensure that the grep ssh-agent process does not become " +"part of our PID list." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):406 +msgid "" +"While this approach is good in concept, using ps opened up a whole new can " +"of worms since ps options are not standardized across various BSD and System " +"V UNIX derivatives. Here's an example: while ps uxw works under Linux, it " +"does not work under IRIX. And while <c>ps -u username -f</c> works under " +"Linux, IRIX, and Solaris, it doesn't work under BSD, which only understands " +"BSD-style ps options. To get around this problem, keychain auto-detects " +"whether the current system's ps works with BSD or System V syntax before " +"executing the ps pipeline:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):417 +msgid "Detecting BSD vs. System V" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):417 +#, no-wrap +msgid "" +"\n" +"psopts=\"FAIL\"\n" +"ps uxw >/dev/null 2>&1\n" +"if [ $? -eq 0 ]\n" +"then\n" +"psopts=\"uxw\"\n" +"else\n" +"ps -u `whoami` -f >/dev/null 2>&1\n" +"if [ $? -eq 0 ]\n" +"then\n" +"psopts=\"-u `whoami` -f\"\n" +"fi\n" +"fi\n" +"if [ \"$psopts\" = \"FAIL\" ]\n" +"then\n" +"echo $0: unable to use \\\"ps\\\" to scan for ssh-agent processes. \n" +"Report KeyChain version and echo system configuration to drobbins@gentoo.org.\n" +"exit 1\n" +"fi\n" +"\n" +"mypids=`ps $psopts 2>/dev/null | grep \"[s]sh-agent\" | awk '{print $2}'` > /dev/null 2>&1\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):440 +msgid "" +"To ensure that we work with both System V and BSD-style ps commands, the " +"script does a \"dry run\" of ps uxw, throwing away any output. If the error " +"code from this command is zero, we know that ps uxw works and we set the " +"psopts value appropriately. However, if ps uxw returned a non-zero error " +"code (indicating that we need to use BSD-style options), we do a dry-run of " +"<c>ps -u `whoami` -f</c>, again throwing away all output. At this point, " +"hopefully we've found either a BSD or System V variant of ps that we can " +"use. If we haven't, we print out an error and exit. But it is very likely " +"that one of the two ps commands worked, in which case we execute the final " +"line in the above code snippet, our ps pipeline. By using the $psopts " +"variable expansion immediately after ps, we're able to pass the correct " +"options to the ps command." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):454 +msgid "" +"The ps pipeline also contains a true grep gem, which was kindly sent to me " +"by Hans Peter Verne. Notice that <c>grep -v grep</c> is no longer part of " +"the pipeline; instead, it has been removed and <c>grep \"ssh-agent\"</c> has " +"been changed to grep <c>\"[s]sh-agent\"</c>. This single grep command ends " +"up doing the same thing as <c>grep ssh-agent | grep -v grep</c>; can you " +"figure out why?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre:caption):462 +msgid "Neat grep trick" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(pre):462 +#, no-wrap +msgid "" +"\n" +"mypids=`ps $psopts 2>/dev/null | grep \"[s]sh-agent\" | awk '{print $2}'` > /dev/null 2>&1\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):466 +msgid "" +"Stumped? If you've decided that a <c>grep \"ssh-agent\"</c> and <c>grep \"[s]" +"sh-agent\"</c> should match the exact same lines of text, you are correct. " +"So why do they generate different results when the output of ps is piped to " +"them? Here's how it works: when you use grep \"[s]sh-agent\", you change how " +"the grep command appears in the ps process list. By doing so, you prevent " +"grep from matching itself, since the [s]sh-agent string doesn't match the [s]" +"sh-agent regular expression. Isn't that brilliant? If you still don't get " +"it, play around with grep a bit more and you'll get it soon enough." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):480 +msgid "Conclusion" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(p):483 +msgid "" +"This column concludes my coverage of OpenSSH. Hopefully, you've learned " +"enough about it to start using OpenSSH to secure your systems. Next month's " +"Common threads column will continue with the \"Advanced filesystem " +"implementor's guide\" series." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(title):495 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):500 +msgid "" +"Read Daniel's other two articles in this series, <uri link=\"/doc/en/" +"articles/openssh-key-management-p1.xml\">OpenSSH key management, Part 1</" +"uri> and <uri link=\"/doc/en/articles/openssh-key-management-p2.xml" +"\">OpenSSH key management, Part 2</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):507 +msgid "" +"Be sure to visit the <uri link=\"http://www.openssh.com/\">home of OpenSSH " +"development</uri>, and check out the <uri link=\"http://www.openssh.com/faq." +"html\">OpenSSH FAQ</uri>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):512 +msgid "" +"<uri link=\"http://www.chiark.greenend.org.uk/~sgtatham/putty/\">PuTTY</uri> " +"is an excellent ssh client for Windows machines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(li):516 +msgid "" +"The book \"SSH, The Secure Shell: The Definitive Guide\" (O'Reilly & " +"Associates, 2001) may be of assistance. The <uri link=\"http://www.snailbook." +"com/\">authors' site</uri> contains information about the book, a FAQ, news, " +"and updates." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/openssh-key-management-p3.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/partition-planning-tips.xml.po b/article/gettext/ru/partition-planning-tips.xml.po new file mode 100644 index 0000000..afc2d75 --- /dev/null +++ b/article/gettext/ru/partition-planning-tips.xml.po @@ -0,0 +1,205 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(guide:link):5 +msgid "/doc/en/articles/partition-planning-tips.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):6 +msgid "Partition planning tips" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(abstract):15 +msgid "" +"Organizing your partitions correctly can be fun and rewarding. This " +"collection of tips will help you to use those sectors wisely." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(version):25 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(date):26 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):29 +msgid "How to keep things organized on disk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):33 +msgid "" +"Have you noticed how many new filesystems are now available for Linux these " +"days? Not only ReiserFS, but also SGI's XFS and IBM's own JFS (in source " +"form) are now available for Linux. What an incredible selection! And, of " +"course, we also have the Coda filesystem as well as good old ext2. As usual, " +"choice is an excellent thing. In this collection of tips, we'll be looking " +"at another area where we have lots of freedom -- how to organize partitions " +"on disk. Regardless of which new-fangled filesystem you are using, good " +"partition layout is essential. Here are three tips that will help to keep " +"things organized." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):47 +msgid "Don't partition the entire drive" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):50 +msgid "" +"These days, new machines often have 20 or 34 gigabytes of storage on a " +"single drive. These drives are great, but they create a new problem: how " +"exactly do you partition these things? Many of us can only conceive of " +"filling up 12 GB, and that's if we actually tried to fill things up." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):57 +msgid "" +"Instead of partitioning the entire drive during installation, you may want " +"to consider partitioning only the portion of the drive that you know you " +"will actually use. Later, when you've figured out how to use the 22 GB of " +"free space sitting at the end of your drive, you'll have a better idea of " +"how to partition it. Then, you can fire up <c>fdisk</c> or <c>cfdisk</c> and " +"create a partition that meets your exact needs. For now, create partitions " +"that are large enough to hold your current files, plus allow for future " +"growth. Don't worry, the free space at the end of your drive will still be " +"there when you need it." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):71 +msgid "Partition for backups" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):74 +msgid "" +"My second organizational tip will help your backups go more smoothly. If you " +"are going to regularly back up a portion of your file system tree, it's a " +"very good idea to place this data on a separate partition. Why? Because many " +"copying and archiving tools have a special option for not crossing partition " +"boundaries (such as <c>cp</c>'s <c>-x</c> option), which will make it easy " +"to select only the files you want. Also, you can select a size for this " +"partition so that it is close to capacity of your backup media. That way, " +"you'll never have to worry about filling up a tape, and you can monitor how " +"close you are to filling up your backup media by using the <c>df</c> command " +"to see how much space is left on that particular partition. Then, you can " +"track your storage and backup needs and plan accordingly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):91 +msgid "Partition to reduce fragmentation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):94 +msgid "" +"At the beginning of this article, I mentioned all the fancy new journaled " +"filesystems now available for Linux. Amid all the excitement, it's easy to " +"forget our old friend, the ext2 filesystem. ext2 does have some drawbacks; " +"it is not extremely robust, for example. However, one thing it does excel at " +"(especially when compared to Microsoft's NTFS) is keeping fragmentation to a " +"minimum. If you don't know, file fragmentation occurs when there is not " +"enough contiguous space on a filesystem to store an entire file. The result? " +"The file is broken into non-contiguous \"fragments,\" which are stored on " +"disk. When this file is accessed, the hard drive's head needs to jump all " +"over the place to read in the entire file. This slows down I/O, adding " +"additional seeks to the reading process." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):108 +msgid "" +"OK, you may ask, what's the big deal? After all, ext2 filesystems take a " +"long time to exhibit signs of fragmentation. However, I would argue that " +"fragmentation is still a big problem, because although ext2 does not get " +"fragmented easily, fragmentation is a one-way, cumulative process. That is, " +"while ext2 fragments slowly, it cannot defragment itself. In other words, " +"any often-modified ext2 filesystem will gradually get more and more " +"fragmented, and thus slower. Even worse, there are no production-quality " +"ext2 filesystem defragmenting programs currently available. This means that " +"fragmentation is guaranteed to get worse over time, and the only way to fix " +"it is to wipe the filesystem clean, and restore all the original files from " +"a backup. That's a pretty involved and time-consuming process. So, how can " +"the problem of fragmentation be dramatically reduced and contained? I'll " +"cover all the juicy details in my next tip. See you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):127 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(li):131 +msgid "" +"In <uri link=\"/doc/en/articles/partitioning-p1.xml\">Partitioning in " +"action: Moving /home</uri>, I show you step-by-step how to move <path>/home</" +"path> to a new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(li):136 +msgid "" +"In <uri link=\"/doc/en/articles/partitioning-p2.xml\">Partitioning in " +"action</uri>, I show you step-by-step how to move <path>/var</path> and " +"<path>/tmp</path> to a new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(li):141 +msgid "" +"See <uri link=\"/doc/en/articles/maximum-swappage.xml\">Maximum swappage</" +"uri>, another tip by Daniel, where he shows how to dramatically increase " +"swap performance under Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(li):146 +msgid "" +"Check out the <uri link=\"http://tldp.org/docs.html#howto\">howtos</uri> at " +"the <uri link=\"http://tldp.org\">Linux Documentation Project</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(title):155 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(p):158 +msgid "" +"Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of " +"Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a " +"contributing author of several books published by MacMillan: Caldera " +"OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has " +"been involved with computers in some fashion since the second grade when he " +"was first exposed to the Logo programming language and a potentially lethal " +"dose of Pac Man. This probably explains why he has since served as a Lead " +"Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys " +"spending time with his wife Mary and his new baby daughter, Hadassah. You " +"can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/partition-planning-tips.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/partitioning-p1.xml.po b/article/gettext/ru/partitioning-p1.xml.po new file mode 100644 index 0000000..f5a7e37 --- /dev/null +++ b/article/gettext/ru/partitioning-p1.xml.po @@ -0,0 +1,434 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(guide:link):5 +msgid "/doc/en/articles/partitioning-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):6 +msgid "Partitioning in action, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(abstract):15 +msgid "" +"In this new series of tips, Daniel Robbins shows you how to change partition " +"layout on a running system. He'll also cover several tricks of the trade to " +"minimize downtime and avoid making costly mistakes. In this particular tip, " +"he'll show you how to move /home to another partition." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(version):27 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(date):28 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):31 +msgid "Moving /home" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):33 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):36 +msgid "" +"The partition <path>/home</path> is one of the most-often-moved partitions. " +"Sometimes, all the space in <path>/home</path> becomes exhausted, and an " +"additional hard drive is required. Other times, <path>/home</path> is set up " +"as part of the root partition, and it may need to be moved to improve " +"performance or facilitate backup. Whatever the case, I'll show you how to " +"move <path>/home</path> safely and efficiently." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(warn):45 +msgid "" +"The following technique describes how to move a partition(s). Although this " +"technique is designed so that you can \"back out\" of a failed partition " +"move, it doesn't protect against user error. In other words, any time that " +"you format partitions or copy large numbers of files, there's a possibility " +"that you will type the wrong thing, causing lots of data to be destroyed. " +"For this reason, it's highly recommended that you <e>take appropriate steps " +"to back up all critical files before proceeding</e>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):55 +msgid "" +"Now that you're prepared, we're ready to start moving <path>/home</path>. " +"The exact steps you will take depend on whether <path>/home</path> currently " +"resides on its own separate partition, or whether it is located on the root " +"partition. Keep this in mind as we go through the steps (I'll make notes " +"where necessary). Right now, if you are moving <path>/home</path> to a new " +"hard drive, it should be physically installed in your system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):64 +msgid "" +"If you are moving <path>/home</path> to an existing partition (it doesn't " +"need to be ext2, as long as the target primary or extended partition " +"exists), you can proceed to <uri link=\"#step2\">step 2</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):73 +msgid "Create a new partition, if necessary" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):76 +msgid "" +"If the new partition doesn't exist yet, you'll need to create it using " +"<c>cfdisk</c> (preferred) or <c>fdisk</c>. If the partition doesn't reside " +"on your first drive, remember to specify the name of the device as the first " +"argument to <c>cfdisk</c> or <c>fdisk</c>. After creating the appropriate " +"primary or extended partition, you should reboot so that the partition table " +"can be reread correctly. This is the only time you will need to reboot the " +"system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):91 +msgid "Create a filesystem on the new partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):95 +msgid "" +"To create a filesystem on the new partition, first make sure you know the " +"exact device name for the new partition (for example, <path>/dev/sda5</" +"path>). If you're not sure of the exact device name, stop now and double-" +"check! Then type the following, as root:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):102 +msgid "Creating the filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):102 +#, no-wrap +msgid "" +"\n" +"# <i>mkfs.ext2 /dev/???</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):106 +msgid "" +"In the above and following code samples, <path>???</path> should be replaced " +"with the target partition name. After executing this command, the target " +"partition will contain an empty ext2 filesystem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):117 +msgid "Mount the new filesystem in /mnt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):121 +msgid "" +"Create a directory called <path>/mnt/newpart</path>, and then mount the new " +"partition there:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):126 +msgid "Mounting the partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):126 +#, no-wrap +msgid "" +"\n" +"# <i>mount /dev/??? /mnt/newpart</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):135 +msgid "Drop to single-user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):139 +msgid "" +"I delayed this step as long as possible to maximize system availability, but " +"we now must drop into single-user mode, and copy files from <path>/home</" +"path> to <path>/mnt/newpart</path>. You shouldn't have any files open in " +"<path>/home</path>, and entering single-user mode eliminates this " +"possibility:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):146 +msgid "Entering single user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):146 +#, no-wrap +msgid "" +"\n" +"# <i>init 1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):150 +msgid "" +"If prompted, enter the root password to perform system maintenance. You " +"should now have a root shell." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):160 +msgid "Change directories to /home and copy files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):164 +msgid "Type the following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):168 +msgid "Copying files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):168 +#, no-wrap +msgid "" +"\n" +"# <i>cd /home</i>\n" +"# <i>cp -ax * /mnt/newpart</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):173 +msgid "" +"The <c>cp -ax</c> command recursively copies the contents of <path>/home</" +"path> to <path>/mnt/newpart</path>, preserving all file attributes, and not " +"crossing any mount points. After this command finishes, <path>/mnt/newpart</" +"path> will contain an exact copy of all the files and directories currently " +"in <path>/home</path>. If the old <path>/home</path> was on its own separate " +"partition (listed on a separate line in <path>/etc/fstab</path>), go to <uri " +"link=\"#step6a\">step 6a</uri>. Otherwise, proceed to <uri link=\"#step6b" +"\">step 6b</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):189 +msgid "Use the new partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):191 +msgid "6a: /home on its own partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(note):194 +msgid "" +"These instructions are for systems where the old <path>/home</path> is " +"already on its own dedicated partition. If this isn't the case, see <uri " +"link=\"#step6b\">step 6b</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):200 +msgid "Unmount the old partition by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):204 +msgid "Unmounting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):204 +#, no-wrap +msgid "" +"\n" +"# <i>cd /</i>\n" +"# <i>umount /home</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):209 +msgid "Then, unmount and remount the new partition:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):213 +msgid "Remounting the partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):213 +#, no-wrap +msgid "" +"\n" +"# <i>umount /mnt/newpart</i>\n" +"# <i>mount /dev/??? /home</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):218 +msgid "" +"Now, the new partition is available at /home and is ready to be used. We can " +"perform the last few steps in multiuser mode. Exit single-user mode, so that " +"the system is back up and running, by pressing <c>CTRL-D</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(impo):224 +msgid "" +"After the system starts up normally, log in as root and edit <path>/etc/" +"fstab</path> so that <path>/dev/???</path> is now mounted automatically at " +"<path>/home</path> instead of your old partition. For example, change this " +"line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):231 +msgid "Old fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):231 +#, no-wrap +msgid "" +"\n" +"/dev/hda3 /home ext2 defaults 1 2\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):235 +msgid "to this line:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):239 +msgid "New fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):239 +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):267 +#, no-wrap +msgid "" +"\n" +"/dev/??? /home ext2 defaults 1 2\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):246 +msgid "6b: /home on a shared partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(note):249 +msgid "" +"These instructions are for systems where the old <path>/home</path> is on a " +"shared partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):254 +msgid "Moving the directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre):254 +#, no-wrap +msgid "" +"\n" +"# <i>cd /</i>\n" +"# <i>mv /home /home.old</i>\n" +"# <i>mkdir /home</i>\n" +"# <i>mount /dev/??? /home</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(impo):261 +msgid "" +"Now, leave single user mode by pressing <c>CTRL-D</c>. When the system is " +"back up and running, edit <path>/etc/fstab</path> and add a line like the " +"following:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(pre:caption):267 +msgid "Editing fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):271 +msgid "" +"That way, your new partition will get mounted correctly the next time the " +"system is rebooted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):281 +msgid "Finishing up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):285 +msgid "" +"We deliberately left the old <path>/home</path> directory/partition behind, " +"just in case there were problems copying files. After verifying that the " +"system is running smoothly, you can either use your old <path>/home</path> " +"partition for something else, or remove the <path>/home.old</path> directory." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):292 +msgid "" +"Congratulations, you've just moved <path>/home</path>! In my next tip, we'll " +"reconfigure a system so that <path>/tmp</path> and <path>/var</path> are on " +"their own shared partition. See you then." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):301 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(li):305 +msgid "" +"In <uri link=\"/doc/en/articles/partitioning-p2.xml\">Partitioning in " +"action</uri>, I show you step-by-step how to move <path>/var</path> and " +"<path>/tmp</path> to a new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(li):310 +msgid "" +"In my first tip, <uri link=\"/doc/en/articles/maximum-swappage.xml\">Maximum " +"swappage</uri>, I show how to dramatically increase swap performance under " +"Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(li):315 +msgid "" +"In my second tip, <uri link=\"/doc/en/articles/partition-planning-tips.xml" +"\">Partition planning tips</uri>, I share several ways of effectively " +"organizing your partition layout." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(li):321 +msgid "" +"I always recommend checking out the <uri link=\"http://tldp.org/docs." +"html#howto\">howtos</uri> at <uri link=\"http://tldp.org/\">The Linux " +"Documentation Project</uri> -- they're a valuable resource." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(title):332 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(p):335 +msgid "" +"Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of " +"Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a " +"contributing author of several books published by MacMillan: Caldera " +"OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has " +"been involved with computers in some fashion since the second grade when he " +"was first exposed to the Logo programming language and a potentially lethal " +"dose of Pac Man. This probably explains why he has since served as a Lead " +"Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys " +"spending time with his wife Mary and his new baby daughter, Hadassah. You " +"can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/partitioning-p2.xml.po b/article/gettext/ru/partitioning-p2.xml.po new file mode 100644 index 0000000..0ff8261 --- /dev/null +++ b/article/gettext/ru/partitioning-p2.xml.po @@ -0,0 +1,437 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):6 +msgid "Partitioning in action, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph"/> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(abstract):15 +msgid "" +"In this second tip on changing partition layout on a running system, Daniel " +"Robbins shows you how to move /tmp and /var to their own shared partition. " +"He also covers several tricks of the trade to minimize downtime and avoid " +"making costly mistakes." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(version):27 +msgid "1.4" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(date):28 +msgid "2010-03-02" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):31 +msgid "Consolidating data" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):33 +msgid "Introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):36 +msgid "" +"In my <uri link=\"/doc/en/articles/partitioning-p1.xml\">last tip</uri>, we " +"successfully moved <path>/home</path> to a new partition. Now, it's time to " +"learn how to consolidate often-modified files onto a new partition. Why " +"would we want to do this? Here's an example. Often-modified files contribute " +"heavily to fragmentation. One of the best ways to contain fragmentation is " +"to store often-modified files on their own partition. That way, the other " +"partitions are unaffected by the fragmentation caused by the heavily " +"modified files. In concept, this is easy to understand, but how do you " +"actually go about doing it?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):47 +msgid "" +"First, you must create a new partition for the specific purpose of storing " +"frequently modified files. You might want to locate this partition on a " +"separate disk to enhance performance. Then, I'll walk you through the steps " +"required to move both <path>/tmp</path> and <path>/var</path> to this new " +"partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(warn):55 +msgid "" +"The following technique describes how to move a partition(s). Although this " +"technique is designed so that you can \"back out\" of a failed partition " +"move, it doesn't protect against user error. In other words, any time that " +"you format partitions or copy large numbers of files, there's a possibility " +"that you will type the wrong thing, causing lots of data to be destroyed. " +"For this reason, it's highly recommended that you <e>take appropriate steps " +"to back up all critical files before proceeding</e>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):68 +msgid "Create a filesystem on the new partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):71 +msgid "" +"The first step of this process is to create a new partition that's big " +"enough to hold <path>/var</path> and <path>/tmp</path>, with a little extra " +"space left over. You'll need either an additional drive, or a spare (unused) " +"partition that will house the often-modified files. If you do need to use " +"<c>fdisk</c> or <c>cfdisk</c> to create the partition, you'll need to reboot " +"once. Then, it's time to format the new partition as follows (it's OK to be " +"in multiuser mode while you do this; I'll let you know when to switch to " +"single-user):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):81 +msgid "Creating the filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):81 +#, no-wrap +msgid "" +"\n" +"# <i>mkfs.ext2 /dev/???</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):90 +msgid "Mount it to /mnt/rwstorage" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):94 +msgid "" +"As in my previous tip, <path>???</path> should be replaced with the device " +"name for the new, empty partition that you are creating. Accidentally typing " +"the wrong name will destroy data on an existing partition, so be careful! " +"After typing this command, you'll have a brand-new ext2 filesystem on the " +"new partition. We're almost ready to mount it, but first, let's make a new " +"mount point." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):103 +msgid "Creating the mount point" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):103 +#, no-wrap +msgid "" +"\n" +"# <i>mkdir /mnt/rwstorage</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):107 +msgid "" +"I chose the name <path>rwstorage</path> to remind us that this particular " +"partition is going to be specifically used to house files that are read from " +"and written to frequently. To mount the partition, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):113 +msgid "Mounting the partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):113 +#, no-wrap +msgid "" +"\n" +"# <i>mount /dev/??? /mnt/rwstorage</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):122 +msgid "Creating a new /tmp" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):126 +msgid "" +"The partition is now mounted and we're ready to create our new <path>/tmp</" +"path> directory:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):131 +msgid "Creating the new /tmp" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):131 +#, no-wrap +msgid "" +"\n" +"# <i>cd /mnt/rwstorage</i>\n" +"# <i>mkdir tmp</i>\n" +"# <i>chmod 1777 tmp</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):142 +msgid "Drop to single-user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):146 +msgid "" +"Our new directory at <path>/mnt/rwstorage/tmp</path> has the right " +"permissions for a temporary directory. Now, drop to single-user mode, since " +"we must copy over <path>/var</path>. As usual, we've delayed our drop to " +"single-user mode to the last possible moment. Right now, we don't want any " +"programs reading or writing files in <path>/var</path>, so we have to stop " +"all daemons, disconnect all users, and do some quick maintenance by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):155 +msgid "Entering single-user mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):155 +#, no-wrap +msgid "" +"\n" +"# <i>init 1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):159 +msgid "" +"If you're prompted to enter a password to perform system maintenance, do so. " +"You should now have a root shell, and all unnecessary daemons will be " +"stopped. Create a new location for our <path>/var</path> files by typing:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):165 +msgid "Creating the new directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):165 +#, no-wrap +msgid "" +"\n" +"# <i>cd /mnt/rwstorage</i>\n" +"# <i>mkdir var</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):175 +msgid "Copy /var" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):179 +msgid "" +"Default permissions on our new <path>/mnt/newstorage/var</path> directory " +"should be correct, so now we're ready to copy all of our original <path>/" +"var</path> data over to the new partition:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):185 +msgid "Copying the data" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):185 +#, no-wrap +msgid "" +"\n" +"# <i>cd /var </i>\n" +"# <i>cp -ax * /mnt/rwstorage/var</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):195 +msgid "Back up and create symlinks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):199 +msgid "" +"After this command completes, you'll have an exact copy of <path>/var</path> " +"at <path>/mnt/rwstorage/var</path>. Now, you may be asking how exactly we " +"get Linux to use <path>/mnt/rwstorage/var</path> and <path>/mnt/rwstorage/" +"tmp</path> instead of the defaults in the root directory. This is easily " +"done by the use of symbolic links -- we'll create the new symbolic links, " +"<path>/tmp</path> and <path>/var</path>, which point to the correct " +"directories in <path>/mnt/rwstorage</path>. First, let's back up the " +"original directories:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):210 +msgid "Backing up the directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):210 +#, no-wrap +msgid "" +"\n" +"# <i>cd /</i>\n" +"# <i>mv var var.old</i>\n" +"# <i>mv tmp tmp.old</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):216 +msgid "" +"The last line probably isn't necessary, since it's very likely that you " +"don't have anything important in <path>/tmp</path>, but we're playing it " +"safe. Now, let's create the symlinks:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):222 +msgid "Creating the symlinks" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):222 +#, no-wrap +msgid "" +"\n" +"# <i>cd /</i>\n" +"# <i>ln -s /mnt/rwstorage/var /var</i>\n" +"# <i>ln -s /mnt/rwstorage/tmp /tmp</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):233 +msgid "Finishing touches to /etc/fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):237 +msgid "" +"Now, when any user or program uses <path>/var</path>, they'll automatically " +"be transported to <path>/mnt/rwstorage/var</path>! Likewise for <path>/tmp</" +"path>. We have one step left; however, it can be safely performed in " +"multiuser mode. It's time to get Apache running again, and to allow all your " +"users to log back in. Exit from runlevel 1 by pressing <c>CTRL-D</c>. The " +"system should start up normally. Log in as root." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):246 +msgid "" +"The final thing we must do is configure <path>/etc/fstab</path> so that " +"<path>/dev/???</path> is mounted at <path>/mnt/rwstorage</path>. You must " +"add a line like the following to your <path>/etc/fstab</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):252 +msgid "Configuring fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):252 +#, no-wrap +msgid "" +"\n" +"/dev/??? /mnt/rwstorage ext2 defaults 1 2\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(impo):256 +msgid "" +"If you are using a kernel version in the 2.3+ range, it's very likely that " +"you have a line in your <path>/etc/fstab</path> that looks like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):261 +msgid "Shared memory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):261 +#, no-wrap +msgid "" +"\n" +"none /var/shm shm defaults 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):265 +msgid "" +"This line enables shared memory on your system, and by default it gets " +"mounted in <path>/var</path>. In order for this line to work properly, it " +"must appear after the line you just added. That way, when Linux starts up, " +"<path>/mnt/rwstorage</path> will get mounted first (enabling /var). Then, " +"and only then, will the shm device get mounted at <path>/var/shm</path>, " +"which is really <path>/mnt/rwstorage/var/shm</path>. Make sure the lines are " +"in this order:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre:caption):275 +msgid "Enabling shared memory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(pre):275 +#, no-wrap +msgid "" +"\n" +"/dev/??? /mnt/rwstorage ext2 defaults 1 2\n" +"none /var/shm shm defaults 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):280 +msgid "" +"After saving the changes to <path>/etc/fstab</path>, your system has been " +"successfully upgraded! After verifying that everything is working properly, " +"you'll want to remove the <path>/tmp.old</path> and <path>/var.old</path> " +"backup directories. Congratulations -- you've successfully reconfigured your " +"system's partitions for optimum performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):291 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(li):295 +msgid "" +"In <uri link=\"/doc/en/articles/partitioning-p1.xml\">Partitioning in " +"action: Moving /home</uri>, I show you step-by-step how to move <path>/home</" +"path> to a new partition." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(li):300 +msgid "" +"In <uri link=\"/doc/en/articles/maximum-swappage.xml\">Maximum swappage</" +"uri>, I show how to dramatically increase swap performance under Linux." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(li):305 +msgid "" +"In <uri link=\"/doc/en/articles/partition-planning-tips.xml\">Partition " +"planning tips</uri>, I share several ways of effectively organizing your " +"partition layout." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(li):310 +msgid "" +"I always recommend checking out the <uri link=\"http://tldp.org/docs." +"html#howto\">howtos</uri> at <uri link=\"http://tldp.org/\">The Linux " +"Documentation Project</uri> -- they're a valuable resource." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(title):321 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(p):324 +msgid "" +"Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of " +"Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a " +"contributing author of several books published by MacMillan: Caldera " +"OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has " +"been involved with computers in some fashion since the second grade when he " +"was first exposed to the Logo programming language and a potentially lethal " +"dose of Pac Man. This probably explains why he has since served as a Lead " +"Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys " +"spending time with his wife Mary and his new baby daughter, Hadassah. You " +"can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/partitioning-p2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/prompt-magic.xml.po b/article/gettext/ru/prompt-magic.xml.po new file mode 100644 index 0000000..dd77664 --- /dev/null +++ b/article/gettext/ru/prompt-magic.xml.po @@ -0,0 +1,716 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(guide:link):5 +msgid "/doc/en/articles/prompt-magic.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):7 +msgid "Prompt magic" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(author:title):9 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(mail:link):10 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(mail):10 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(abstract):16 +msgid "" +"Why stick with the standard boring shell prompt when you can easily make it " +"colorful and more informative? In this tip, Daniel Robbins will show you how " +"to get your shell prompt just the way you like it, as well as how to " +"dynamically update your X terminal's title bar." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(version):28 +msgid "1.2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(date):29 +msgid "2005-10-21" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):32 +msgid "Enhancing the system prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):36 +msgid "" +"As Linux/UNIX people, we spend a lot of time working in the shell, and in " +"many cases, this is what we have staring back at us:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):41 +msgid "The normal user prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):41 +#, no-wrap +msgid "" +"\n" +"bash-2.04$\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):45 +msgid "" +"If you happen to be root, you're entitled to the \"prestige\" version of " +"this beautiful prompt:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):50 +msgid "The root prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):50 +#, no-wrap +msgid "" +"\n" +"bash-2.04#\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):54 +msgid "" +"These prompts are not exactly pretty. It's no wonder that several Linux " +"distributions have upgraded their default prompts that add color and " +"additional information to boot. However, even if you happen to have a modern " +"distribution that comes with a nice, colorful prompt, it may not be perfect. " +"Maybe you'd like to add or change some colors, or add (or remove) " +"information from the prompt itself. It isn't hard to design your own " +"colorized, tricked-out prompt from scratch." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):67 +msgid "Prompt basics" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):70 +msgid "" +"Under bash, you can set your prompt by changing the value of the <c>PS1</c> " +"environment variable, as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):75 +msgid "Altering the environment variable" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):75 +#, no-wrap +msgid "" +"\n" +"$ <i>export PS1=\"> \"</i>\n" +">\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):80 +msgid "" +"Changes take effect immediately, and can be made permanent by placing the " +"<c>export</c> definition in your <path>~/.bashrc</path> file. <c>PS1</c> can " +"contain any amount of plain text that you'd like:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):86 +msgid "A custom prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):86 +#, no-wrap +msgid "" +"\n" +"$ <i>export PS1=\"This is my super prompt > \"</i>\n" +"This is my super prompt >\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):91 +msgid "" +"While this is, um, interesting, it's not exactly useful to have a prompt " +"that contains lots of static text. Most custom prompts contain information " +"like the current username, working directory, or hostname. These tidbits of " +"information can help you to navigate in your shell universe. For example, " +"the following prompt will display your username and hostname:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):99 +msgid "A more useful prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):99 +#, no-wrap +msgid "" +"\n" +"$ <i>export PS1=\"\\u@\\H > \"</i>\n" +"drobbins@freebox >\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):104 +msgid "" +"This prompt is especially handy for people who log in to various machines " +"under various differently-named accounts, since it acts as a reminder of " +"what machine you're actually on and what privileges you currently have." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):110 +msgid "" +"In the above example, we told bash to insert the username and hostname into " +"the prompt by using special backslash-escaped character sequences that bash " +"replaces with specific values when they appear in the <c>PS1</c> variable. " +"We used the sequences <c>\\u</c> (for username) and <c>\\H</c> (for the " +"first part of the hostname). Here's a complete list of all special sequences " +"that bash recognizes (you can find this list in the bash man page, in the " +"\"PROMPTING\" section):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(th):122 +msgid "Sequence" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(th):123 +msgid "Description" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):126 +msgid "\\a" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):127 +msgid "The ASCII bell character (you can also type <c>\\007</c>)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):130 +msgid "\\d" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):131 +msgid "Date in \"Wed Sep 06\" format" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):134 +msgid "\\e" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):135 +msgid "ASCII escape character (you can also type <c>\\033</c>)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):138 +msgid "\\h" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):139 +msgid "First part of hostname (such as \"mybox\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):142 +msgid "\\H" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):143 +msgid "Full hostname (such as \"mybox.mydomain.com\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):146 +msgid "\\j" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):147 +msgid "" +"The number of processes you've suspended in this shell by hitting <c>^Z</c>" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):152 +msgid "\\l" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):153 +msgid "The name of the shell's terminal device (such as \"ttyp4\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):156 +msgid "\\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):157 +msgid "Newline" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):160 +msgid "\\r" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):161 +msgid "Carriage return" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):164 +msgid "\\s" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):165 +msgid "The name of the shell executable (such as \"bash\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):168 +msgid "\\t" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):169 +msgid "Time in 24-hour format (such as \"23:01:01\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):172 +msgid "\\T" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):173 +msgid "Time in 12-hour format (such as \"11:01:01\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):176 +msgid "\\@" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):177 +msgid "Time in 12-hour format with am/pm" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):180 +msgid "\\u" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):181 +msgid "Your username" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):184 +msgid "\\v" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):185 +msgid "Version of bash (such as 2.04)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):188 +msgid "\\V" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):189 +msgid "Bash version, including patchlevel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):192 +msgid "\\w" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):193 +msgid "Current working directory (such as <path>/home/drobbins</path>)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):196 +msgid "\\W" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):197 +msgid "" +"The \"basename\" of the current working directory (such as \"drobbins\")" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):200 +msgid "\\!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):201 +msgid "Current command's position in the history buffer" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):204 +msgid "\\#" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):205 +msgid "" +"Command number (this will count up at each prompt, as long as you type " +"something)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):211 +msgid "\\\\$" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):212 +msgid "" +"If you are not root, inserts a <c>$</c>; if you are root, you get a <c>#</" +"c>. If you delimit your string with <c>'</c> instead of <c>\"</c>, you " +"should use a single backslash instead." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):219 +msgid "\\xxx" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):220 +msgid "" +"Inserts an ASCII character based on three-digit number xxx (replace unused " +"digits with zeros, such as <c>\\007</c>)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):226 +msgid "\\\\" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):227 +msgid "A backslash" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):230 +msgid "\\[" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):231 +msgid "" +"This sequence should appear before a sequence of characters that don't move " +"the cursor (like color escape sequences). This allows bash to calculate word " +"wrapping correctly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):238 +msgid "\\]" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(ti):239 +msgid "" +"This sequence should appear after a sequence of non-printing characters." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):245 +msgid "" +"So, there you have all of bash's special backslashed escape sequences. Play " +"around with them for a bit to get a feel for how they work. After you've " +"done a little testing, it's time to add some color." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):254 +msgid "Colorization" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):257 +msgid "" +"Adding color is quite easy; the first step is to design a prompt without " +"color. Then, all we need to do is add special escape sequences that'll be " +"recognized by the terminal (rather than bash) and cause it to display " +"certain parts of the text in color. Standard Linux terminals and X terminals " +"allow you to set the foreground (text) color and the background color, and " +"also enable \"bold\" characters if so desired. We get eight colors to choose " +"from." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):266 +msgid "" +"Colors are selected by adding special sequences to <c>PS1</c> -- basically " +"sandwiching numeric values between an <c>\\e[</c> (escape open-bracket) and " +"an <c>m</c>. If we specify more than one numeric code, we separate each code " +"with a semicolon. Here's an example color code:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):273 +msgid "Adding color" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):273 +#, no-wrap +msgid "" +"\n" +"\"\\e[0m\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):277 +msgid "" +"When we specify a zero as a numeric code, it tells the terminal to reset " +"foreground, background, and boldness settings to their default values. " +"You'll want to use this code at the end of your prompt, so that the text " +"that you type in is not colorized. Now, let's take a look at the color " +"codes. Check out this screenshot:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(figure:link):285 +msgid "/images/docs/prompt-magic-colortable.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(figure:caption):285 +msgid "Color chart" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):287 +msgid "" +"To use this chart, find the color you'd like to use, and find the " +"corresponding foreground (30-37) and background (40-47) numbers. For " +"example, if you like green on a normal black background, the numbers are 32 " +"and 40. Then, take your prompt definition and add the appropriate color " +"codes. This:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):294 +msgid "A basic custom prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):294 +#, no-wrap +msgid "" +"\n" +"$ <i>export PS1=\"\\w> \"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):298 +msgid "becomes:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):302 +msgid "The colorized prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):302 +#, no-wrap +msgid "" +"\n" +"$ <i>export PS1=\"\\e[32;40m\\w> \"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):306 +msgid "" +"So far, so good, but it's not perfect yet. After bash prints the working " +"directory, we need to set the color back to normal with an <c>\\e[0m</c> " +"sequence:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):312 +msgid "A better colorized prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):312 +#, no-wrap +msgid "" +"\n" +"$ <i>export PS1=\"\\e[32;40m\\w> \\e[0m\"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):316 +msgid "" +"This definition will give you a nice, green prompt, but we still need to add " +"a few finishing touches. We don't need to include the background color " +"setting of 40, since that sets the background to black which is the default " +"color anyway. Also, the green color is quite dim; we can fix this by adding " +"a <c>1</c> color code, which enables brighter, bold text. In addition to " +"this change, we need to surround all non-printing characters with special " +"bash escape sequences, <c>\\[</c> and <c>\\]</c>. These sequences will tell " +"bash that the enclosed characters don't take up any space on the line, which " +"will allow word-wrapping to continue to work properly. Without them, you'll " +"end up with a nice-looking prompt that will mess up the screen if you happen " +"to type in a command that approaches the extreme right of the terminal. " +"Here's our final prompt:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):330 +msgid "A nice colorful prompt" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):330 +#, no-wrap +msgid "" +"\n" +"$ <i>export PS1=\"\\[\\e[32;1m\\]\\w> \\[\\e[0m\\]\"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):334 +msgid "Don't be afraid to use several colors in the same prompt, like so:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):338 +msgid "Much more colorful" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):338 +#, no-wrap +msgid "" +"\n" +"$ <i>export PS1=\"\\[\\e[36;1m\\]\\u@\\[\\e[32;1m\\]\\H> \\[\\e[0m\\]\"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):345 +msgid "Xterm fun" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):348 +msgid "" +"I've shown you how to add information and color to your prompt, but you can " +"do even more. It's possible to add special codes to your prompt that will " +"cause the title bar of your X terminal (such as rxvt or aterm) to be " +"dynamically updated. All you need to do is add the following sequence to " +"your <c>PS1</c> prompt:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):356 +msgid "Updating the xterm title bar" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):356 +#, no-wrap +msgid "" +"\n" +"\"\\e]2;titlebar\\a\"\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):360 +msgid "" +"Simply replace the substring <c>titlebar</c> with the text that you'd like " +"to have appear in your xterm's title bar, and you're all set! You don't need " +"to use static text; you can also insert bash escape sequences into your " +"titlebar. Check out this example, which places the username, hostname, and " +"current working directory in the titlebar, as well as defining a short, " +"bright green prompt:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):369 +msgid "An extremely useful xterm" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):369 +#, no-wrap +msgid "" +"\n" +"$ <i>export PS1=\"\\[\\e]2;\\u@\\H \\w\\a\\e[32;1m\\]>\\[\\e[0m\\] \"</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):373 +msgid "" +"This is the particular prompt that I'm using in the color chart screenshot, " +"above. I love this prompt, because it puts all the information in the title " +"bar rather than in the terminal where it limits how much can fit on a line. " +"By the way, make sure you surround your titlebar sequence with <c>\\[</c> " +"and <c>\\]</c>, since as far as the terminal is concerned, this sequence is " +"non-printing. The problem with putting lots of information in the title bar " +"is that you will not be able to see info if you are using a non-graphical " +"terminal, such as the system console. To fix this, you may want to add " +"something like this to your <path>~/.bashrc</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):385 +msgid "Adding usefulness to xterms and system consoles" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):385 +#, no-wrap +msgid "" +"\n" +"if [ \"$TERM\" = \"linux\" ]\n" +"then\n" +" <comment># We're on the system console or maybe telnetting in</comment>\n" +" export PS1=\"\\[\\e[32;1m\\]\\u@\\H > \\[\\e[0m\\]\"\n" +"else\n" +" <comment># We're not on the console, assume an xterm</comment>\n" +" export PS1=\"\\[\\e]2;\\u@\\H \\w\\a\\e[32;1m\\]>\\[\\e[0m\\] \" \n" +"fi\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):396 +msgid "" +"This bash conditional statement will dynamically set your prompt based on " +"your current terminal settings. For consistency, you'll want to configure " +"your <path>~/.bash_profile</path> so that it sources your <path>~/.bashrc</" +"path> on startup. Make sure the following line is in your <path>~/." +"bash_profile</path>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre:caption):403 +msgid "Editing bash_profile" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(pre):403 +#, no-wrap +msgid "" +"\n" +"source ~/.bashrc\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):407 +msgid "" +"This way, you'll get the same prompt setting whether you start a login or " +"non-login shell." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):412 +msgid "" +"Well, there you have it. Now, have some fun and whip up some nifty colorized " +"prompts!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):420 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(li):424 +msgid "" +"<uri link=\"http://www.rxvt.org\">rxvt</uri> is a great little xterm that " +"happens to have a good amount of documentation related to escape sequences " +"tucked in the <path>doc</path> directory included in the source tarball." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(li):429 +msgid "" +"<uri link=\"http://aterm.sourceforge.net\">aterm</uri> is another terminal " +"program, based on rxvt. It supports several nice visual features, like " +"transparency and tinting." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(li):434 +msgid "" +"<uri link=\"http://bashish.mine.nu/BashishWiki/index.php/Main_Page" +"\">bashish</uri> is a theme engine for all different kinds of terminals. " +"Check out some <uri link=\"http://bashish.mine.nu/BashishWiki/index.php/" +"Screenshots\">great screenshots</uri> of bashish in action!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(title):446 +msgid "About the author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(p):449 +msgid "" +"Daniel Robbins lives in Albuquerque, New Mexico. He was the President/CEO of " +"Gentoo Technologies Inc., the Chief Architect of the Gentoo Project and is a " +"contributing author of several books published by MacMillan: Caldera " +"OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has " +"been involved with computers in some fashion since the second grade when he " +"was first exposed to the Logo programming language and a potentially lethal " +"dose of Pac Man. This probably explains why he has since served as a Lead " +"Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys " +"spending time with his wife Mary and his new baby daughter, Hadassah. You " +"can contact Daniel at <mail>drobbins@gentoo.org</mail>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/prompt-magic.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/samba-p1.xml.po b/article/gettext/ru/samba-p1.xml.po new file mode 100644 index 0000000..8385c51 --- /dev/null +++ b/article/gettext/ru/samba-p1.xml.po @@ -0,0 +1,731 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: gentoo-doc\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2010-02-04 10:26+0300\n" +"Last-Translator: lain <st.lain@gmail.com>\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(guide:link):5 +msgid "/doc/en/articles/samba-p1.xml" +msgstr "/doc/en/articles/samba-p1.xml" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):6 +msgid "Introduction to Samba, Part 1" +msgstr "Введение в Samba, Часть 1" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(author:title):8 +msgid "Author" +msgstr "Автор" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "drobbins@gentoo.org" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "Дэниел Роббинс" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(abstract):15 +msgid "" +"Samba is an incredible tool for anyone who uses both Unix and Windows. By " +"implementing the SMB/CIFS protocol for Unix, Samba allows Unix systems to " +"share their resources with standard Windows clients. In this introductory " +"article, Daniel Robbins introduces you to what Samba can do. The focus will " +"be on key concepts. (He'll step you through the setup process in his next " +"article.) By the end of this article, you'll have a good understanding of " +"what Samba does, and how it goes about doing it." +msgstr "" +"Samba - замечательный инструмент для всех, кто использует как Unix так и " +"Windows. Используя протокол SMB/CIFS для Unix, Samba позволяет Unix-системам " +"делать общедоступные, с клиентами Windows, ресурсы. В этой вступительной " +"главе, Дэниел Роббинс познакомит вас с основными фунциями Samba. Упор будет " +"сделан на ключевые понятия(в следующей главе он шаг за шагом рассмотрит " +"процесс установки). К концу этой главы вы будете иметь хорошее представление " +"о том, что делает Samba" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This document +#. is an updated version of the original article, and contains various improvements +#. made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(version):30 +msgid "1.0" +msgstr "1.0" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(date):31 +msgid "2005-10-06" +msgstr "2005-10-06" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):34 +msgid "Key concepts" +msgstr "Ключевые понятия" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):36 +msgid "Show me Samba" +msgstr "Покажите мне Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):39 +msgid "" +"First, I'm going to show you a bunch of screenshots from one of my Windows " +"NT boxes named kompressor. These screenshots demonstrate what a fully-" +"configured Samba system looks like from the Windows side. They'll give you a " +"real-world grasp of what Samba can do." +msgstr "" +"Для начала я собираюсь показать вам несколько снимков экрана одной из моих " +"Windows NT, которая называется kompressor. Эти снимки показывают как " +"выглядит со стороны Windows полностью сконфигурированная система Samba." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):46 +msgid "I currently have three machines set up on my internal LAN:" +msgstr "В настоящий момент в моей локальной сети есть 3 машины" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):51 +msgid "<b>ntbox</b> (a Windows NT Workstation)" +msgstr "<b>ntbox</b> (Windows NT Workstation)" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):52 +msgid "<b>freebox</b> (a FreeBSD server)" +msgstr "<b>freebox</b> (Сервер FreeBSD)" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):53 +msgid "" +"<b>kompressor</b> (the Windows NT Workstation that I use as my primary " +"desktop)" +msgstr "" +"<b>kompressor</b> (Windows NT Workstation которую я использую как основное " +"рабочее место)" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):59 +msgid "" +"In this environment, I use Samba extensively to share files, print, and even " +"run Windows applications directly from freebox (Unix). Here's a screenshot " +"showing the contents of kompressor's Network Neighborhood:" +msgstr "" +"В этом окружении я использую Samba для общего доступа к файлам, печати и " +"даже запуска приложений Windows напрямую из freebox (Unix). Этот снимок " +"показывает содержимое сетевого окружения компьютера kompressor" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(figure:link):66 +msgid "/images/docs/l-samba-1.gif" +msgstr "/images/docs/l-samba-1.gif" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(figure:caption):66 +msgid "kompressor's Network Neighborhood" +msgstr "Сетевое окружение компьютера kompressor" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):68 +#, fuzzy +msgid "" +"As you can see, both ntbox and kompressor are visible, which is no surprise " +"since they are both NT Workstations. What is rather unusual, however, is the " +"fact that I can see freebox as well. Because freebox is running Samba, I can " +"see it under Network Neighborhood on every Windows machinethat is part of my " +"\"GENTOO\" Windows workgroup." +msgstr "" +"Как вы можете видеть, и ntbox и kompressor видны, что не удивительно так как " +"они оба NT Workstations. Однако, невероятно, но факт - так же здесь есть " +"freebox. Поскольку freebox использует Samba я могу видеть ее на каждой " +"машине Windows, являющейся частью моей рабочей группы \"GENTOO\"." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):76 +msgid "" +"Now it's time to take a look at what's \"inside\" freebox. The following " +"window pops up after double-clicking on the freebox icon:" +msgstr "" +"Настало время посмотреть что \"внутри\" freebox, для этого дважды щелкнем по " +"ее значку. Появится следующее окно:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(figure:link):82 +msgid "/images/docs/l-samba-2.gif" +msgstr "/images/docs/l-samba-2.gif" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(figure:caption):82 +msgid "SMB/CIFS shares on freebox" +msgstr "Общие ресурсы SMB/CIFS на freebox" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):84 +#, fuzzy +msgid "" +"In this window you can see a bunch of what are called \"shares\". More " +"specifically, they're called SMB/CIFS shares and contain parts of freebox's " +"file system that are accessible through the network." +msgstr "" +"В этом окне вы видите список того что \"рашрарено\". Или точнее говоря " +"общедоступные ресурсы SMB/CIFS, представляющие из себя часть файловой " +"системы freebox, которая доступна из сети." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(note):90 +msgid "" +"I should mention that SMB stands for Server Message Block, the original name " +"for the protocol used to share files on Windows. CIFS stands for the Common " +"Internet File System, Microsoft's new acronym describing the more recent " +"version of this protocol." +msgstr "" +"Я должен отметить что SMB - это Server Message Block - протокол, который " +"используется в Windows для обеспечения общего доступа к файлам в сети. " +"Стандарт CIFS (Common Internet File System) - это новый акроним Microsoft, " +"описывающий последние версии этого протокола" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):97 +#, fuzzy +msgid "" +"On freebox, Samba has been specifically configured to create only those " +"particular shares that you see above. The drobbins share contains the " +"contents of my home directory. I like to store all my files on freebox " +"(under Unix) to keep things centralized and easy to manage. One of the " +"wonderful things about Samba is that it allows administrators to centralize " +"the storage of user files rather than providing each user with two separate " +"file locations for Windows and Unix." +msgstr "" +"На freebox, Samba специально настроена таким образом, чтобы были " +"общедоступны только те ресурсы, что вы видите выше. В каталоге drobbins " +"можно найти содержимое моего домашнего каталога. Мне нравится хранить все " +"мои файлы на freebox(под управлением Unix), чтобы все было централизованным " +"и легко управляемым. Одной из замечательных возможностей Samba является то, " +"что она позволяет администраторам централизовать хранилище пользовательских " +"файлов, вместо того, чтобы предоставлять каждому пользователю 2 разных места " +"для Windows и Unix." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):110 +msgid "Samba printing" +msgstr "Печать с использованием Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):113 +msgid "" +"In addition to standard shares (which act as virtual directories), you can " +"also see a printer share called nec. Another really great feature of Samba " +"is that you can share printers the same way you can from any Windows " +"machine. Nec is my NEC SuperScript 870 laser printer, which is hooked up to " +"freebox and set up as a standard Unix lpd-based printer. Samba allows this " +"printer to be used by Windows clients just like a standard Windows network " +"printer would." +msgstr "" +"Помимо стандартных общих ресурсов(которые представлены как виртуальные " +"директории), вы так же можете видеть принтер, который называется nec. Еще " +"одна замечательная возможность Samba - то, что вы можете предоставлять " +"общий доступ к принтерам, точно так же как на любой машине под управлением " +"Windows. Nec - это мой лазерный принтер NEC SuperScript 870, подключенный к " +"freebox и установленный как стандартный LPD-принтер Unix. Samba позволяет " +"использовать этот принтер, как любой стандартный сетевой принтер Windows." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):122 +msgid "" +"You may be wondering how the printer driver situation is handled since the " +"printer is running under Unix. Good question. On freebox, nec is set up as a " +"standard, parallel port-based printer running in \"raw\" mode. In other " +"words, any print jobs sent to nec are handed directly to the printer as is, " +"without any filtering or data massaging." +msgstr "" +"Вы должно быть спросите как решен вопрос с драйверами, если принтер работает " +"под Unix. Хороший вопрос. На freebox, nec установлен как стандартный " +"принтер для параллельного порта и работает в режиме \"raw\". Другими словами " +"любое задание отправленое на печать отправляется на принтер напямую как есть " +"без какой либо обработки" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):130 +msgid "" +"On kompressor, nec is configured as an NEC SuperScript 870 network printer. " +"When I print to it, the local NT printer driver generates the appropriate " +"binary data for nec, which is then automatically spooled over the network to " +"Samba running on freebox. Samba then automatically inserts this data " +"untouched into nec's queue, and my printer begins printing the job." +msgstr "" +"На компьютере kompressor, nec настроен как сетевой принтер NEC SuperScript " +"870. Когда я печатаю на нем, локальный драйвер NT генерирует соотвествующие " +"бинарные данные, которые передаются к Samba запущеной на freebox. Samba " +"автоматически добавляет эти данные в очередь печати, при этом не изменяя их " +"и мой принтер начинает печатать." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):138 +#, fuzzy +msgid "" +"I should note that unfortunately my NEC SuperScript 870 is not a Postscript " +"printer; it uses Adobe's proprietary PrintGear technology. While my printer " +"is not fully supported under Unix, it still works perfectly when printing " +"from Windows (this is because all the printer-specific data is generated on " +"the Windows side, using the Windows driver). Ironically, since GhostScript " +"(a freely-available PostScript-compatible interpreter available for Unix) " +"does not know how to produce PrintGear output, I can only print plain ASCII " +"text or 300 dpi PCL4-based documents from the Unix side; but from the " +"Windows side, the Windows NT driver allows me to print at a full 600 dpi. I " +"don't find this cumbersome at the moment because I do most of my printing " +"from Windows. Although in the future it would be nice to have a printer that " +"has Postscript built-in so that I can use the printer's full functionality " +"from Unix as well." +msgstr "" +"Должен, к сожалению, заметить, что мой NEC SuperScript 870 не Postscript-" +"принтер; он использует проприетарную технологию PrintGear от компании " +"Adobe. Пока что мой принтер не полностью поддерживается в Unix, однако из " +"Windows он печатает хорошо(потому что специфические данные печати " +"генерируются в Windows среде, используя драйвер Windows). С тех пор как " +"GhostScript (свободный PostScript-совместимый интерпритатор для Unix)не " +"поддерживает PrintGear, я могу печатать из Unix только простой текст и " +"документы основаные на PCL4, разрешением 300dpi. Но в среде Windows, драйвер " +"Windows NT позволяет мне печатать с полным разрешением в 600dpi. На даннй " +"момент для меня в этом нет ничего плохого так как в основном я печатаю из " +"Windows, но в будущем было бы неплохо иметь принтер поддерживающий " +"Postscript, чтобы и в Unix я мог использовать принтер в полной мере" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):156 +msgid "Samba shares" +msgstr "Общие ресурсы Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):159 +msgid "" +"OK, now it's time to move on to the next screen shot. This one illustrates " +"the contents of the drobbins share on freebox, which is configured to share " +"my Unix home directory. All the files listed in the window actually reside " +"on freebox but are directly accessible from my Windows NT client machines. " +"Being able to integrate Windows and Unix is wonderful stuff!" +msgstr "" +"Хорошо, настало время перейти к следующему снимку. Он показывает нам " +"содержимое общедоступной папки drobbins на freebox, которая настроена таким " +"образом чтобы обеспечивать доступ к моей домашней папке в Unix. Все файлы " +"перечисленные в этом окне расположены на freebox, но напрямую доступны с " +"моей машины под управлением Windows NT. Возможность интеграции Windows и " +"Unix - это прекрасно!" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(figure:link):168 +msgid "/images/docs/l-samba-3.gif" +msgstr "/images/docs/l-samba-3.gif" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(figure:caption):168 +msgid "My home directory on freebox, accessed from kompressor" +msgstr "Мой домашний каталог на freebox, доступный с компьютера kompressor" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):173 +msgid "Understanding Samba" +msgstr "Понимание Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):176 +#, fuzzy +msgid "" +"To show you more about how Samba works internally, I'm going to give you a " +"very simplified explanation of what happened behind the scenes when I poked " +"around in the Network Neighborhood. I should first explain something about " +"my current Windows session. Since I am running Windows NT Workstation, I had " +"to log in to gain access to the machine. For this NT session I logged in to " +"the local machine with the username \"Administrator\" and the password " +"\"mypass\". If I were running Windows 95 or 98, the standard Windows " +"networking drivers would have asked me for a username or password as well. " +"Under Windows 95 and 98, this password isn't really used to determine who " +"can access the local machine; rather, it is cached and used to connect to " +"network resources." +msgstr "" +"Чтобы дать вам более полное представление о внутренней работе Samba, я " +"собираюсь очень упростить объяснение того, что происходит за кулисами когда " +"я захожу в сетевое окружение. Сначала я должен объяснить, кое что о моей " +"текущей сессии Windows. После запуска Windows NT Workstation я должен войти " +"в систему чтобы получить доступ к машине. Я вошел в систему используя имя " +"пользователя \"Administrator\" и пароль \"mypass\". Если бы я использовал " +"Windows 95 или 98 имя пользователя и пароль спросил бы стандартный драйвер " +"сети Windows. В ОС Windows 95 и 98 этот пароль не используется для того, " +"чтобы получить доступ к машине, вместо этого он сохраняется в кэше и " +"используется для соединения с сетевыми ресурсами" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):189 +#, fuzzy +msgid "" +"Of course, Windows NT is extremely secure compared to Windows 95 and 98 and " +"will not allow you to use the machine unless you supply a valid username and " +"password. After kompressor validated my username and password against its " +"local security database, it allowed me to begin using Windows. Kompressor " +"will also use my username and password to try to automatically authenticate " +"itself when I connect to password-protected network resources." +msgstr "" +"Конечно, Windows NT более защищена в сравнении с Windows 95 или 98 и не " +"позволит использовать систему пока вы не укажете правильное имя пользователя " +"и пароль. После того как на компьютере \"\\kompressor\" по локальной базе " +"данных безопасности были проверены мои имя пользователя и пароль я получил " +"доступ к Windows. Эти имя пользователя и пароль так же будут использованы " +"при попытке автоматической аутентификации, во время соединения с сетевыми " +"ресурсами, которые защищены паролем." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):201 +msgid "Browsing the network" +msgstr "Просмотр сети" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):204 +msgid "" +"When I clicked on Network Neighborhood, a window containing a list of all " +"Windows-compatible machines on my network popped up. For this to happen, " +"kompressor contacted freebox behind the scenes to obtain a \"browse list\" " +"of all the Windows-compatible machines on the current subnet. Kompressor " +"contacted freebox because I configured freebox's Samba so that it would " +"become \"local master browser\" on my network (which means that freebox " +"manages the list of network resources that appear in Network Neighborhood)." +msgstr "" +"Когда я кликнул на Сетевое окружение появилось окно со списком компьютеров " +"сети, совместимых с Windows. Что бы это произошло kompressor связался с " +"freebox чтобы получить \"\\список обзора\" всех Windows-совместимых машин " +"текущей подсети. Kompressor связался с freebox потому что я настроил Samba " +"на freebox, таким образом, чтобы она стала \"местным обозревателем\" в моей " +"сети (это означает, что freebox управляет списком сетевых ресурсов которые " +"появляются в окне Сетевое окружение)" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):214 +msgid "" +"The next thing I did was double-click on freebox, which caused a new window " +"to appear and display all of the shares on freebox. For kompressor to " +"receive this information it connected to a special hidden share on freebox " +"(called IPC$) as the guest user, and downloaded the names and types of all " +"the available shares. In the next article, when we configure Samba, we will " +"need to put an option in Samba's configuration file that specifies which " +"Unix account is equivalent to NT's \"guest\" user. If this isn't set up " +"correctly, you will not be able to browse any of the resources on a Samba " +"machine. This is also worth mentioning because it shows that you don't need " +"any special permission to view the SMB/CIFS shares on a Samba server, " +"noteworthy for security purposes." +msgstr "" +"После этого я дважды кликнул на freebox, появилось новое окно в котором " +"отобразились все общие ресурсы на freebox. Чтобы получить эту информацию " +"kompressor соединился со специальным скрытым общим ресурсом на freebox " +"(называемом IPC$)как гость и загрузил оттуда названия и типы доступных общих " +"сетевых ресурсов. В следующей главе, когда мы рассмотрим настройку Samba, " +"нам нужно будет, в файле конфигурации, указать опцию, которая будет " +"указывать какая учетная запись Unix эквивалентна учетной записи \"гость\" в " +"NT. Если ее указать неправильно то вы не сможете просмотреть какие либо " +"ресурсы на машине с Samba. Так же следует заметить, что вам не нужны какие " +"либо особые права доступа чтобы просматривать общие ресурсы SMB/CIFS на " +"сервере Samba, это заслуживает внимания по соображениям безопасности" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):227 +msgid "" +"I was now able to click on the drobbins share to display the contents of my " +"home directory. While this happened automatically and without any fuss, it's " +"important to understand the hidden conversation between freebox and " +"kompressor that ultimately granted me access to the drobbins share. But " +"before we get into that, let's quickly discuss some Samba security issues." +msgstr "" +"Теперь я могу кликнуть на общий ресурс drobbins, и отобразиться содержимое " +"моего домашнего каталога. Хотя это и произошло автоматически, важно понять " +"какие скрытые процессы происходили между freebox и kompressor, которые в " +"конечном счете дали мне доступ к общему ресурсу drobbins. но перед тем как " +"углубиться в эту тему, давайте быстро обсудим некоторые вопросы безопасности " +"Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):238 +msgid "Samba security" +msgstr "Безопасность Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):241 +#, fuzzy +msgid "" +"When I configured Samba I set up the drobbins share to be password " +"protected; even though I'm on my own private LAN, I still like to keep " +"things locked down to a certain extent. At the same time I set up two Samba " +"users: drobbins and administrator. I set their passwords to match those on " +"my NT Workstations for consistency. For the drobbins share, my security " +"policy is as follows: if you are a valid Samba user, and you supply the " +"correct password for that user, you will be allowed access to the drobbins " +"share. So, both administrator and drobbins will be granted access as long as " +"the user also supplies the correct password for their account." +msgstr "" +"Когда я настраивал Samba я установил пароль на общий ресурс drobbins. Я " +"предпочитаю ограничивать доступ, даже в моей частной локальной сети. Так же " +"я создал двух пользователей Samba: drobbins и administrator. Их пароли " +"совпадают с паролями соответствующих пользователей на моих NT Workstation. " +"Для общего ресурса drobbins моя политика безопасности заключается в " +"следующем: если вы являетесь пользователем Samba и указали правильный " +"пароль, соответвующий этому пользователю то вы получаете доступ. Таким " +"образом и administrator, и drobbins смогут получать доступ до тех пор пока " +"могут предоставить правильный пароль. " + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):253 +msgid "" +"Now, back to the conversation between freebox and kompressor. Because I " +"logged in as administrator, double-clicking on the drobbins share caused " +"Windows NT to automatically try to authenticate me to Samba by sending the " +"username \"administrator\" and the password \"mypass\" to freebox. Samba " +"then checked these values against its internal security database (which is " +"separate from the standard Unix <c>passwd</c> database), thereby verifying " +"the username and password. After seeing that the username/password combo " +"checked out, Samba granted me access." +msgstr "" +"Теперь вернемся к обмену данными между freebox и kompressor. Поскольку я " +"зашел в систему как administrator, двойной клик на общей папке drobbins " +"приводит к тому, что Windows NT автоматически отсылает мое имя пользователя " +"\"administrator\" и пароль \"mypass\" на freebox, для проверки подлинности в " +"Samba. Затем Samba проверяет эти сведения по своей внутренней базе данных " +"безопасности(она отдельна от стандартной Unix базы данных <c>passwd</c>), " +"таким образом происходит проверка имени пользователя и пароля. В случае " +"успешной проверки Samba предоставляет мне доступ" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):264 +#, fuzzy +msgid "" +"You may be wondering why Samba has its own unique password database. Why " +"doesn't it just use the standard Unix password to authenticate the " +"administrator user? While it used to be possible to do this when Windows " +"transmitted passwords in plain-text, all modern versions of Windows now " +"transmit SMB/CIFS passwords in an encrypted form that is not compatible with " +"the standard Unix password hash. In other words, there is no way for Samba " +"to use the standard Unix <c>passwd</c> hash to verify that a Windows " +"encrypted password is correct. Fortunately, Samba provides numerous ways to " +"synchronize these two databases so that a system administrator's life " +"doesn't get too confusing." +msgstr "" +"Вы возможно спросите почему Samba имеет собственную базу данных паролей. " +"Почему бы не использовать стандартный пароль Unix для аутентификации " +"пользователя administrator? Раньше это было возможно так как пароли Windows " +"передавались открытым текстом, однако все современные версии Windows " +"передают пароли SMB/CIFS в зашифрованном виде который несовместим со " +"стандартным хешем паролей Unix. Другими словами нет способа использовать " +"стандартный Unix хэш <c>passwd</c> для проверки зашифрованого пароля " +"Windows. К счастью для облегчения жизни администратора существуют способы " +"синхронизации этих баз." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):279 +msgid "Samba from the Unix side" +msgstr "Samba со стороны Unix" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):282 +msgid "" +"Now that we've seen Samba from the Windows side, it's time to take a look at " +"Samba from the Unix side. First some general information. The main Web site " +"for Samba is <uri>http://fi.samba.org</uri>, and the current production " +"version of Samba is 2.0.7, as of April 25, 2000, which we will be using in " +"this series. Since some of you may be installing Samba from RPM, others may " +"be trying to get Samba to run under FreeBSD or Solaris (rather than Linux), " +"and a good number of you may be compiling Samba from scratch, there is " +"likely to be some variability in file locations. (Samba's default file " +"locations are configurable at compile-time.) On some systems certain files " +"will be in <path>/usr/local/</path>, while on other systems they may end up " +"somewhere else. I will be referring to configuration files by their filename " +"(rather than their full path) to avoid any inconsistencies." +msgstr "" +"Теперь когда мы видели Samba со стороны Windows настало время взглянуть на " +"нее со стороны Unix. Для начала общая информация. Официальный сайт Samba " +"<uri>http://fi.samba.org</uri>, а текущая версия 2.0.7 по состоянию на 25 " +"апреля 2000г. которую мы и будем здесь использовать. Некоторые из вас могут " +"установить Samba из RPM, другие могут попробовать запустить Samba на FreeBSD " +"или Solaris(вместо Linux), и значительная часть вас может скомпилировать " +"Samba из исходных текстов, тогда возможно будут отличаться нескоторые места " +"расположения файлов (места расположения файлов по умолчанию могут " +"настраиваться во время компиляции). На некоторых системах определенные файлы " +"будут в <path>/usr/local/</path>, на других системах они могут располагаться " +"где нибудь еще. Чтобы избежать несоответствий, я буду ссылаться на файлы " +"конфигурации по их именам(вместо полного пути)" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):297 +msgid "" +"If you compile and install Samba from the original sources, Samba's " +"configuration file can be found at <path>/usr/local/samba/etc/smb.conf</" +"path>. However, if you install the software from binary RPM or another Linux " +"packaging format, you'll likely find <path>smb.conf</path> in <path>/etc</" +"path>. This all gets confusing very fast. In order to make things easier " +"I'll review the locations of files when Samba is compiled from sources and " +"everything is installed into its default location in <path>/usr/local/samba</" +"path>. Please note that the purpose of this section is simply to get you " +"familiar with the Unix-side configuration of Samba and is not intended to " +"step you through the compilation process, which will be covered in the next " +"article. Right now we're just getting you warmed up! Here are the default " +"locations of files after a clean Samba compile and install:" +msgstr "" +"Если вы компилируете и устанавливаете Samba из исходных текстов, файлы " +"конфигурации должны быть в <path>/usr/local/samba/etc/smb.conf</path>. " +"Однако если вы устанавливаете програмное обеспечение из бинарных пакетов RPM " +"или других форматов, скорее всего вы найдете <path>smb.conf</path> в <path>/" +"etc</path> Это может очень быстро сбить с толку. Чтобы было проще я буду " +"указывать расположение файлов в случае, когда Samba скомпилирована из " +"исходных текстов и все утановлено по умолчанию в <path>/usr/local/samba</" +"path>. Отмечу, что назначение этого раздела просто показать настройку Samba " +"со стороны Unix, и мы не будем вдаваться в процесс компиляции, он будет " +"описан в следующей главе. А пока что мы просто разогреваемся! Вот " +"расположение файлов после компиляции и установки Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):312 +msgid "" +"<path>/usr/local/samba/bin</path> contains all the Samba binary executables. " +"In 2.0.7, the main Samba executables are called <c>smbd</c> and <c>nmbd</c>. " +"<c>smbd</c> is designed to provide SMB/CIFS file-sharing services, while " +"<c>nmbd</c> performs WINS-related functions by facilitating IP address " +"lookups for NetBIOS names. There are also a host of other utilities, " +"including <c>smbclient</c>, an ftp-like tool that can be used to connect and " +"interact with SMB/CIFS shares, and <c>testparm</c>, a handy utility that " +"checks to make sure that Samba's main configuration file has correct syntax." +msgstr "" +"<path>/usr/local/samba/bin</path> содержит все исполняемые бинарные файлы " +"Samba. В версии 2.0.7, главные исполняемые файлы назваются <c>smbd</c> и " +"<c>nmbd</c>. <c>smbd</c> обеспечивает общий доступ к файлам по протоколу SMB/" +"CIFS, а <c>nmbd</c> выполняет функции, связанные с WINS для облегчения " +"поиска IP-адресов для имен NetBIOS. Есть так же ряд других утилит, " +"включающих <c>smbclient</c>, ftp-подбный инструмент позволяющий соединиться " +"с SMB/CIFS ресурсами и <c>testparm</c>, утилита проверяющая правильность " +"синтаксиса в главном файле конфигурации Samba. " + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):323 +msgid "" +"<path>/usr/local/samba/etc</path> contains <path>smb.conf</path>, the main " +"Samba configuration file. <path>smb.conf</path> is a very important file, " +"containing almost all of Samba's configuration options. In this file you'll " +"find settings to control global Samba functionality as well as configuration " +"options to enable the sharing of specific directory trees and printers. As " +"you gain experience with Samba, you'll supplement your <path>smb.conf</path> " +"file with additional configuration options that fine-tune Samba to your " +"particular site." +msgstr "" +"<path>/usr/local/samba/etc</path> содержит <path>smb.conf</path> - главный " +"конфигурационный файл Samba. Это очень важный файл, содержащий в себе все " +"настройки. В этом файле вы найдете как основные настройки Samba так и опции " +"позволяющие открыть общий доступ к определнному дереву каталогов и " +"принтерам. Когда вы наберетесь опыта с Samba, вы добавите в <path>smb.conf</" +"path> дополнительные параметры которые позволят вам тонко настроить Samba " +"для вашего конкретного случая." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):333 +msgid "" +"One of the major complaints about Samba is that the smb.conf file has a " +"relatively high learning curve. While this is true, remember that Samba is " +"not just a simple network file sharing program. It has the responsibility of " +"sensibly integrating two significantly different systems: Windows and Unix. " +"Sometimes the configuration process will seem tricky, but do not fear. When " +"you have everything working perfectly, it will all be worth it!" +msgstr "" +"Одна из основных жалоб на Samba состоит в том что файл smb.conf довольно " +"сложно освоить. Хотя это и верно, но помните, что Samba это не просто " +"программа для обеспечения общего доступа к файлам в сети, она несет огромную " +"отвественность за обеспечения интеграции таких двух разных систем как " +"Windows и Unix. Иногда процесс настройки кажется сложным, но не бойтесь. " +"Когда все хорошо работает, оно стоит того!" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):342 +msgid "" +"<path>/usr/local/samba/private</path> contains <path>smbpasswd</path>, " +"Samba's encrypted password file." +msgstr "" +"<path>/usr/local/samba/private</path> содержит <path>smbpasswd</path>, файл " +"с зашифроваными паролями Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(note):347 +msgid "" +"In <path>smb.conf</path>, Samba can be configured so that it will only " +"listen for connections on particular network interfaces or accept " +"connections only from particular subnets or IP addresses. These methods can " +"be used to enhance security even further." +msgstr "" +"В файле <path>smb.conf</path>, Samba может быть настроена на соединения " +"только по определенным сетевым интерфейсам, или принимать соединения только " +"с определнного IP-адреса или подсети. Эти методы служат для улучшения " +"безопасности, даже больше." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):354 +msgid "" +"I mentioned earlier that Samba has its own password store that is unique " +"from the standard Unix <c>passwd</c> database. In the <path>smbpasswd</path> " +"file Samba stores all users and workstations (and their associated " +"passwords) that are allowed to access Samba's shares. Individual shares can " +"be further locked down to particular users and groups. To modify the " +"<path>smbpasswd</path> file, the identically-named binary executable " +"<c>smbpasswd</c> is used." +msgstr "" +"Ранее я упомянал что Samba хранит свои пароли отдельно от стандартной " +"<c>passwd</c> базы данных Unix Список всех пользователей и рабочих станций, " +"допущеных к ресурсам Samba(и соответвующие им пароли)хранится в файле " +"<path>smbpasswd</path>. Индивидуальные ресурсы могут быть заблокированы для " +"отдельных пользователей и групп. Чтобы внести изменения в <path>smbpasswd</" +"path> используйте программу <c>smbpasswd</c>." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):363 +msgid "" +"<path>/usr/local/samba/var</path> contains Samba's two log files, <path>log." +"smb</path> and <path>log.nmb</path>. As you may have guessed, <path>log.smb</" +"path> is the log file for <c>smbd</c> while <path>log.nmb</path> is <c>nmbd</" +"c>'s log file." +msgstr "" +"<path>/usr/local/samba/var</path> содержит 2 журнала Samba: <path>log.smb</" +"path> и <path>log.nmb</path>. Как вы можете догадаться, <path>log.smb</path> " +"- журнал для<c>smbd</c>, а <path>log.nmb</path> для <c>nmbd</c>." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):370 +msgid "" +"<path>/usr/local/samba/swat</path> contains files used for SWAT. SWAT is the " +"Samba Web Administration Tool, and is a neat little web application that " +"allows administrators to remotely manage their Samba network. We won't be " +"covering SWAT in this series, but you can find more information on SWAT in " +"SWAT's main page (see <uri link=\"#resources\">Resources</uri>)." +msgstr "" +"<path>/usr/local/samba/swat</path> содержит файлы используемые для SWAT. " +"SWAT - это Samba Web Administration Tool - небольшое web-приложение " +"позволяющее администраторам удаленно управлять их сетью. Мы не будем " +"рассматривать SWAT в этих статьях, но вы можете найти дополнительную " +"информацию на сайте SWAT (см. <uri link=\"#resources\"> Ресурсы </ URI>" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):381 +msgid "What's next" +msgstr "Что дальше" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):384 +msgid "" +"We've covered a lot of Samba's key functionality and key concepts. We've " +"also seen an overview of Samba's Unix-side file structure. In my next " +"article I'll walk you through the process of setting up Samba on your own " +"system. Unlike this article, which focused more on concepts, the <uri link=" +"\"/doc/en/articles/samba-p2.xml\">next article</uri> will have more of a " +"HOWTO style. Now that we've covered key concepts, it's time to pick up the " +"pace. See you then!" +msgstr "" +"Мы рассмотрели основные функции Samba и основные понятия. Так же мы " +"ознакомились со структурой файлов Samba на стороне Unix. В следующей главе я " +"расскажу вам как установить Samba в вашу собственную систему. В отличие от " +"этой статьи где рассматривались основные понятия<uri link=\"/doc/en/articles/" +"samba-p2.xml\">следущая глава</uri> будет более в стиле HOWTO. Теперь когда " +"мы рассмотрели основы пришло время ускорить шаг. Увидимся!" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):398 +msgid "Resources" +msgstr "Ресурсы" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):402 +msgid "The main <uri link=\"http://fi.samba.org\">Samba</uri> web site" +msgstr "Официальный сайт <uri link=\"http://fi.samba.org\">Samba</uri>" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):403 +msgid "<uri link=\"http://linuxguy.net/samba.htm\">Samba</uri> by Ed Weinberg" +msgstr "<uri link=\"http://linuxguy.net/samba.htm\">Samba</uri> by Ed Weinberg" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):404 +msgid "" +"<e><uri link=\"http://www.amazon.com/exec/obidos/ASIN/0672318628/\">Samba " +"Unleashed</uri></e>, by Steve Litt, with contributions from Daniel Robbins" +msgstr "" +"<e><uri link=\"http://www.amazon.com/exec/obidos/ASIN/0672318628/\">Samba " +"Unleashed</uri></e>, by Steve Litt, with contributions from Daniel Robbins" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):408 +msgid "" +"<e><uri link=\"http://www.oreilly.com/catalog/samba/\">Using Samba</uri></e> " +"(O'Reilly Publishing; 1999)" +msgstr "" +"<e><uri link=\"http://www.oreilly.com/catalog/samba/\">Using Samba</uri></e> " +"(O'Reilly Publishing; 1999)" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):412 +msgid "" +"<uri link=\"http://jazz.external.hp.com/src/samba/\">Samba/iX</uri>: Samba " +"support on MPE/iX 6.0" +msgstr "" +"<uri link=\"http://jazz.external.hp.com/src/samba/\">Samba/iX</uri>: " +"Поддержка Samba на MPE/iX 6.0" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):416 +msgid "" +"The <uri link=\"http://fi.samba.org/docs/swat_ssl.html\">SWAT</uri> main page" +msgstr "" +"Главная страница <uri link=\"http://fi.samba.org/docs/swat_ssl.html\">SWAT</" +"uri>" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/samba-p2.xml.po b/article/gettext/ru/samba-p2.xml.po new file mode 100644 index 0000000..57dcbcf --- /dev/null +++ b/article/gettext/ru/samba-p2.xml.po @@ -0,0 +1,1164 @@ +msgid "" +msgstr "" +"Project-Id-Version: gentoo-doc\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2010-02-04 10:06+0300\n" +"Last-Translator: lain <st.lain@gmail.com>\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(guide:link):5 +msgid "/doc/en/articles/samba-p2.xml" +msgstr "/doc/en/articles/samba-p2.xml" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):6 +msgid "Introduction to Samba, Part 2" +msgstr "Введение в Samba, Часть 2" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(author:title):8 +msgid "Author" +msgstr "Автор" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "drobbins@gentoo.org" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "Дэниел Роббинс" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(abstract):15 +msgid "" +"In his previous article, Daniel introduced you to what Samba can do. Now " +"it's time to get it running on your system. In this article, he'll walk you " +"through the process of compiling, installing, and initially configuring " +"Samba (version 2.0.7) so that it works in your environment." +msgstr "" +"В предыдущей главе, Дэниел познакомил вас с возможностями Samba. Пришло " +"время установить ее на ваш компьютер. В этой главе мы рассмотрим процесс " +"компиляции, установки, и предварительной настройки Samba, для работы в вашем " +"окружении." + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This document +#. is an updated version of the original article, and contains various improvements +#. made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(version):27 +msgid "1.0" +msgstr "1.0" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(date):28 +msgid "2005-10-06" +msgstr "2005-10-06" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):31 +msgid "Compiling, installing, and configuring Samba for your environment" +msgstr "Компиляция, установка и настройка Samba для вашего окружения" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):33 +msgid "Downloading Samba" +msgstr "Скачивание Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):36 +msgid "" +"OK, it's time to download Samba 2.0.7 or greater from the Samba.org Web site " +"(see <uri link=\"#resources\">Resources</uri> later in this article)." +msgstr "" +"Настало время загрузить Samba 2.0.7 или более позднюю версию с официального " +"сайта (см. <uri link=\"#ресурсы\">Resources</uri> в конце этой главы)." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(note):41 +msgid "" +"While I'll be compiling Samba from scratch, you may choose to install Samba " +"from a binary package (such as RPM that came with your Linux distribution). " +"This is perfectly OK. But, as I mentioned in my last article, if you do " +"this, your file locations may be slightly different than what I refer to " +"here." +msgstr "" +"Вместо компиляции Samba из исходных текстов, вы можете установить ее из " +"бинарных пакетов(как например RPM, входящий в состав вашего дистрибутива " +"Linux). Это совершенно нормально, но как я заметил в своей прошлой главе, " +"месторасположения ваших файлов может незначительно различаться от тех, что я " +"приведу здесь." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):48 +msgid "" +"After you've downloaded Samba 2.0.7 or greater, it's time to decompress it " +"to a directory location of your choice. From the command prompt, type:" +msgstr "" +"После скачивания Samba 2.0.7 или более поздней версии, разархивируйте ее в " +"любую папку по вашему усмотрению. Введите в командной строке следующее:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):53 +msgid "Unpacking the source files" +msgstr "Разпаковка исходных текстов" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):53 +#, no-wrap +msgid "" +"\n" +"$ <i>tar -xzvf samba-2.0.7.tar.gz</i>\n" +msgstr "" +"\n" +"$ <i>tar -xzvf samba-2.0.7.tar.gz</i>\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):57 +msgid "" +"A <path>samba-2.0.7</path> directory will be created. <c>cd</c> into it, and " +"we'll take a look around. First, notice the docs directory. Inside it you'll " +"see another directory called <path>textdocs</path>. <path>texdocs</path> " +"contains a whole bunch of Samba documentation. One of the most important " +"files in the <path>textdocs</path> directory is called DIAGNOSIS.txt. It " +"walks you through a step-by-step process of diagnosing problems you may have " +"with proper Samba operation. We'll be covering some, but not all, of the " +"diagnosis procedures mentioned in this file." +msgstr "" +"Будет создан каталог<path>samba-2.0.7</path>. Перейдите в него, используя " +"команду <c>cd</c>. Во первых обратите внимание на саталог docs. Внутри него " +"вы найдете другой каталог <path>textdocs</path>. Он содержит много " +"документации по Samba. Один из наиболее важных файлов называется DIAGNOSIS." +"txt. Шаг за шагом, он поможет вам выявить проблемы, с которыми вы можете " +"столкнуться в процессе использования Samba. Некоторые мы рассмотрим здесь, " +"все остальные вы сможете найти в этом файле." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):71 +msgid "Compiling and installing Samba" +msgstr "Компиляция и установка Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):74 +msgid "" +"You'll also notice the <path>sources</path> directory in the main " +"<path>samba-2.0.7</path> directory. Inside <path>sources</path> you'll find " +"a well designed configure script designed to set up all the makefiles " +"properly. As with any other configure script, to get a list of the " +"configuration options, type:" +msgstr "" +"Кроме того в каталоге <path>samba-2.0.7</path> есть каталог <path>sources</" +"path>. Там есть специально разработанный сценарий configure для правильной " +"установки всех make-файлов. Как и любой другой сценарий configure у него " +"есть ряд настраиваемых параметров, что бы получить их список введите:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):82 +msgid "Investigating options" +msgstr "Изучение параметров" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):82 +#, no-wrap +msgid "" +"\n" +"$ <i>./configure --help</i>\n" +msgstr "" +"\n" +"$ <i>./configure --help</i>\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):86 +msgid "" +"You will probably want to pipe the output to <c>more</c> so that you can " +"view all the options:" +msgstr "" +"Возможно вы захотите перенаправить вывод через программу <c>more</c>, чтобы " +"увидеть все параметры:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):91 +msgid "Even more options" +msgstr "Еще больше параметров" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):91 +#, no-wrap +msgid "" +"\n" +"$ <i>./configure --help | more</i>\n" +msgstr "" +"\n" +"$ <i>./configure --help | more</i>\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):95 +msgid "" +"Note the directory and file name options. Notice where everything gets " +"installed, and that the default install path is <path>/usr/local/samba</" +"path>. You will probably want to change this to <path>/usr/local</path> by " +"passing the <c>--prefix=/usr/local</c> option when you configure Samba. For " +"this example, I'm going to use the following path settings:" +msgstr "" +"Обратите внимание на параметры каталог и имя файла. Именно туда все будет " +"установлено, по умолчанию это <path>/usr/local/samba</path>. Возможно вы " +"захотите изменить этот параметр на <path>/usr/local</path>, для этого " +"добавьте <c>--prefix=/usr/local</c> когда будете выполнять сценарий " +"configure для Samba. Я собираюсь использовать следующие параметры:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):103 +msgid "Configuring the directory options" +msgstr "Настройка параметров каталога" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):103 +#, no-wrap +msgid "" +"\n" +"$ <i>./configure --prefix=/usr/local --localstatedir=/var/log --sysconfdir=/etc</i>\n" +msgstr "" +"\n" +"$ <i>./configure --prefix=/usr/local --localstatedir=/var/log --sysconfdir=/etc</i>\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):107 +msgid "" +"The above configuration options will cause Samba's default tree to be in " +"<path>/usr/local</path>, with the exception of the configuration files. " +"Samba will expect to find these in <path>/etc</path> and log files, which " +"will end up in <path>/var/log</path>. If you omit those configure options, " +"you'll find everything in the <path>/usr/local/samba</path> directory tree " +"(<path>/usr/local/samba/var</path>, <path>/usr/local/samba/etc</path>, etc.)." +msgstr "" +"Настройки, представленые выше, приведут к тому, что Samba будет установлена " +"в <path>/usr/local</path>, исключение составят только файлы конфигурации, " +"которые можно будет найти в <path>/etc</path>, и журнал событий который " +"будет в <path>/var/log</path>. Если пропустить эти настройки все будет " +"установлено в <path>/usr/local/samba</path> (<path>/usr/local/samba/var</" +"path>, <path>/usr/local/samba/etc</path>, и т.п.)" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):116 +msgid "" +"It's now time to start the compilation. After running <c>configure</c>, type:" +msgstr "Теперь начнем компиляцию. После выполнения <c>configure</c>, введите:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):120 +msgid "Compiling Samba" +msgstr "Компиляция Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):120 +#, no-wrap +msgid "" +"\n" +"$ <i>make</i>\n" +msgstr "" +"\n" +"$ <i>make</i>\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):124 +msgid "" +"After compilation completes, type the following as root to install the " +"software:" +msgstr "" +"После окончания компиляции, выполните следующую команду с правами root, " +"чтобы установить програму." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):129 +msgid "Installing Samba" +msgstr "Установка Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):129 +#, no-wrap +msgid "" +"\n" +"# <i>make install</i>\n" +msgstr "" +"\n" +"# <i>make install</i>\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):136 +msgid "Configuring the server" +msgstr "Настройка сервера" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):139 +msgid "" +"For the most part, configuring Samba begins and ends with the <path>smb." +"conf</path> file. This is Samba's main configuration file. It has many " +"different configuration options. To avoid confusion, we're going to start " +"only with those options essential to the proper operation of Samba. First, " +"you'll need to find out where <path>smb.conf</path> should be. If you used " +"the configuration options I specified above, you should place <path>smb." +"conf</path> in <path>/etc</path>. If you used the default paths, Samba will " +"look for it in <path>/usr/local/samba/etc</path>. To get started, <c>cd</c> " +"to the appropriate directory, fire up your favorite text editor, and type in " +"the following lines. I'll intersperse commentary along the way to provide " +"you with a good understanding of what each option does. Add these lines to " +"your <path>smb.conf</path> file:" +msgstr "" +"Большая часть настройки Samba происходит в файле <path>smb.conf</path>. Это " +"главный файл конфигурации Samba, в котором есть множестно параметров " +"настройки. Чтобы избежать путаницы, мы начнем с основных, необходимых для " +"нормальной работы Samba, настроек. Во-первых вам надо выяснить где должен " +"находится <path>smb.conf</path>. Если вы использовали параметры " +"конфигурации, приведенные выше, то вам следует положить <path>smb.conf</" +"path> в <path>/etc</path>. Если вы использовали пути по умолчанию Samba " +"будет искать его в <path>/usr/local/samba/etc</path>. Чтобы начать перейдите " +"(<c>cd</c>) в соответствующий каталог, запустите ваш любимый текстовый " +"редактор и напишите строчки приведенные ниже. На протяжении всего нашего " +"пути я буду добавлять комментарии, чтобы вы хорошо понимали какой параметр " +"для чего нужен, Добавьте эти строчки в ваш <path>smb.conf</path>:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):154 +msgid "smb.conf" +msgstr "smb.conf" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):154 +#, no-wrap +msgid "" +"\n" +"[global] \n" +"workgroup = YOURWORKGROUP \n" +"security = user \n" +"encrypt passwords = yes \n" +"guest account = guest\n" +msgstr "" +"\n" +"[global] \n" +"workgroup = YOURWORKGROUP \n" +"security = user \n" +"encrypt passwords = yes \n" +"guest account = guest\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):162 +msgid "" +"The first line tells Samba that we are placing options in the \"global\" " +"section. There are many options that are intended to be defined only in this " +"section. These options control the global behavior of Samba." +msgstr "" +"Первая строчка говорит Samba, что параметры которые мы добавляем находятся в " +"общем разделе \"global\". Множество параметров можно разместить только в " +"этом разделе - они контролируют общее поведение Samba." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):168 +msgid "" +"The second line tells Samba the name of the Windows workgroup that Samba " +"will create. Replace YOURWORKGROUP with an appropriate name for your " +"workgroup." +msgstr "" +"Следующая строчка говорит Samba имя рабочей группы Windows, которую она " +"создаст. Замените YOURWORKGROUP на соответсвующее имя вашей рабочей группы." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):173 +msgid "" +"On the third line, we tell Samba to run in user-level security mode. This " +"option will cause Samba to tell all connecting Windows clients that they " +"need to provide a valid username/password combination to gain access to any " +"network resource. This is definitely a good thing. User-level security is " +"Samba's most often used security level because it's an excellent match for " +"the majority of file sharing situations. However, there are other security " +"levels available. One handy mode tells Samba to authenticate all users " +"against the security database of an existing Windows NT or 2000 Server. We " +"won't be covering that particular mode in this article. If you want more " +"information about it, take a look at the \"security\" option in the " +"<path>smb.conf</path> main page." +msgstr "" +"На третьей строчке мы указываем, что Samba должна работать на " +"пользовательском уровне режима безопасности. Это значит, что каждый " +"подключившийся Windows-клиент должен предоставить правильную комбинацию имя " +"пользователя/пароль чтобы получить доступ к сетевым ресурсам. Это " +"определенно хорошая идея. Пользовательский уровень в Samba - это наиболее " +"часто используемый уровень безопасности, потому что он подходит в " +"большинстве ситуаций связаных с общим доступом к файлам в сети. Однако есть " +"так же и другие уровни безопасности. Один из таких режимов предлагает Samba " +"проверить подлинность пользователей еще раз используя существующую базу " +"данных Windows NT или 2000 Server. Мы не будем рассматривать этот режим в " +"этом руководстве. Если вы хотите узнать о нем подробнее, взгляните в раздел " +"\"security\" на соответвующей <path>smb.conf</path> странице справки MAN." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):186 +#, fuzzy +msgid "" +"Now, on to the fourth line. Here we tell Samba to exchange passwords with " +"Samba in encrypted mode. You will always want to run Samba in encrypted " +"mode, unless all your client machines are extremely ancient (like Windows " +"for Workgroups-era machines). Enabling encrypted passwords does cause Samba " +"to need its own password file, in addition to the standard Unix password " +"database. If you are thinking that it may be nice to turn encrypted " +"passwords off, so that you can avoid having to maintain two password files, " +"don't do it! Turning encrypted passwords off will cause sharing problems " +"with even moderately old versions of Windows NT 4.0 in addition to Windows " +"2000. If you really want to avoid maintaining two separate databases, Samba " +"provides several ways to synchronize both databases, which is a better " +"approach." +msgstr "" +"Теперь четвертая строка. Здесь мы указываем, что Samba будет обмениваться " +"паролями в зашифрованом виде. Вы должно быть всегда захотите использовать " +"зашифрованый режим, кроме разве что случая когда ваши клиентские машины " +"очень старые(например те на которых используется Windows для рабочих групп). " +"Для включения шифрования паролей, Samba понадобится свой собственный файл " +"паролей в дополнение к стандартной базе данных паролей Unix. Если вы " +"думаете, что будет лучше выключить шифрование, чтобы не было двух файлов " +"паролей - не делайте этого! Выключения шифрования паролей может стать " +"причиной проблем с общим доступом в Windows 2000 а так же с умеренно старыми " +"версиями Windows NT 4.0. Если вы действительно хотите избежать поддержки " +"двух различных баз данных, то Samba предоставляет ряд средств для " +"синхронизации этих баз, и это будет лучшим вариантом." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):200 +#, fuzzy +msgid "" +"The next line specifies a valid Unix user account that will be used for " +"guest access. While people often use \"guest account=nobody\", it's " +"recommended that you add a literal \"guest\" user to your system if one " +"doesn't exist already. The new \"guest\" account does not need a password " +"set and does not need to be able to log in interactively. (It's fine if you " +"do choose to configure guest with a password and a valid default shell.)" +msgstr "" +"В следующей строчке указывается действующая учетная запись пользователя " +"Unix, которая будет использована для гостевого доступа. Хотя люди часто " +"используют \"guest account=nobody\", рекомендуется добавить пользователя " +"\"guest\" в вашу систему, если он еще не существует. Новая учетная запись " +"\"guest\" не требует установки пароля и не обязательно должна быть доступной " +"для входа в интерактивном режиме (Это хорошо если вы решили настроиить гостя " +"с паролем и оболочкой по умолчанию)" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):210 +msgid "" +"Now we're ready to add WINS support options to <path>smb.conf</path>. You'll " +"want to add one of the following two lines to the global section:" +msgstr "" +"Теперь мы готовы, добавить опции поддержки WINS в <path>smb.conf</path>. Вы, " +"вероятно, захотите добавить в общий раздел, одну из двух строчек приведенных " +"ниже:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):215 +msgid "WINS support" +msgstr "Поддержка WINS" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):215 +#, no-wrap +msgid "" +"\n" +"wins support = yes\n" +msgstr "" +"\n" +"wins support = yes\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):219 +msgid "OR" +msgstr "или" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):223 +msgid "WINS server IP address" +msgstr "IP-адрес сервера WINS" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):223 +#, no-wrap +msgid "" +"\n" +"wins server = IP address of WINS server\n" +msgstr "" +"\n" +"wins server = IP-адрес сервера WINS\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):227 +msgid "" +"If you already have a WINS server on your current subnet (a Windows NT " +"Server running WINS, for example), you'll want to use the second option and " +"specify the name of the WINS server on the right side of the equals sign. " +"Samba's internal WINS services will then be disabled, and it will use the " +"WINS server you specify." +msgstr "" +"Если в вашей подсети уже есть сервер WINS (например Windows NT Server, на " +"котором запущена WINS), вы захотите использовать второй вариант и указать " +"имя сервера WINS с правой стороны от знака равентсва. Тогда внутренние " +"службы WINS в Samba будут выключены, а вместо них использован указанный вами " +"сервер." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):235 +msgid "" +"If you don't have a WINS server running on your subnet, or you're setting " +"Samba up at home and you don't know exactly what a WINS server is, you'll " +"want to use the first option. This will tell Samba to become a WINS server " +"for your LAN." +msgstr "" +"Если в вашей подсети нет WINS сервера или если вы устанавливаете Samba дома " +"и не знаете что такое WINS - используйте первый вариант. Тогда Samba станет " +"сервером WINS для вашей локальной сети." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):241 +msgid "" +"You may be wondering what WINS does. Basically, you can think of WINS as a " +"local dynamic DNS database. When Samba is running as a WINS server, every " +"Windows-compatible machine on the same subnet will register its IP address " +"and NetBIOS name (a.k.a. \"computer name\") with Samba. This enables Windows " +"machines to use Samba's WINS database to request an IP address for a " +"particular NetBIOS name. WINS is a key component of network browsing, which " +"is what you are doing when you poke around inside the Network Neighborhood " +"on a Windows machine." +msgstr "" +"Возможно вы захотите узнать для чего нужен WINS. В основном можете считать " +"WINS локальной динамической базой данных DNS. Когда Samba выполняет роль " +"WINS сервера, каждая совместимая с Windows машина регистрирует в ней свой IP-" +"адрес и имя NetBIOS (так же извествное как имя компьютера). Это позволяет " +"машине под управлением Windows использовать базу данных WINS Samba, чтобы " +"запросить IP-адрес для определенного имени NetBIOS. WINS - это ключевой " +"компонент обзора сети, который используется, когда вы просматривате " +"содержимое Сетевого окружения на компьютере под управлением Windows." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):251 +msgid "Now we're ready to add several more options to the global section:" +msgstr "Теперь мы готовы добавить еще несколько опций в общий раздел:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):255 +msgid "Network browsing setup" +msgstr "Настройка обзора сети" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):255 +#, no-wrap +msgid "" +"\n" +"local master = yes \n" +"os level = 99 \n" +"domain master = yes \n" +"preferred master = yes\n" +msgstr "" +"\n" +"local master = yes \n" +"os level = 99 \n" +"domain master = yes \n" +"preferred master = yes\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):262 +#, fuzzy +msgid "" +"Now for an explanation. All these options are related to network browsing. " +"I've already mentioned that WINS is a key component of network browsing, but " +"there's another element required for browsing to work properly. A local " +"master browser must exist. Sound strange? Some further explanation is " +"required." +msgstr "" +"Теперь объяснения. Все эти опции связаны с обзором сети. Я уже упомянал, что " +"WINS - это главная состовляющая обзора сети, но тут есть еще один элемент " +"необходимый для правильной работы обзора. Должен быть локальный " +"обозреватель. Звучит странно? Требуются дополнительные разъяснения." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):269 +#, fuzzy +msgid "" +"For browsing to work properly, there must be some central location that " +"keeps track of what machines and workgroups exist on the local subnet. This " +"particular list is called the browse list. The browse list is used to " +"construct the list of workgroups, domains, and machines you see when you " +"first click on the Network Neighborhood. Any modern Windows machine can " +"become the local master browser. Ideally, we'd like Samba to be the local " +"master browser on the network." +msgstr "" +"Для правильной работы обзора, должно быть некое централизованное место, в " +"котором хранятся сведения о машинах и рабочих группах существующих в " +"подсети. Этот список называется список обзора. Он используется для " +"построения списка рабочих групп, доменов и машин которые вы видите когда " +"заходите в Сетевое окружение. Любая современная машина под управлением " +"Windows может стать локальным обозревателем. В идеале мы бы хотели чтоб " +"локальным обозревателем в сети была Samba." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):278 +#, fuzzy +msgid "" +"How is this accomplished? Basically, several beefy Windows-compatible " +"machines on your subnet will regularly duke it out by flinging packets back " +"and forth across your LAN in an attempt to determine who will become the " +"local master browser. This process is called a \"browser election.\"" +msgstr "" +"Каким образом это достигается? В основном несколько совместимых с Windows " +"машин в вашей подсети регулярно рассылают пакеты по всей вашей локальной " +"сети, пытаясь определить кто станет локальным обзревателем. Этот процесс " +"называется \"выборы обозревателя\"" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(note):285 +#, fuzzy +msgid "" +"Be a good sport. Please don't use Samba's ability to beat Windows in all " +"browser elections as an excuse to tease Microsoft administrators in your " +"organization. Remember, it's important to be a good winner." +msgstr "" +"Будтье честными игроками. Пожалуйста не используйте возможности Samba чтобы " +"побить Windows в выборах обозревателя, чтобы был предог подразнить " +"администраторов Microsoft в вашей организации. Помните очень важно быть " +"хорошим победителем." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):291 +msgid "" +"In the end the \"winner\" of this broadcast packet war gets to become the " +"local master browser. We can cause Samba to win the battle by using the " +"<c>os level = 99</c> option, which causes it to beat every other machine on " +"the LAN. This happens because every version of Windows (from Windows 95 to " +"NT to 2000) has a hard-coded OS level that was intended to cause the most " +"advanced version of Windows to become the local master browser (later " +"versions of Windows have a bigger number). Setting Samba to 99 will cause it " +"to beat all Microsoft products, allowing it to become the local master " +"browser every time." +msgstr "" +"И в конце концов \"победитель\" этой войны рассылки пакетов становится " +"локальным обозревателем. Мы можем помочь Samba стать победителем в этом " +"сражении если используем опцию <c>os level = 99</c>, чтобы побить все другие " +"машины в сети. Это случается из за того, что все версии Windows (от Windows " +"95 до 2000) устроены таким образом, что всегда будут выбирать самую " +"современную версию Windows в качестве локального обозревателя(более поздние " +"версии имеют номер больше). Установка на Samba значения 99 побьет все " +"продукты Microsoft и позволит ей становиться локальным обозревателем каждый " +"раз." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):305 +msgid "Security options" +msgstr "Параметры безопасности" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):308 +msgid "" +"Before we leave the global section, here are a few security options that you " +"may be interested in. The host's <c>allow</c> option lets you limit the IP " +"addresses that can connect to Samba:" +msgstr "" +"Перед тем как мы покинем общий раздел, рассмотрим нескоторые настройки " +"безопасности которые могут заинтересовать вас. Параметр host's <c>allow</c> " +"позволяет вам ограничить IP-адреса с которых можно соедениться с Samba." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):314 +msgid "Allowed IP addresses" +msgstr "Дозволенные IP-адреса" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):314 +#, no-wrap +msgid "" +"\n" +"hosts allow = 192.168.1. 127.\n" +msgstr "" +"\n" +"hosts allow = 192.168.1. 127.\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):318 +msgid "" +"This option allows only machines in the <b>192.168.1</b> network to connect " +"to Samba, in addition to <b>127</b>, the localhost. Always make sure there " +"is a <b>127.</b> at the end of your hosts allow line." +msgstr "" +"Этот параметр позволяет подключаться к Samba только с localhost <b>127</b> и " +"машин находящихся в сети <b>192.168.1</b>. Убедитесь, что <b>127.</b> стоит " +"в конце спика дозволенных узлов." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):324 +msgid "" +"The interfaces option is very useful if your machine happens to have " +"multiple network interfaces. It allows you to specify the network interfaces " +"on which Samba is available. It is used as follows:" +msgstr "" +"Параметр interfaces крайне полезен, если на вашей машине есть несколько " +"сетевых интерфейсов. Он позволяет определить на каких сетевых интерфейсах " +"будет доступна Samba. Используется так:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):330 +msgid "Specifying interfaces" +msgstr "Определение интерфейсов" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):330 +#, no-wrap +msgid "" +"\n" +"interfaces = eth1\n" +msgstr "" +"\n" +"interfaces = eth1\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):334 +msgid "" +"This is an easy way to limit Samba to the necessary interfaces. And limiting " +"the interfaces prevents possible hacking attempts from unwanted users." +msgstr "" +"Это простой способ ограничить Samba только нужными интерфейсами и тем самым " +"предотвратить возможные попытки взлома от нежелательных пользователей." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):342 +msgid "A test share" +msgstr "Тестовый общедоступный ресурс" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):345 +msgid "" +"Now that we've configured Samba's global options, it's time to create a test " +"share that will allow us to access the <path>/tmp</path> directory. Add the " +"following lines:" +msgstr "" +"Теперь, когда мы настроили общие параметры Samba, пришло время сделать " +"тестовый общедоступный ресурс, который позволит нам получить доступ к " +"каталогу <path>/tmp</path>. Добавьте следующие строки:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):351 +msgid "Setting the /tmp directory" +msgstr "Установка каталога /tmp" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):351 +#, no-wrap +msgid "" +"\n" +"[tmp] \n" +"path=/tmp \n" +"writeable=yes\n" +msgstr "" +"\n" +"[tmp] \n" +"path=/tmp \n" +"writeable=yes\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):357 +msgid "" +"When Samba is started, these settings will make a share available called " +"<c>tmp</c>. This share will contain the contents of your <path>/tmp</path> " +"directory on your Samba server. Also, if a particular user has write " +"permission in <path>/tmp</path>, as almost all do, that user will be able to " +"create and modify files in that directory." +msgstr "" +"После того как Samba будет запущена эти настройки сделают общедоступный " +"сетевой ресурс который будет называться <c>tmp</c>. В нем будет находиться " +"содержимое каталога <path>/tmp</path> с вашего сервера Samba. Кроме того " +"если пользователь имеет права на запись, как это сделано практически у всех, " +"то можно будет создавать и изменять файлы в этом каталоге." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):365 +msgid "" +"Now that we've added all these entries to <path>smb.conf</path>, it's time " +"to verify that our configuration is correct. To do this, we'll use the " +"<c>testparm</c> utility:" +msgstr "" +"Теперь когда мы добавили все эти записи в <path>smb.conf</path>, пришло " +"время проверить правильность настроек. Чтобы это сделать мы используем " +"утилиту <c>testparm</c>" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):371 +msgid "Using testparm" +msgstr "Использование testparm" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):371 +#, no-wrap +msgid "" +"\n" +"$ testparm\n" +msgstr "" +"\n" +"$ testparm\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):375 +msgid "" +"A list of all your configuration options will be listed to the screen after " +"you hit Enter. Any errors in <path>smb.conf</path> will also be noted and " +"commented upon at this point. If there are any errors, follow the " +"instructions on-screen to fix them. Now we're ready to configure Samba users " +"and fire up Samba for the test run." +msgstr "" +"Список всех настроенных вами параметров будет перечислен на экране после " +"нажатия Enter. Какие либо ошибки в <path>smb.conf</path>, так же будут " +"отмечены и прокоментированы здесь. В случае появления ошибок следуйте " +"инструкциям на экране, чтобы устранить их. Теперь мы готовы приступить к " +"настройке пользователей и пробного запуска Samba." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):386 +msgid "Creating users" +msgstr "Создание пользователей" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):389 +msgid "" +"In order for the \"myuser\" user with the \"mypass\" password to be able to " +"use Samba, the following things must exist:" +msgstr "" +"Чтобы можно было использовать в Samba пользователя \"myuser\", с паролем " +"\"mypass\", должно быть следующее:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):395 +#, fuzzy +msgid "" +"A valid <b>myuser</b> Unix account. <b>myuser</b> does not need to be able " +"to log in, and <b>myuser</b>'s Unix password is not used by Samba, so you " +"can set to a dummy value if you like. If <b>myuser</b> also logs in " +"interactively to your Samba server, that's OK, too." +msgstr "" +"Действующая учетная запись пользователя Unix - <b>myuser</b>. Пользователю " +"<b>myuser</b> не нужна возможность входить в систему, и его пароль Unix не " +"используется Samba, но вы можете установить пустое значение если хотите. " +"Если <b>myuser</b> так же интерактивно входит на ваш сервер Samba, это тоже " +"нормально." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):401 +msgid "" +"A valid <b>myuser</b> entry in the <path>smbpasswd</path> file. The " +"<path>smbpasswd</path> file is found in the directory called <path>private</" +"path> that resides in the default Samba install prefix (<path>/usr/local/" +"private</path> in this example). <b>myuser</b> can be added to the " +"<path>smbpasswd</path> file by using the <c>smbpasswd</c> command and by " +"typing the following as root:" +msgstr "" +"Действительная запись <b>myuser</b> в файле <path>smbpasswd</path>. Этот " +"файл можно найти там куда установлена Samba в каталоге <path>private</path>" +"(в нашем примере это <path>/usr/local/private</path>). Пользователь " +"<b>myuser</b> может быть добален в файл <path>smbpasswd</path>, командой " +"<c>smbpasswd</c> выполненой с правами root:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):411 +msgid "Adding users" +msgstr "Добавление пользователей" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):411 +#, no-wrap +msgid "" +"\n" +"# <i>smbpasswd -a myuser</i>\n" +"New SMB password: <enter \"mypass\" here>\n" +"Retype new SMB password: <enter \"mypass\" again>\n" +"Added user myuser.\n" +msgstr "" +"\n" +"# <i>smbpasswd -a myuser</i>\n" +"New SMB password: <enter \"mypass\" here>\n" +"Retype new SMB password: <enter \"mypass\" again>\n" +"Added user myuser.\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):418 +msgid "" +"These steps must be repeated for every new Samba user. If you are Samba-" +"enabling an existing Unix account, remember to add the username and password " +"to the <path>smbpasswd</path> file. If you're adding a Windows-only user, " +"remember that in addition to adding the user to the <path>smbpasswd</path> " +"file you'll also need to create a valid Unix account with an identical " +"username. In fact, you'll need to create the Unix account first since " +"<path>smbpasswd</path> won't add a user unless the Unix account already " +"exists." +msgstr "" +"Эти шаги нужно повторить для каждого нового пользователя Samba. Если вы " +"используете в Samba существующую учетную запись пользователя Unix, не " +"забудьте добавить имя пользователя и пароль в файл <path>smbpasswd</path>. " +"Если вы добавляете только Windows-пользователя, не забудьте помимо " +"добавления его в файл <path>smbpasswd</path> создать учетную запись Unix с " +"таким же именем пользователя. На самом деле вам нужно будет вначале создать " +"учетную запись Unix, т.к. <path>smbpasswd</path> не будет добавлять нового " +"пользователя, если у него нет учетной записи Unix." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):428 +msgid "" +"Both accounts are needed because Samba uses the Unix account to set the " +"proper permissions on disk, while the <path>smbpasswd</path> file is used " +"for authentication purposes. If you are going to connect from Windows NT, " +"you'll want to create a Samba \"administrator\" user." +msgstr "" +"Обе учетные записи необходимы, потому что Samba ипользует учетные записи " +"Unix что бы установить соответствующие права доступа, в то время как файл " +"<path>smbpasswd</path> используется для аутентификации. Если вы собираетесь " +"подключаться из Windows NT вам будет нужно в Samba создать пользователя " +"\"administrator\"" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):438 +msgid "Final server configuration" +msgstr "Окончательная настройка сервера" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):441 +msgid "" +"We're almost ready to start Samba and configure the client machines. But you " +"must first make sure that your Samba box can ping every Windows client " +"machine on your network, by name. If this doesn't work, you'll need to add " +"some entries to <path>/etc/hosts</path> or update your DNS so that your " +"Samba box can properly find your Windows machines." +msgstr "" +"Мы почти готовы к запуску Samba и настройке клиентских машин, но сначала " +"нужно убедиться с помощью команды ping, что в вашей сети каждая клиентская " +"машина под управлением Windows доступна по имени. Если это не так, вам " +"необходимо внести некоторые изменения в ваш <path>/etc/hosts</path> или " +"обновить DNS, чтобы Samba могла найти ваши Windows машины." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):449 +msgid "" +"It is also helpful to note that Samba works best when <path>/etc/hosts</" +"path> is set up so that only the \"localhost\" name maps to 127.0.0.1. The " +"FQDN of your machine should map to the primary IP address used on your LAN. " +"For example:" +msgstr "" +"Полезно также отметить, что Samba работает лучше, когда в <path>/etc/hosts</" +"path> IP-адресу 127.0.0.1 соответствует только \"localhost\" . Полное " +"доменное имя вашей машины должно соответствовать IP-адресу используемому в " +"вашей локальной сети. Напимер:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):455 +msgid "/etc/hosts" +msgstr "/etc/hosts" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):455 +#, no-wrap +msgid "" +"\n" +"<comment>/etc/hosts excerpt</comment>\n" +"\n" +"127.0.0.1 localhost \n" +"192.168.1.1 mybox mybox.mydomain.com\n" +msgstr "" +"\n" +"<comment>/etc/hosts excerpt</comment>\n" +"\n" +"127.0.0.1 localhost \n" +"192.168.1.1 mybox mybox.mydomain.com\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):465 +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):474 +msgid "Starting Samba" +msgstr "Запуск Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):468 +msgid "" +"Samba is now configured and ready to go. We'll start Samba and then focus on " +"configuring the Windows machines properly. To start Samba, type the " +"following as root:" +msgstr "" +"Samba настроена и готова к запуску. После запуска мы перейдем к настройке " +"Windows машин. Чтобы запустить Samba выполните следующие команды с правами " +"root:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):474 +#, no-wrap +msgid "" +"\n" +"# <i>smbd</i>\n" +"# <i>nmbd</i>\n" +msgstr "" +"\n" +"# <i>smbd</i>\n" +"# <i>nmbd</i>\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):479 +msgid "" +"This will start Samba's two main server processes, <c>smbd</c> and <c>nmbd</" +"c>. They will log any informational and error messages to <path>/var/log/log." +"smb</path> and <path>/var/log/log.nmb</path>, respectively. Now that the " +"Unix side is up and running, it's time to turn to the client machines and " +"get them set up properly." +msgstr "" +"Это приведет к запуску двух основных процесоов Samba: <c>smbd</c> и <c>nmbd</" +"c>. они будут записывать в журнал информацию и сообщения об ошибках, " +"соответственно в <path>/var/log/log.smb</path> и в <path>/var/log/log.nmb</" +"path>. Сейчас на стороне Unix у нас все запущено и работает, время " +"обратиться к клиентским машинам и настроить их." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):490 +msgid "Configuring client machines" +msgstr "Настройка клиентских машин" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):493 +msgid "" +"To configure a Windows machine so that it can participate in your Samba " +"Workgroup, you'll need to make sure the TCP/IP protocol is properly " +"configured. You must also make sure that:" +msgstr "" +"Для настройки машины Windows на участие в рабочей группе Samba, вам " +"необходимо убедиться в правильности настроек TCP/IP протокола. Вы так же " +"долны убедиться что:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):500 +msgid "" +"Your Windows machine can ping your Unix machine by name. (Type <c>ping " +"myserver</c> at the C:\\> prompt.)" +msgstr "" +"Ваша Windows машина может получить отклик вашей Unix машины по имени " +"(Напишите <c>ping myserver</c> в командной строке C:\\>)" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):504 +msgid "" +"Your Windows machine is configured to use a WINS server. If Samba is " +"providing WINS services, this should be set to the IP of your Samba box. If " +"not, it should be set to the IP of a valid WINS server. This setting is " +"normally found inside the TCP/IP settings dialog." +msgstr "" +"Ваша Windows машина настроена на использование WINS сервера. Если WINS " +"предоставляется средствами Samba, укажите IP-адрес машины, на которой " +"запущена Samba. Если нет - укажите IP-адрес действующего WINS сервера. " +"Обычно эти настройки можно найти внутри диалога TCP/IP." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):510 +msgid "Your Windows machine is a member of YOURWORKGROUP." +msgstr "Ваша Windows машина состоит в рабочей группе YOURWORKGROUP." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):516 +msgid "Testing it out" +msgstr "Проверка" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):519 +#, fuzzy +msgid "" +"Now is the moment of truth. After your Windows machines have finished " +"rebooting, you'll need to log on to Windows using a username/password that " +"will be accepted by Samba. If you're using Windows 95/98, this username/" +"password combo will be simply stored in a file and used later when you try " +"to connect to any network resource." +msgstr "" +"Настал момент истины. После перезагрузки машин под управлением Windows, " +"войдите в систему используя свои имя пользователя и пароль, которые будут " +"подтверждаться Samba. Если вы используете Windows 95/98 комбинация имя " +"пользователя/пароль будет сохранена и использована позже при присоединении к " +"сетевому ресурсу." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):527 +msgid "" +"If you are using Windows NT Workstation, this username/password combo must " +"also be in the NT's local security database (otherwise you won't be able to " +"initially log in to NT). To do this, log on to NT as administrator and " +"create the account using User Manager. Afterwards, log out and log in as the " +"new user." +msgstr "" +"Если вы используете Windows NT Workstation, комбинация имя пользователя/" +"пароль так же должны находиться в локальной базе данных безопасности(иначе " +"вы не сможете войти в систему). Для этого войдите как администратор и " +"создайте учетную запись с помощью диспетчера пользователей. Затем выйдите и " +"войдите как новый пользователь." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):534 +msgid "" +"After you've properly logged in, double-click on the Network Neighborhood " +"and take a look at the YOURWORKGROUP workgroup. Look inside. See if your " +"Samba server is listed. Double-click on it and see if the <path>/tmp</path> " +"share is listed. If so, congratulations! Samba is working! If not, here are " +"some things to check:" +msgstr "" +"После того как вы вошли в систему, щелкните дважды на Сетевое окружение, " +"зайдите в рабочую группу YOURWORKGROUP. В списке должен быть ваш сервер " +"Samba. Дважды щелкните по нему - внутри должен быть каталог <path>/tmp</" +"path>. Если все так, поздравляю! Samba работает! Если нет то нужно кое что " +"проверить:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):543 +msgid "" +"Run <c>testparm</c>. Is your <path>smb.conf</path> OK? If not, fix the " +"problem and restart Samba." +msgstr "" +"Запустите <c>testparm</c>. Все ли нормально в файле <path>smb.conf</path>? " +"Если нет - решите проблему и перезвпустите Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):547 +msgid "" +"Are <c>smbd</c> and <c>nmbd</c> running? If not, check the log files for " +"possible errors, correct any issues, and restart <c>smbd</c> and <c>nmbd</c>." +msgstr "" +"Запущены ли <c>smbd</c> и <c>nmbd</c>? Если нет проверьте журнал событий на " +"возможные ошибки, исправьте их и перезапустите <c>smbd</c> and <c>nmbd</c>." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):552 +msgid "" +"Did you configure your Windows client machines to use a proper WINS server? " +"If not, they will have problems looking up the IP addresses of machines on " +"your network." +msgstr "" +"Настроены ли клиентские машины Windows на использования соответствующего " +"сервера WINS? Если нет, то у них будут проблемы с поиском IP-адресов машин в " +"сети." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):557 +msgid "" +"Can you ping the Unix machine from Windows and vice-versa? If not, you'll " +"need to configure your <path>/etc/hosts</path> file or DNS so that name " +"resolution is working properly." +msgstr "" +"Можете ли вы, с помощью команды ping получить отклик от Unix машины из " +"Windows и наоборот? Если нет, вы должны настроить ваш <path>/etc/hosts</" +"path> или DNS, чтобы правильно работало распознавание имен." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):564 +#, fuzzy +msgid "" +"If all these things check out and Samba is still not working, carefully " +"follow each step in the DIAGNOSIS.txt file found in the <path>docs/textdocs</" +"path> directory. You should be able to pinpoint and fix your configuration " +"or network problem within minutes. If you change <path>smb.conf</path> in " +"any way, you'll need to send <c>smbd</c> and <c>nmbd</c> a HUP signal to " +"force them to reread <path>smb.conf</path>. This is done as follows:" +msgstr "" +"Если вы все это проверили, а Samba по прежнему не работает, тчательно " +"следуйте каждому шагу описаному в файле DIAGNOSIS.txt, который можно найти в " +"каталоге <path>docs/textdocs</path>. Вы должны уметь определить и исправить " +"вашу проблему с конфигурацией или с сетью в течение минут. Если вы изменили " +"<path>smb.conf</path> вам следует послать процессам <c>smbd</c> и <c>nmbd</" +"c> сигнал HUP что бы заставить их перечитать <path>smb.conf</path>. Это " +"делается так:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):573 +msgid "Troubleshooting" +msgstr "Решение проблем" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):573 +#, no-wrap +msgid "" +"\n" +"# <i>kill -hup <pid of smbd></i>\n" +"# <i>kill -hup <pid of nmbd></i>\n" +msgstr "" +"\n" +"# <i>kill -hup <pid of smbd></i>\n" +"# <i>kill -hup <pid of nmbd></i>\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):578 +msgid "" +"Alternately, you can simply kill <c>smbd</c> and <c>nmbd</c> and restart " +"them again." +msgstr "" +"Или вы можете завершить процессы <c>smbd</c> и <c>nmbd</c> и снова запустить " +"их." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):586 +msgid "Next time" +msgstr "В следующий раз" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):589 +#, fuzzy +msgid "" +"In my <uri link=\"/doc/en/articles/samba-p3.xml\">next Samba article</uri> " +"I'll familiarize you with Samba's more advanced options. Then you'll be able " +"to set up shares that function exactly the way you want them to. We'll also " +"look at several advanced features of Samba, like Samba printing. I'll see " +"you then!" +msgstr "" +"В моей<uri link=\"/doc/en/articles/samba-p3.xml\">следующей главе о Samba</" +"uri> Я познакомлю вас другими параметрами Samba. тогда вы сможете создавать " +"общие ресурсы в точности такие как вы хотите. Мы так же рассмотрим " +"расширеные возможности Samba, такие как печать. Увидимя!" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):599 +msgid "Resources" +msgstr "Ресурсы" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):603 +msgid "The main <uri link=\"http://fi.samba.org\">Samba</uri> web site" +msgstr "Официальный сайт <uri link=\"http://fi.samba.org\">Samba</uri>" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):604 +msgid "" +"<uri link=\"http://www.kampsax.dtu.dk/~rask/Samba/mailinglist/\">Amiga " +"Samba</uri> mailing list" +msgstr "" +"<uri link=\"http://www.kampsax.dtu.dk/~rask/Samba/mailinglist/\">Amiga " +"Samba</uri> список рассылки" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):608 +msgid "<uri link=\"http://linuxguy.net/samba.htm\">Samba</uri> by Ed Weinberg" +msgstr "<uri link=\"http://linuxguy.net/samba.htm\">Samba</uri> by Ed Weinberg" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):609 +msgid "" +"<uri link=\"http://www.amazon.com/exec/obidos/ASIN/0672318628/\">Samba " +"Unleashed</uri>>, by Steve Litt, with contributions from Daniel Robbins" +msgstr "" +"<uri link=\"http://www.amazon.com/exec/obidos/ASIN/0672318628/\">Samba " +"Unleashed</uri>>, by Steve Litt, with contributions from Daniel Robbins" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):613 +msgid "" +"<uri link=\"http://www.oreilly.com/catalog/samba/\">Using Samba</uri> " +"(O'Reilly Publishing; 1999)" +msgstr "" +"<uri link=\"http://www.oreilly.com/catalog/samba/\">Using Samba</uri> " +"(O'Reilly Publishing; 1999)" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):617 +msgid "" +"<uri link=\"http://www.mdb.ku.dk/tarvin/samba/\">Samba Notes</uri> on Samba " +"and Redhat" +msgstr "" +"<uri link=\"http://www.mdb.ku.dk/tarvin/samba/\">Samba Notes</uri> on Samba " +"and Redhat" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):621 +msgid "" +"The <uri link=\"http://fi.samba.org/docs/swat_ssl.html\">SWAT</uri> main page" +msgstr "" +"Официальный сайт <uri link=\"http://fi.samba.org/docs/swat_ssl.html\">SWAT</" +"uri>" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/samba-p3.xml.po b/article/gettext/ru/samba-p3.xml.po new file mode 100644 index 0000000..2696179 --- /dev/null +++ b/article/gettext/ru/samba-p3.xml.po @@ -0,0 +1,1003 @@ +msgid "" +msgstr "" +"Project-Id-Version: Gentoo Docs\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2010-02-27 09:07+0300\n" +"Last-Translator: lain <st.lain@gmail.com>\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(guide:link):5 +msgid "/doc/en/articles/samba-p3.xml" +msgstr "/doc/en/articles/samba-p3.xml" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):6 +msgid "Introduction to Samba, Part 3" +msgstr "Введение в Samba, Часть 3" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(author:title):8 +msgid "Author" +msgstr "Автор" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "drobbins@gentoo.org" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "Дэниел Роббинс" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(abstract):15 +msgid "" +"In his previous article, Daniel Robbins guided you through the process of " +"setting up Samba for the first time. Now it's time to configure Samba so " +"that it does everything that you want it to do." +msgstr "" +"В свей предыдущей главе Дэниел Роббинс рассказал вам о том как впервые " +"установить Samba. Пришло время настроить ее, чтобы она работала так как вы " +"хотите." + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This document +#. is an updated version of the original article, and contains various improvements +#. made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(version):26 +msgid "1.0" +msgstr "1.0" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(date):27 +msgid "2005-10-08" +msgstr "2005-10-08" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):30 +#, fuzzy +msgid "Getting Samba to samba: The configuration stage" +msgstr "Getting Samba to samba: Этап настройки" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):32 +msgid "A brief review" +msgstr "Краткий обзор" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):35 +msgid "" +"Here's a listing of the <path>smb.conf</path> that we've been working with:" +msgstr "" +"Ниже представлен файл <path>smb.conf</path>, с которым мы будем работать" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):39 +msgid "/etc/smb.conf" +msgstr "/etc/smb.conf" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):39 +#, no-wrap +msgid "" +"\n" +"[global]\n" +"\n" +"<comment># set YOURWORKGROUP to the name of your workgroup</comment>\n" +" \n" +"workgroup = YOURWORKGROUP \n" +"security = user \n" +"encrypt passwords = yes \n" +"guest account = guest \n" +"\n" +"<comment># enable *one* of the following two lines</comment>\n" +"<comment># enable the first line if you want to use an existing</comment>\n" +"<comment># WINS server on your subnet, otherwise, enable the</comment>\n" +"<comment># second.</comment>\n" +"\n" +"# wins server = IP address of WINS server \n" +"# wins support = yes \n" +"\n" +"local master = yes \n" +"os level = 99 \n" +"domain master = yes \n" +"preferred master = yes \n" +"\n" +"<comment># optional security options. Customize for your site.</comment>\n" +"\n" +"# hosts allow = 192.168.1. 127. \n" +"# interfaces = eth1 \n" +"\n" +"[tmp] \n" +"path=/tmp \n" +"writeable=yes\n" +msgstr "" +"\n" +"[global]\n" +"\n" +"<comment># set YOURWORKGROUP to the name of your workgroup</comment>\n" +" \n" +"workgroup = YOURWORKGROUP \n" +"security = user \n" +"encrypt passwords = yes \n" +"guest account = guest \n" +"\n" +"<comment># enable *one* of the following two lines</comment>\n" +"<comment># enable the first line if you want to use an existing</comment>\n" +"<comment># WINS server on your subnet, otherwise, enable the</comment>\n" +"<comment># second.</comment>\n" +"\n" +"# wins server = IP address of WINS server \n" +"# wins support = yes \n" +"\n" +"local master = yes \n" +"os level = 99 \n" +"domain master = yes \n" +"preferred master = yes \n" +"\n" +"<comment># optional security options. Customize for your site.</comment>\n" +"\n" +"# hosts allow = 192.168.1. 127. \n" +"# interfaces = eth1 \n" +"\n" +"[tmp] \n" +"path=/tmp \n" +"writeable=yes\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):75 +msgid "Adding some shares" +msgstr "Добавим общие ресурсы" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):78 +msgid "" +"While this <path>smb.conf</path> file is functional, all it does is share " +"the <path>/tmp</path> directory with Windows by creating a share with the " +"name of \"tmp\". Not too exciting. Let's create another share that could be " +"more useful. Add the following lines to your <path>smb.conf</path> and " +"restart Samba." +msgstr "" +"Пока что все, что делается посредством этого фала - создание для Windows " +"общего ресурса \"tmp\" через который можно получить доступ к каталогу <path>/" +"tmp</path>. Ничего особенного. Давайте сделаем более полезный общий ресурс. " +"Для этого добавьте эти строчки в ваш <path>smb.conf</path> и перезапустите " +"Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):85 +msgid "Adding an FTP share" +msgstr "Добавление FTP-ресурса" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):85 +#, no-wrap +msgid "" +"\n" +"[ftp] \n" +"path=/path/to/ftp/root \n" +"writeable=no\n" +msgstr "" +"\n" +"[ftp] \n" +"path=/path/to/ftp/root \n" +"writeable=no\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):91 +msgid "" +"If you have an ftp site or some kind of file archive on your Samba server, " +"you can use something like this to share the data over the network. The " +"<b>writeable=no</b> parameter tells Samba that no one should be allowed to " +"create or modify files on this share. Anyone who has a valid Samba account " +"set up will be able to access this share." +msgstr "" +"Если у вас есть FTP-сайт или какой нибудь файловый архив на сервере Samba, " +"вы можете использовать чтото вроде этого для предоставление к нему доступа в " +"сети. Параметр <b>writeable=no</b> указывает на то, что никто не сможет " +"создавать или изменять файлы на ресурсе. Все у кого есть учетная запись в " +"Samba будут иметь доступ к этому ресурсу." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):102 +msgid "An exciting share" +msgstr "Существующий общий ресурс" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):105 +msgid "" +"OK, I know what you're thinking. This still isn't too exciting. How about " +"sharing a home directory? Here's how:" +msgstr "" +"Хорошо, я знаю о чем вы думаете. В этом по прежнему нет ничего особенного. А " +"как открыть общий доступ к домашнему каталогу? Вот как:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):110 +msgid "Sharing a home directory" +msgstr "Общий доступ к домашнему ккаталогу" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):110 +#, no-wrap +msgid "" +"\n" +"[drobbins] \n" +"comment=Home directory for drobbins \n" +"path = /home/drobbins \n" +"force user = drobbins \n" +"read only = no \n" +"valid users = drobbins administrator\n" +msgstr "" +"\n" +"[drobbins] \n" +"comment=Home directory for drobbins \n" +"path = /home/drobbins \n" +"force user = drobbins \n" +"read only = no \n" +"valid users = drobbins administrator\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):119 +msgid "" +"This one is a lot more interesting. Adding something like this to your " +"<path>smb.conf</path> will allow you to share a home directory. In this " +"example, a \"drobbins\" share is created. This shares the contents of <path>/" +"home/drobbins</path> over the network. Fortunately, however, thanks to the " +"<b>valid users</b> line, not just anyone can access this hare. This line " +"causes Samba to reject access by anyone other than the \"drobbins\" or " +"\"administrator\" account. Since I'm using Windows NT, I'm often logged in " +"as administrator. In such situations, it's nice to still be able to access " +"the \"drobbins\" share. Such a valid users line allows this to happen." +msgstr "" +"Это намного интереснее. Если чтото похожее вы добавите в ваш <path>smb.conf</" +"path> это позволит вам открыть общий доступ к вашему домашнему каталогу. В " +"этом примере мы создали общий ресурс \"drobbins\". Через него можно из сети " +"получить доступ к <path>/home/drobbins</path>. К счастью благодаря строчке " +"<b>valid users</b> его получит далеко не каждый. В доступе будет отказано " +"любому, кто пытается зайти не с учетных записей \"drobbins\" или " +"\"administrator\". С тех пор как я использую Windows NT, я часто входил в " +"систему как администратор. Хорошо, что в таких случаях я по прежнему мог " +"получить доступ к общему ресурсу \"drobbins\". Это все благодаря строке " +"valid users." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):131 +msgid "" +"You'll also notice the use of the <b>read only</b> parameter. As you might " +"guess, <b>read only</b> is the opposite of the <b>writeable</b> parameter. " +"We could have just as easily replaced this line with <b>writeable=yes</b>. " +"This means that Samba will permit writing to this particular share, as long " +"as you have the proper permissions to do so. Since the Samba \"drobbins\" " +"user maps directly to the Unix \"drobbins\" user, and drobbins happens to be " +"the owner of the <path>/home/drobbins</path> directory and its contents, " +"writing and modifying files will be permitted." +msgstr "" +"Заметьте, также можно использовать параметр <b>read only</b>. Как вы " +"наверное и догадались, он - противоположность параметру <b>writeable</b>. Мы " +"могли бы просто заменить эту строчку на <b>writeable=yes</b>. Тогда Samba " +"разрешит запись в данном общем ресурсе, если у вас есть соответствующие " +"права доступа. И пока пользователь Samba \"drobbins\" соответствует " +"пользователю Unix \"drobbins\", который в свою очередь является владельцем " +"каталога <path>/home/drobbins</path> и всего его содеожимого, запись и " +"изменение файлов будет разрешено." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):142 +msgid "" +"Have you ever created a file in your home directory as root, and then tried " +"to modify it when you're logged in as a normal user only to be denied write " +"access? This seems to happen all the time to me. To fix the problem, I need " +"to <c>su</c>, <c>chown drobbins.drobbins filename</c> and then <c>exit</c> " +"from root. Finally, I'm allowed to modify the file." +msgstr "" +"Создавали ли вы когда нибудь файлы в вашем домашнем каталоге как root, а " +"потом не могли их изменить как обычный пользователь из за прав доступа? Со " +"мной такое происходит постоянно. Что бы решить эту проблему я должен " +"выполнить <c>su</c>, <c>chown drobbins.drobbins имя_файла</c> и после этого " +"<c>exit</c> выйти из режима root. В итоге я получаю доступ к файлу." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):150 +#, fuzzy +msgid "" +"I bring this up because a similar problem can occur when you share out home " +"directories and access them using different Samba users. Consider the " +"following situation. I access a share as administrator and created a file. " +"Normally, this file would be owned by administrator and it would not be " +"modifiable by the drobbins user. If drobbins tried to modify it, access " +"would be denied. Fortunately, Samba has the <b>force user</b> option that " +"works around this situation. The <b>force user</b> option will cause all " +"actions performed on files (on a particular Samba SMB/CIFS share) to be " +"performed using a single Unix account. In my \"drobbins\" share example, " +"this means that any files that administrator creates will actually be owned " +"by drobbins, preventing any ownership conflicts. Since the \"drobbins\" " +"share contains the contents of my home directory, I like to keep everything " +"in it owned by the drobbins account." +msgstr "" +"Это я к тому, что похожая проблема может возникнуть когда вы открываете " +"общий доступ к вашему каталогу и получаете к нему доступ используя разные " +"учетные записи Samba. Рассмотрим следующую ситуацию. Я получаю доступ к " +"общему ресурсу как administrator и создаю там файл. Владельцем этого файла " +"будет administrator и его нельзя будет изменить пользователю drobbins. При " +"попытке изменить файл, пользователю drobbins доступ будет закрыт. К счастью " +"для этого в Samba есть параметр <b>force user</b>. Благодаря параметру " +"<b>force user</b> все операции над файлами(на определенном общем SMB/CIFS " +"ресурсе Samba) будут производиться используя одну учетную запись Unix. " +"Например в моем ресурсе \"drobbins\" это значит что любые файлы которые " +"создает administrator будут принадлежать пользователю drobbins, предотвращая " +"любые конфликты связанные с собственностью. С тех пор как общий ресурс " +"\"drobbins\" содержит мой домашний каталог, мне нравится, что владельцем " +"всего в нем является пользователь drobbins" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):165 +msgid "" +"Before we head on to the next topic, I should mention the <b>comment</b> " +"parameter. This allows you to complement your share with a descriptive " +"comment visible from Windows." +msgstr "" +"Перед тем как перейти к следующей теме, хотелось бы упомянуть параметр " +"<b>comment</b>. Он позволяет вам добавить коментарий к общему ресурсу, " +"видимый из Windows." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):174 +msgid "Sharing lots of home directories" +msgstr "Общий доступ к нескольким домашним каталогам" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):177 +msgid "" +"So, we've covered how to share a single home directory. But what do you do " +"if you happen to administrate a server that contains hundreds of users, all " +"of whom want to be able to access their home directories from Windows? " +"Fortunately, Samba has a special share just for this purpose called \"homes" +"\". Here's how it works:" +msgstr "" +"Мы разобрались как открыть общий доступ к одному домашнему каталогу, Но что " +"делать если у вам случиться администрировать сервер содержащий сотни " +"пользователей, желающих иметь доступ к своим ресурсам из Windows? К счастью " +"в Samba есть специальный тип общего ресурса называемый \"homes\". Вот как " +"это работает:" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):185 +msgid "Sharing multiple homes" +msgstr "Общий доступ к нескольким домашним каталогам" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):185 +#, no-wrap +msgid "" +"\n" +"[homes] \n" +"comment=Home directory for %S \n" +"path=/home/%u \n" +"valid users = %u administrator \n" +"force user=%u \n" +"writeable = yes \n" +"browseable = no\n" +msgstr "" +"\n" +"[homes] \n" +"comment=Home directory for %S \n" +"path=/home/%u \n" +"valid users = %u administrator \n" +"force user=%u \n" +"writeable = yes \n" +"browseable = no\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):195 +msgid "" +"As I mentioned, this is a \"special\" share. It doesn't work like ordinary " +"shares. Samba recognizes the special identifier <b>[homes]</b> and treats " +"this share differently." +msgstr "" +"Как я указал это \"специальный\" ресурс. Он не будет работать как обычные " +"ресурсы. Samba распознает специальный параметр <b>[homes]</b> и трактует " +"этот ресурс иначе." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):201 +msgid "" +"One of the most unusual things about this share is the use of the " +"<b>browseable=no</b> parameter. This particular option causes a share to be " +"invisible under the Network Neighborhood, and it's normally used to deter " +"those malicious users who may be tempted to \"explore\" any share they can " +"see. But why use it here?" +msgstr "" +"Довольно необычно было бы использовать парамтр <b>browseable=no</b> в таком " +"ресурсе. Благодаря этому параметру ресурс будет недоступен из Сетевого " +"окружения, обычно это используется, чтобы удержать злоумышленников, которые " +"пытаются исследовать любые общие ресурсы, которые попалаются на глаза. Но " +"зачем это использовать тут?" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):209 +#, fuzzy +msgid "" +"The answer is a bit tricky. You see, the \"homes\" share does create a share " +"called \"homes\". But that particular share is of no use to us. It doesn't " +"do anything, so we hide it. What the \"homes\" share does do for us is quite " +"tremendous. It tells Samba to automatically create home directories on the " +"fly for each individual user. For example, let's say our \"drobbins\" share " +"wasn't defined in <path>smb.conf</path> and we explored the Network " +"Neighborhood as NT user \"drobbins\". We would find a share called \"drobbins" +"\" that would behave identically to our original \"drobbins\" share. If we " +"accessed Samba using the NT user \"jimmy\", we'd find a perfectly configured " +"\"jimmy\" share. This is the beauty of homes. Adding one special share " +"causes all home shares to be properly created." +msgstr "" +"Ответ довольно хитрый. Как видите \"homes\" не создает общего ресурса, " +"который называется \"homes\". Но этот ресурс для нас и не имеет значения. Он " +"ничего не делает, поэтому мы скроем его. То что делает ресурс \"homes\" для " +"нас просто потрясающе: Он говорит Samba автоматически создавать домашние " +"каталоги на лету для каждого пользователя. Например допустим ресурс " +"\"drobbins\" не указан в <path>smb.conf</path> и мы заходим в сетевое " +"окружение от пользователя NT \"drobbins\". Мы найдем общий ресурс названный " +"\"drobbins\", который будет вести себя подобно нашему первоначальному " +"ресурсу \"drobbins\". Если мы получаем доступ к Samba от пользователя NT " +"\"jimmy\" мы найдем настроеный общий ресурс \"jimmy\". Это красота домашних " +"каталогов. Добавляем один специальный ресурс и все домашние каталоги " +"надлежащим образом созданы." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):223 +msgid "" +"Now, how does it work? When the \"homes\" share is set up, Samba will detect " +"which NT user is accessing Samba. Then it will create a home share that's " +"been customized for this particular user. This share will show up in the " +"Network Neighborhood as if it's a normal, non-dynamic share. The NT user " +"will have no idea that this particular share was created on the fly. Let's " +"look at what each particular option does." +msgstr "" +"Теперь о том как это работает. Когда установлен общий ресурс \"homes\", " +"Samba определяет какой пользователь NT получает доступ. Тогда она создает " +"общий ресурс настроенный для этого пользователя. Этот ресурс будет " +"отображаться в Сетевом окружении как обычный не динамический ресурс. " +"Пользователь NT не догадается, что этот ресурс был создан на лету. Давайте " +"посмотрим что делает каждый параметр." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):232 +msgid "" +"The comment parameter uses the <b>%S</b> wildcard, which expands to the " +"actual name of the share. This will cause the \"drobbins\" share to have the " +"comment \"Home directory for drobbins\", the \"jimmy\" share to have the " +"comment \"Home directory for jimmy\", etc. The path parameter also contains " +"the wildcard <b>%u</b>. <b>%u</b> expands to the name of the user accessing " +"the share. In this particular case, %u is equivalent <b>%S</b>, so we could " +"have used <b>path=/home/%S</b> instead. This allows Samba to dynamically map " +"the share to the proper location on disk." +msgstr "" +"В параметре comment используется символ <b>%S</b> который означает имя " +"ресурса, например для ресурса \"drobbins\" комментарий будет \"Home " +"directory for drobbins\", для \"jimmy\" соотвественно \"Home directory for " +"jimmy\" и т. п. В параметре path также может быть использован символ %u " +"означающий имя пользователя который пытается получить доступ. В отдельный " +"случаях %u эквивалентно <b>%S</b>, и мы могли бы использовать<b>path=/home/" +"%S</b> Это позволит Samba автоматически разместить общий ресурс на диске." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):243 +#, fuzzy +msgid "" +"Again, we use macros in the <b>valid users=</b> line so that only the owner " +"of the share and administrator are allowed to access it. <b>force user</b> " +"uses a macro too, so that all file access will be performed by a single " +"account. And of course we make the share writeable for any authenticated " +"users. While we use the <b>browseable=no</b> parameter, the dynamically-" +"created shares will be browseable when they are created. Again, this just " +"hides the non-functional \"homes\" share." +msgstr "" +"Снова используем макрос в строке <b>valid users=</b>, чтобы только " +"администратор и владелец ресурса имели доступ. <b>force user</b> так же " +"использует макрос, чтобы доступ к файлам осуществлялся с одной учетной " +"записи. И конечно мы сделаем ресурс доступным для записи любому " +"неавторизованному пользователю. Пока мы используем параметр " +"<b>browseable=no</b> динамически создаваемые ресурсы будут доступны для " +"просмотра когда они созданы. Снова это просто скрывает не функциональный " +"ресурс \"homes\"" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):258 +msgid "Share parameters" +msgstr "Параметры общих ресурсов" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):262 +#, fuzzy +msgid "" +"We've seen a couple of handy techniques to use when creating shares. In this " +"section I'll cover several popular options that allow you to customize Samba " +"functionality on a per-share basis. All share-related options can also be " +"placed in the <b>[globals]</b> section to set a default value for all shares." +msgstr "" +"Мы рассмотрели ряд возможностей, которые можно использовать для создания " +"общих ресурсов. Здесь, я собираюсь рассказать вам о нескольких популярных " +"параметрах, которые позволят вам настроить функциональность Samba на основе " +"per-share. Все параметры имеющие отношение к общим ресурсам так же можно " +"поместить в раздел <b>[globals]</b>, установив тем самым значения по " +"умолчанию для всех общих ресурсов." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):272 +msgid "comment=" +msgstr "comment=" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):275 +msgid "" +"The <b>comment=</b> parameter is a very handy option to make your Samba " +"system look more professional from the Windows side. It allows you to " +"specify a comment that accompanies a particular share intended to describe " +"its contents. When specifying comments (especially when using \"homes\"), I " +"often use the <b>%S</b> macro, which expands to the name of the share." +msgstr "" +"Параметр <b>comment=</b> очень полезен, если вы хотите, чтобы ваша система " +"Samba смотрелась красивее со стороны Windows. Он позволяет добавить " +"комментарий, на каждый ресурс, который будет описывать его содержимое. При " +"описании содержимого (особенно при использовании \"homes\"), Я часто " +"использую символ <b>%S</b>, для подстановки имени ресурса." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):286 +msgid "path=" +msgstr "path=" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):289 +msgid "" +"<b>path=</b> is one of the most fundamental Samba share parameters. It " +"allows you to set the path to the directory to be exported. Note that by " +"default any symlinks in this directory tree can be followed. So it is " +"possible for users to \"jump out\" of the directory tree. From the Windows " +"side, they will have no indication that they are following a symlink. It " +"will just appear as a regular file or directory. We'll look at several " +"parameters that can change this behavior to make Samba more secure." +msgstr "" +"<b>path=</b> один из важнейших параметров ресурса Samba. Он озволяет " +"установить путь к каталогу. Следует отметить, что в этом каталоге по " +"умолчанию будут работать переходы по символическим ссылкам. Таким образом " +"пользователь может \"выпрыгнуть\" из указанного каталога. Со стороны Windows " +"нельзя определить символическую ссылку. Она будет выглядеть так же как и " +"обычный файл или каталог. Рассмотрим несколько параметров, которые позволят " +"изменить это и увеличить безопасность Samba." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):302 +msgid "force user=" +msgstr "force user=" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):305 +msgid "" +"<b>force user=</b> is one of my favorite parameters. It forces all file " +"modifications to be performed by the account of a single user. You'll want " +"to use the <b>valid users=</b> option often with this one so that you can " +"limit access to select users. Since all file operations are performed using " +"a single user account, one of the side effects of <b>force-user=</b> is that " +"you can't look at the Unix file permissions to figure out who did what. Thus " +"for writeable shares, the <b>force user=</b> option should be accompanied by " +"reasonable security defaults. Without this option, all file operations will " +"be performed by the Samba user who is accessing the share." +msgstr "" +"<b>force user=</b> один из моих любимых параметров. При его использовании " +"все изменения файлов будут производиться с учетной записи одного " +"пользователя. Вместе с ним часто используется параметр <b>valid users=</b>, " +"позволяющий ограничить доступ выбранным пользователям. Так как при " +"использовании <b>force-user=</b> все действия с файлами выполняются с " +"использованием одной учетной записи пользователся, вы не сможете по " +"средством параметров доступа Unix выяснить кто что делал. Таким образом для " +"доступных для записи ресурсов параметр <b>force user=</b> должен по " +"умолчанию сопровождаться разумными настройками безопасности." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):317 +msgid "force user example" +msgstr "пример force user" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):317 +#, no-wrap +msgid "" +"\n" +"force user=drobbins\n" +msgstr "" +"\n" +"force user=drobbins\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):324 +msgid "browseable=" +msgstr "browseable=" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):327 +msgid "" +"One simple way to enhance your security is to make certain shares invisible. " +"Shares are browseable by default under the Network Neighborhood. Making them " +"invisible can help to deter unwanted hacking attempts. But this should not " +"be used as the only means of security. Just because a share isn't listed in " +"the browse list does not prevent it from being accessed from Windows. It " +"just decreases the amount of information you may potentially be providing to " +"a malicious user. To access a hidden share, you can type its UNC name into " +"the <c>Run...</c> dialog box. For example, the hidden share on myserver " +"called 'test' can be accessed by typing <c>\\\\myserver\\test</c> from " +"Windows." +msgstr "" +"Простой способ улучшить вашу безопасность - сделать определенные ресурсы " +"невидимыми. Общие ресурсы по умолчанию доступны для просмотра из Сетевого " +"Окружения. Скрытие их поможет предоствратить нежелатьельные попытки взлома. " +"Но это не должно использоваться в качестве единственного средства " +"обеспечения безопасности. Ведь если ресурс не отображается в списке это не " +"значит что он не доступен. Это просто уменьшит количество информации которую " +"вы потенциально предоставляете недоброжелательному пользователю. Чтобы " +"получить доступ к скрытому ресурсу вы можете написать его UNC имя в диалоге " +"<c>Выполнить...</c>. например для получения доступа к ресурсу 'test' на " +"myserver нужно написать <c>\\\\myserver\\test</c> из Windows." + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):339 +msgid "browseable example" +msgstr "Пример browseable" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):339 +#, no-wrap +msgid "" +"\n" +"browseable=no\n" +msgstr "" +"\n" +"browseable=no\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):346 +msgid "available=" +msgstr "available=" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):349 +msgid "" +"The <b>available=</b> option, which is 'yes' by default, is just a handy way " +"of disabling a share without commenting it out or erasing it from the " +"<path>smb.conf</path> entirely. <b>available=no</b> will make the share " +"inactive after Samba is restarted." +msgstr "" +"Параметр <b>available=</b>, который по умолчанию 'yes' - удобный способ " +"выключить общий ресурс не коментируя его и не удаляя из <path>smb.conf</" +"path>. <b>available=no</b> сделает ресурс недоступным после перезагрузки " +"Samba" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):356 +msgid "available example" +msgstr "Пример available" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):356 +#, no-wrap +msgid "" +"\n" +"available=no\n" +msgstr "" +"\n" +"available=no\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):363 +msgid "valid users=" +msgstr "valid users=" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):366 +msgid "" +"Definitely take advantage of the <b>valid users=</b> option to restrict " +"access to certain shares. By default, any authenticated user will be allowed " +"to access a Samba share. You can refer to a valid NIS netgroup or Unix group " +"by appending an \"@\" to the group name." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):373 +msgid "valid users example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):373 +#, no-wrap +msgid "" +"\n" +"<comment>To allow drobbins and the members of the wheel group access to the shares:</comment>\n" +"\n" +"valid users = drobbins @wheel\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):382 +msgid "dont descend=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):385 +msgid "" +"<b>dont descend=</b> specifies directories in the share that Samba should " +"not enter. This can be handy to prevent Samba from entering a directory that " +"contains recursive symlinks, or to restrict access to irrelevant directories " +"like <path>/proc</path> and <path>/dev</path>. Be sure to test out your " +"<b>dont descend=</b> settings to make sure they are working. You may need to " +"switch <b>dont descend= /dev</b> to <b>dont descend= ./dev</b>, for example." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):397 +msgid "follow symlinks=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):400 +msgid "" +"<b>follow symlinks=</b> normally defaults to 'yes' and will cause Samba to " +"follow all symlinks, even if they redirect Samba to files or directories " +"outside of the exported directory tree. Setting follow symlinks to 'no' will " +"turn off this functionality, and prevent symlinks from being followed at " +"all. Turning off follow symlinks does eliminate a potential security hole " +"and should be done when symlinks are not needed or required." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):409 +msgid "follow symlinks example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):409 +#, no-wrap +msgid "" +"\n" +"follow symlinks=no\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):416 +msgid "volume=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):419 +msgid "" +"The <b>volume=</b> option can cause Samba to associate a \"volume name\" " +"with the particular share. This is especially useful if you are using a " +"Samba share to export the contents of a CD-ROM. Many installation programs " +"will expect to find an exact volume name on the CD, without which they won't " +"work." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):426 +msgid "volume example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):426 +#, no-wrap +msgid "" +"\n" +"volume=My Favorite CD\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):433 +msgid "create mask=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):436 +msgid "" +"Samba uses the <b>create mask</b> to set the proper permissions on newly " +"created files. The <b>create mask</b> defines which permissions newly " +"created files will allow. The supplied octal number will be combined with " +"the desired permissions using a binary <c>and</c> operation. This causes any " +"permissions not in the mask to be dropped from the new file's permissions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):444 +msgid "create mask example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):444 +#, no-wrap +msgid "" +"\n" +"create mask= 0755\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):451 +msgid "directory mask=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):454 +msgid "" +"<b>directory mask=</b> works in a manner similar to <b>create mask=</b>. It " +"specifies an octal number that defines those permissions allowed for the new " +"directory." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):463 +msgid "The many options of smb.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):466 +msgid "" +"In this section, we've covered only those <path>smb.conf</path> options that " +"are the most essential in configuring a useful and secure Samba system. " +"Samba itself has many additional configuration options that you may find " +"useful. To find out more about them, check out the smb.conf main page, where " +"they are listed and described in detail. (See <uri link=\"#resources" +"\">Resources</uri>.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):479 +msgid "Printing from Samba" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):483 +msgid "" +"Samba's printer-sharing abilities come in handy and work well. To refresh " +"your memory, Samba allows you to export existing lpd-based printers so that " +"Windows clients can connect and print to them. One of the wonderful things " +"about this arrangement is that all printer-specific code is generated on the " +"Windows side. This means that your Unix system does not need to have " +"explicit support for a particular printer. As long as your Unix system is " +"able to dump raw data to the printer, it will work and work well. This even " +"allows you to share and use printers that are not fully functional in a pure " +"Unix environment, such as my Adobe PrintGear-based NEC SuperScript 870." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):498 +msgid "How Samba printing works" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):501 +msgid "" +"To get printing to work, you first need to get <c>lpd</c> working. While " +"<c>lpd</c> configuration is beyond the scope of this article, it's not too " +"hard and is described in detail in the Printing FAQ available at tldp.org. " +"(See <uri link=\"#resources\">Resources</uri>.) You'll want to configure " +"your printers to be \"raw\" printers by default, so that any data sent to " +"the printer using an <c>lpr</c> command is copied verbatim without any " +"filtering or massaging. It's easy to test <c>lpd</c> to make sure that it is " +"configured in \"raw\" mode. On the Windows side, install a printer driver " +"for that particular printer that prints to <b>FILE:</b>. Print a page from " +"your favorite Windows word processor and save it to file. Then copy it to " +"your Unix machine and print it using <c>lpr</c>. If you get correct output, " +"you're all set to configure Samba to use the printer automatically." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):519 +msgid "Samba print globals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):522 +msgid "" +"To get Samba working properly for printing under a Linux system, you'll want " +"to add the following parameters to your <b>[global]</b> section:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):527 +msgid "Edit smb.conf to allow printing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):527 +#, no-wrap +msgid "" +"\n" +"printcap name=/etc/printcap \n" +"printing=bsd\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):532 +msgid "" +"If your printcap is located somewhere else, adjust the <b>printcap name=</b> " +"parameter accordingly. If you use a printing system other than standard BSD " +"<c>lpd</c>, consult the <b>rinting=</b> option on the <path>smb.conf</path> " +"main page for more information on how to get Samba to work with your " +"printing system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):539 +msgid "" +"Now, setting up the printer share. This is what I have in <path>smb.conf</" +"path> for my printer. We'll use it as a model:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):544 +msgid "Example printer share" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):544 +#, no-wrap +msgid "" +"\n" +"[nec] \n" +"<comment>#my NEC SuperScript 870</comment>\n" +"path=/var/spool/smb \n" +"print command=/usr/bin/lpr %s \n" +"lprm command=/usr/bin/lprm -P%p %j \n" +"printer=lp \n" +"public=yes \n" +"printable=yes\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):555 +msgid "" +"It is important to first understand the path parameter. When Samba accepts a " +"print job from Windows, it needs to store it somewhere on disk before Samba " +"can submit the job using <c>lpr</c>. The directory referred to by the " +"<b>path=</b> parameter should have Unix permissions 1777 so that anyone can " +"write to this directory. The <b>print command=</b> and <b>lprm=</b> lines " +"are not usually needed. Include them if you want to specify the exact path " +"for your print commands or if you need to pass any command-line parameters " +"to <c>lpr</c>. Use the above macros as an example. <b>%s</b> expands to the " +"temporary file name, <b>%p</b> expands to the printer name, and <b>%j</b> " +"expands to the job number." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):567 +msgid "" +"The <b>printer=</b> option, as you may guess, tells Samba which Unix printer " +"to print to. Make sure this printer is set up in raw mode. <b>public=yes</b> " +"allows even users with no password to connect to this printer. Eliminate " +"this option later if you want to tighten up security (you may want to " +"replace this line with a valid <b>users=</b> line to really tighten up " +"security). <b>printable=yes</b> tells Samba both that this share should be " +"configured as a printer, and to allow this share to accept print jobs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):577 +msgid "" +"After restarting Samba, you should be able to see the new printer from " +"Windows. At this point you should be able to install this printer on the " +"Windows side and fire off a test-page to your new, shared resource. (Windows " +"will tell you that you are installing a driver for the NULL printer. Don't " +"worry. Just select the correct printer driver from the list.) If for some " +"reason printing doesn't work, be sure to check <path>/var/log/log.smb</path> " +"for any error messages. I should also mention that there are tons of printer-" +"related <path>smb.conf</path> configuration options that you may find " +"useful. I've just touched on the most popular ones. Be sure to check out the " +"<path>smb.conf</path> main page to get familiar with all of them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):595 +msgid "Finishing up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):599 +msgid "" +"In this article we've covered the key elements of Samba functionality, " +"including sharing home directories and printing. I've also tried to " +"highlight several security-related parameters. But don't get the idea that " +"this is all there is to Samba. Samba is not only very powerful, but also " +"very configurable. It's designed to let you, the administrator, decide how " +"and to what extent it will be used in your organization. While quite a bit " +"of manual <path>smb.conf</path> configuration is involved in a Samba setup, " +"the results are well worth it because you can get everything working exactly " +"how you want." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):610 +msgid "" +"Samba has additional functionality that we haven't even touched on, " +"including the ability to become part of (or even control!) an entire Windows " +"NT domain. I encourage you to fully explore the potential of this extremely " +"powerful tool." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):619 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):623 +msgid "" +"Download Samba at the main <uri link=\"http://www.samba.org\">Samba</uri> " +"web site" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):627 +msgid "" +"<uri link=\"http://www.theknuddel.de/english/enfrgpasswd.html\">frgpasswrd</" +"uri> is a password synchronization utility to set Samba and shadow passwords " +"concomitantly" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):633 +msgid "" +"<uri link=\"http://www.spanware.com/\">SambaLink/Q</uri> is a version-" +"independent editor for the <path>smb.conf</path> file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):637 +msgid "See the Printing FAQ at <uri link=\"http://tldp.org\">tldp.org</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):640 +msgid "" +"Read <uri link=\"http://linuxguy.net/samba.htm\">Samba</uri> by Ed Weinberg." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):643 +msgid "" +"<e><uri link=\"http://www.oreilly.com/catalog/samba/\">Using Samba</uri></e> " +"(O'Reilly Publishing; 1999) is a comprehensive guide to Samba " +"administration, including such recent additions as integration with Windows " +"NT domains and the SWAT graphic configuration tool." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):649 +msgid "" +"Visit the <uri link=\"http://fi.samba.org/docs/swat_ssl.html\">SWAT</uri> " +"main page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):653 +msgid "" +"Check out <uri link=\"http://jazz.external.hp.com/src/samba/\">Samba/iX</" +"uri>, a suite of programs that allow an HP e3000 running MPE/iX operating " +"system to provide service using Microsoft's Message Block (SMB)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):658 +msgid "" +"Read <e><uri link=\"http://www.amazon.com/exec/obidos/ASIN/0672318628/" +"\">Samba Unleashed</uri></e>, by Steve Litt, with contributions from Daniel " +"Robbins." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/software-raid-p1.xml.po b/article/gettext/ru/software-raid-p1.xml.po new file mode 100644 index 0000000..fef4b6d --- /dev/null +++ b/article/gettext/ru/software-raid-p1.xml.po @@ -0,0 +1,625 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(guide:link):5 +msgid "/doc/en/articles/software-raid-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):6 +msgid "Software RAID in the new Linux 2.4 kernel, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by: Joshua Saddler (nightmorph@gentoo.org) +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(abstract):13 +msgid "" +"In his two-part series on the Linux 2.4 Software RAID, Daniel Robbins " +"introduces the new technology that's used to increase disk performance and " +"reliability by distributing data over multiple disks. This first installment " +"covers Software RAID setup (kernel and tools installation) and shows you how " +"to create linear and RAID-0 volumes." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(version):26 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(date):27 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):30 +msgid "Installation and a general introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):32 +msgid "The wonders of RAID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):35 +msgid "" +"The 2.4 kernel has a number of nifty features and additions. One of these is " +"the inclusion of a modern Software RAID implementation -- yay! Software RAID " +"allows you to dramatically increase Linux disk IO performance and " +"reliability without buying expensive hardware RAID controllers or " +"enclosures. Because it's implemented in software, Linux RAID software is " +"flexible, fast... and fun!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):44 +msgid "" +"The concept behind Software RAID is simple -- it allows you to combine two " +"or more block devices (usually disk partitions) into a single RAID device. " +"So let's say you have three empty partitions: <path>hda3</path>, <path>hdb3</" +"path>, and <path>hdc3</path>. Using Software RAID, you can combine these " +"partitions and address them as a single RAID device, <path>/dev/md0</path>. " +"<path>md0</path> can then be formatted to contain a filesystem and used like " +"any other partition. There are also a number of different ways to configure " +"a RAID volume -- some maximize performance, others maximize availability, " +"while others provide a mixture of both." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):57 +msgid "" +"There are two forms of RAID: linear and RAID-0 mode. Neither one is " +"technically a form of RAID at all, since RAID stands for \"redundant array " +"of inexpensive disks\", and RAID-0 and linear mode don't provide any kind of " +"data redundancy. However, both modes -- especially RAID-0 -- are very " +"useful. After giving you a quick overview of these two forms of \"AID\", " +"I'll step you through the process of getting Software RAID set up on your " +"system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):72 +msgid "Introduction to linear mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):76 +msgid "" +"Linear mode is one of the simplest methods of combining two or more block " +"devices into a RAID volume -- the method of simple concatenation. If you " +"have three partitions, <path>hda3</path>, <path>hdb3</path>, and <path>hdc3</" +"path>, and each is about 2GB, they will create a resultant linear volume of " +"6GB. The first third of the linear volume will reside on <path>hda3</path>, " +"the last third on <path>hdc3</path>, and the middle third on <path>hdb3</" +"path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):86 +msgid "" +"To configure a linear volume, you'll need at least two partitions that you'd " +"like to join together. They can be different sizes, and they can even all " +"reside on the same physical disk without negatively affecting performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):96 +msgid "Linear applications" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):99 +msgid "" +"Linear mode is the best way to combine two or more partitions on the same " +"disk into a single volume. While doing this with any other RAID technique " +"will result in a dramatic loss of performance, linear mode is saved from " +"this problem because it doesn't write to its constituent partitions in " +"parallel (as all the other RAID modes do). But for the same reason, linear " +"mode has the liability of lacking scale in performance compared to RAID-0, " +"RAID-4, RAID-5, and to some extent RAID-1." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):110 +msgid "" +"In general, linear mode doesn't provide any kind of performance improvement " +"over traditional non-RAID partitions. Actually, if you spread your linear " +"volume over multiple disks, your volume is more likely to become unavailable " +"due to a random hard drive failure. The probability of failure of a linear " +"volume will be equal to the sum of the probabilities of failure of its " +"constituent physical disks and controllers. If one physical disk dies, the " +"linear volume is generally unrecoverable. Linear mode does not offer any " +"additional redundancy over using a single disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):122 +msgid "" +"But linear mode is a great way to avoid repartitioning a single disk. For " +"example, say your second IDE drive has two unused partitions, <path>hdb1</" +"path> and <path>hdb3</path>. And say you're unable to repartition the drive " +"due to critical data hanging out at <path>hdb2</path>. You can still combine " +"<path>hdb1</path> and <path>hdb3</path> into a single, cohesive whole using " +"linear mode." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):131 +msgid "" +"Linear mode is also a good way to combine partitions of different sizes on " +"different disks when you just need a single big partition (and don't really " +"need to increase performance). But for any other job there are better RAID " +"technologies you can use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):143 +msgid "Introduction to RAID-0 mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):147 +msgid "" +"RAID-0 is another one of those \"RAID\" modes that doesn't have any \"R" +"\" (redundancy) at all. Nevertheless, RAID-0 is immensely useful. This is " +"primarily because it offers the highest performance potential of any form of " +"RAID." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):154 +msgid "" +"To set up a RAID-0 volume you'll need two or more equally (or almost " +"equally) sized partitions. The RAID-0 code will evenly distribute writes " +"(and thus reads) between all constituent partitions. And by parallelizing " +"reads and writes between all constituent devices, RAID-0 has the benefit of " +"multiplying IO performance. Ignoring the complexities of controller and bus " +"bandwidth, you can expect a RAID-0 volume composed of two partitions on two " +"separate identical disks to offer nearly double the performance of a " +"traditional partition. Crank your RAID-0 volume up to three disks, and " +"performance will nearly triple. This is why a RAID-0 array of IDE disks can " +"outperform the fastest SCSI or FC-AL drive on the market. For truly " +"blistering performance, you can set up a bunch of SCSI or FC-AL drives in a " +"RAID-0 array. That's the beauty of RAID-0." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):171 +msgid "" +"To create a RAID-0 volume, you'll need two or more equally sized partitions " +"located on separate disks. The capacity of the volume will be equal to the " +"combined capacity of the constituent partitions. As with linear mode, you " +"can combine block devices from various sources (such as IDE and SCSI drives) " +"into a single volume with no problems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):180 +msgid "" +"If you're creating a RAID-0 volume using IDE disks, you should try to use " +"UltraDMA compliant disks and controllers for maximum reliability. And you " +"should use only one drive per IDE channel to avoid sluggish performance -- a " +"slave device, especially if it's also part of the RAID-0 array, will slow " +"things down so much as to nearly eliminate any RAID-0 performance benefit. " +"You may also need to add an off-board IDE controller so that you have the " +"extra IDE channels you require." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):191 +msgid "" +"If you're creating a RAID-0 volume out of SCSI devices, be aware that the " +"combined throughput of all the drives can potentially exceed the maximum " +"throughput of the SCSI (and potentially PCI) bus. In such a case, the SCSI " +"bus will be the performance-limiting factor. If, for example, you have four " +"drives that have a maximum throughput of 15Mb/sec set up on a 40Mb/sec 68-" +"pin Ultra Wide bus, there will be times when the drives will saturate the " +"bus, and performance will reach an upper maximum of close to 40Mb/sec. This " +"may be fine for your application (after all, 40Mb/sec IO ain't bad!), but " +"you'd probably have identical peak IO performance from a RAID-0 volume that " +"used only three drives." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):208 +msgid "RAID-0 applications" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):211 +msgid "" +"From a reliability standpoint, RAID-0 has the same characteristics as linear " +"mode -- the more drives you add to the array, the higher the probability of " +"volume failure. And, like linear mode, the death of a single drive will " +"bring down the entire RAID-0 volume and make it unrecoverable. To figure out " +"the probability of failure of your RAID-0 volume, simply add together the " +"probabilities of failure of all constituent drives." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):221 +msgid "" +"RAID-0 is ideal for applications for which you need maximum IO performance, " +"since it's the highest-performing RAID mode available. But remember that " +"RAID-0 should only be used if you can tolerate a slightly higher risk of " +"volume failure." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):228 +msgid "" +"If you're putting together a compute farm or web cluster, RAID-0 is an " +"excellent way to increase disk IO performance. Since in this case you would " +"already have an existing level of redundancy (lots of spare machines), your " +"resources would continue to be available for the rare case that a machine " +"with a failed hard drive needs to be brought down for a drive replacement " +"and reload." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):242 +msgid "Setting up Linux 2.4 Software RAID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):246 +msgid "" +"There are two steps involved in getting your 2.4 system ready for Software " +"RAID. First, RAID support needs to be enabled in the kernel. This normally " +"involves recompiling and installing a new kernel unless you're already using " +"a 2.4 series kernel with RAID support compiled-in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):254 +msgid "" +"Then the raidtools package needs to be compiled and installed. The raidtools " +"are the user-level tools that allow you to initialize, start, stop, and " +"control your RAID volumes. Once these two steps are complete, you'll be able " +"to create your own RAID volumes, create filesystems on the volumes, mount " +"them, etc." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):265 +msgid "Kernel issues" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):268 +msgid "" +"I'm using kernel 2.4.0-test10 for this series. I recommend that you use the " +"most recent 2.4 kernel you can track down, which should at least be kernel " +"2.4.0-test10 or later (but not 2.4.0-test11, which had serious filesystem " +"corruption problems). You can find a recent kernel over at <uri link=" +"\"http://www.kernel.org\">kernel.org</uri>, and a tutorial showing you how " +"to recompile and install a new kernel from sources elsewhere on gentoo.org " +"(see the <uri link=\"#resources\">Resources</uri> section later in this " +"article)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):282 +msgid "Configuring the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):285 +msgid "" +"I recommend that you configure your kernel so that Software RAID support is " +"compiled-in, rather than supported as modules. When you type <c>make " +"menuconfig</c> or <c>make xconfig</c>, you'll find the Software RAID " +"settings under the \"Multi-device support (RAID and LVM)\" section. I also " +"recommend that you enable everything RAID-related here, including \"Boot " +"support\" and \"Auto Detect support\". This will allow the kernel to auto-" +"start your RAID volume at boot-time, as well as allow you to create a root " +"RAID filesystem if you so desire. Here's a snapshot of <c>make menuconfig</" +"c>. The last two options (LVM support) are not required, although I compiled " +"them into the kernel anyway:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(figure:link):300 +msgid "/images/docs/l-raid.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(figure:caption):300 +msgid "Configuring the kernel for RAID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):302 +msgid "" +"Once the kernel is properly configured, install it and reboot. Now let's " +"track down the latest version of raidtools." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):310 +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):329 +msgid "Installing raidtools" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):313 +msgid "" +"Before we can install raidtools we need to do a bit of searching to find the " +"latest version. You can generally find the raidtools program at <uri link=" +"\"http://www.kernel.org\">kernel.org</uri>. Now track down the most recent " +"\"raidtools-0.90\" archive (not \"raid0145\"!). Currently it's " +"\"raidtools-19990824-0.90.tar.gz\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):321 +msgid "" +"If you like living on the bleeding edge (and if you're using a 2.4.0-test " +"kernel, then you do), you may want to head over to RedHat (see <uri link=" +"\"#resources\">Resources</uri>) and snag the latest version of raidtools you " +"can find. Currently it's \"raidtools-dangerous-0.90-20000116.tar.gz\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):329 +#, no-wrap +msgid "" +"\n" +"# <i>cd raidtools-0.90</i>\n" +"# <i>./configure</i>\n" +"# <i>make</i>\n" +"# <i>make install</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):336 +msgid "Examining RAID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):336 +#, no-wrap +msgid "" +"\n" +"# <i>cat /proc/mdstat</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):343 +msgid "Partition setup" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):346 +msgid "" +"OK, now it's time to prepare some disk partitions, of which you'll need at " +"least two. If you're using RAID-0, make sure they're on separate disks and " +"approximately the same size. It goes without saying that the data on these " +"partitions will be destroyed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):353 +msgid "" +"One other important note -- when you create your partitions, give them the " +"partition type <c>FD</c>. This will allow the Linux kernel to recognize them " +"as Linux RAID partitions, so they will be autodetected and started at every " +"boot. If you don't mark your RAID partitions this way, you'll need to type " +"<c>raidstart --all</c> after every boot before you can mount your RAID " +"volumes. That can be annoying, so set the partition type correctly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):367 +msgid "/etc/raidtab setup" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):370 +msgid "" +"The raidtab syntax is fairly easy to figure out: each block of directives " +"begins with a <c>raiddev</c> entry specifying the RAID volume that will be " +"created. When you installed raidtools, the Makefile created <path>/dev/md0</" +"path> through <path>md15</path> for you, so they're available for use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):378 +msgid "" +"Next, <c>nr-raid-disks</c> should specify the number of disks in your array. " +"Then you set the <c>persistent-superblock</c> to <c>1</c>, telling the raid " +"tools that when this volume is created, a special superblock should be " +"written to each constituent device describing the configuration of the RAID " +"array. The Linux kernel uses this information to auto-detect and start up " +"RAID arrays at boot time, so you should make sure that every RAID volume you " +"create is configured to do this." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):389 +msgid "" +"<c>chunk-size</c> specifies the granularity of the chunks used for RAID-0 in " +"kilobytes. In this example, our RAID-0 volume will write to its constituent " +"partitions in 32K blocks; that is, the first 32K of the RAID volume maps to " +"<path>hde1</path>, the second 32K maps to <path>hdg1</path>, etc. We also " +"specify a chunk size for our <path>/dev/md1</path> linear volume -- this is " +"just a dummy entry and doesn't mean anything." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):399 +msgid "" +"Finally, you specify the devices that make up the volume. First you specify " +"the actual block device with a <c>device</c> line, and then you immediately " +"follow it with a <c>raid-disk</c> entry that specifies its position in the " +"array, starting with zero." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):406 +msgid "" +"Once you've created your own <path>/etc/raidtab</path> file, you're ready to " +"do a one-time initialization of the array." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):414 +msgid "mkraid and creating the filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):417 +msgid "" +"OK. Our partitions are created, the raidtab file is in place -- now it's " +"time to initialize our first partition by using the <c>mkraid</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):423 +msgid "Initializing the partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):423 +#, no-wrap +msgid "" +"\n" +"# <i>mkraid /dev/md0</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):427 +msgid "" +"After this command completes, <path>/dev/md0</path> will be initialized and " +"the md0 array will be started. If you type <c>cat /proc/mdstat</c>, you " +"should see something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):433 +msgid "cat /proc/mdstat" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):433 +#, no-wrap +msgid "" +"\n" +"Personalities : [linear] [raid0] [raid1] [raid5]\n" +"read_ahead 1024 sectors\n" +"md0 : active raid0 hdg1[1] hde1[0]\n" +" 90069632 blocks 32k chunks\n" +" \n" +"unused devices: <none>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):442 +msgid "" +"Yay! Our RAID device is up and running. All we need to do now is create a " +"filesystem on it. To do this, use the <c>mke2fs</c> command or the " +"<c>mkreiserfs</c> command (RAID-0 and ReiserFS is a great combination!):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):449 +msgid "An ext2 RAID device" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):449 +#, no-wrap +msgid "" +"\n" +"# <i>mke2fs /dev/md0</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):453 +msgid "or" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):457 +msgid "A ReiserFS RAID device" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):457 +#, no-wrap +msgid "" +"\n" +"# <i>mkreiserfs /dev/md0</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):461 +msgid "Now your new filesystem can be mounted:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):465 +msgid "Mounting the new RAID device" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):465 +#, no-wrap +msgid "" +"\n" +"# <i>mkdir /mnt/raid</i>\n" +"# <i>mount /dev/md0 /mnt/raid</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):470 +msgid "" +"Feel free to add a <path>/dev/md0</path> entry to your fstab. It goes " +"something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):475 +msgid "Editing fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):475 +#, no-wrap +msgid "" +"\n" +"/dev/md0 /mnt/raid reiserfs defaults 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):479 +msgid "" +"If you set the partition type correctly to <c>FD</c>, your RAID volume will " +"be auto-started at boot time. Now all that's left to do is use and enjoy " +"your new Software RAID volume. And catch my second Software RAID article, in " +"which we'll take a look at some more advanced Software RAID functionality " +"and RAID-1." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):491 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):495 +msgid "" +"Read <uri link=\"/doc/en/articles/software-raid-p2.xml\">Part 2</uri> in " +"Daniel's series on RAID, where he explains what software RAID-1, 4, and 5 " +"can and cannot do for you and how you should approach the implementation of " +"these RAID levels in a production environment." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):502 +msgid "" +"The <uri link=\"http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html\"> " +"Software-RAID HOWTO</uri> is another excellent resource for information " +"related to Linux Software RAID." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):508 +msgid "" +"You may want to check out the <uri link=\"http://www.tldp.org/HOWTO/Boot+Root" +"+Raid+LILO.html\"> Boot+Root+RAID+Lilo Software RAID HOWTO</uri> if you'd " +"like to learn how to create a root RAID filesystem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):514 +msgid "" +"For updated versions of raidtools-0.90, keep an eye on <uri link=\"http://" +"people.redhat.com/mingo/raid-patches/\"> people.redhat.com</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):519 +msgid "" +"Find a <uri link=\"http://www.kernel.org\">recent kernel</uri> in The Linux " +"Kernel Archives." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):524 +msgid "" +"Read Daniel's <uri link=\"/doc/en/articles/linux-kernel-compiling.xml" +"\">tutorial</uri> on compiling and installing a new kernel from sources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):529 +msgid "" +"Find the <uri link=\"http://people.redhat.com/mingo/raidtools/\"> raidtools " +"program</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):533 +msgid "" +"Snag the <uri link=\"http://people.redhat.com/mingo/raid-patches\"> latest " +"version of raidtools</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):537 +msgid "" +"Check out <uri link=\"http://linas.org/linux/raid.html\">more tips on " +"Software Raid solutions for Linux</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/ru/software-raid-p2.xml.po b/article/gettext/ru/software-raid-p2.xml.po new file mode 100644 index 0000000..ada5503 --- /dev/null +++ b/article/gettext/ru/software-raid-p2.xml.po @@ -0,0 +1,596 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: 2009-10-12 06:16+0400\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(guide:link):5 +msgid "/doc/en/articles/software-raid-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):6 +msgid "Software RAID in the new Linux 2.4 kernel, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by: Joshua Saddler (nightmorph@gentoo.org) +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(abstract):13 +msgid "" +"In this two-part series, Daniel Robbins introduces you to Linux 2.4 Software " +"RAID, a technology used to increase disk performance and reliability by " +"distributing data over multiple disks. In this article, Daniel explains what " +"software RAID-1, 4, and 5 can and cannot do for you and how you should " +"approach the implementation of these RAID levels in a production " +"environment. In the second half of the article, Daniel walks you through the " +"simulation of a RAID-1 failed drive replacement." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(version):29 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(date):30 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):33 +msgid "Setting up RAID-1 in a production environment" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):35 +msgid "Real-world RAID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):38 +msgid "" +"In my <uri link=\"/doc/en/articles/software-raid-p1.xml\">previous article</" +"uri>, I introduced you to Linux 2.4's software RAID functionality, showing " +"you how to set up linear, RAID-0, and RAID-1 volumes. In this article, we " +"look at what you need to know in order to use RAID-1 to increase " +"availability in a production environment. This requires a lot more " +"understanding and knowledge than just setting up RAID-1 on a test server or " +"at home -- specifically, you'll need to know exactly what RAID-1 will " +"protect you against, and how to keep your RAID volume up and running in case " +"of a disk failure. In this article, we'll cover these topics, starting with " +"an overview of what RAID-1, 4, and 5 can and can't do for you, and ending " +"with a complete test simulation of a failed RAID 1 drive replacement -- " +"something that you should actually do (with this article as your guide) if " +"at all possible. After going through the simulation, you'll have all the " +"experience you need to handle a RAID-1 failure in a real-world environment." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):60 +msgid "What RAID doesn't do" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):63 +msgid "" +"The fault-tolerant features of RAID are designed to protect you from the " +"negative impacts of a spontaneous complete drive failure. That's a good " +"thing. But RAID isn't a perfect fix for every kind of reliability problem. " +"Before implementing a fault-tolerant form of RAID (1,4,5) in a production " +"environment, it's extremely important that you know exactly what RAID will " +"and <b>will not</b> do for you. When we're in a situation where we're " +"depending on RAID to perform, we don't want to make any false assumptions " +"about what it does. Let's start by dispelling common myths about RAID 1, 4, " +"and 5." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):75 +msgid "" +"A lot of people think that if they place all their important data on a RAID " +"1/4/5 volume, then they won't have to perform regular backups. This is " +"completely false -- here's why. RAID 1/4/5 helps to protect against " +"unplanned <e>downtime</e> caused by a random drive failure. However, it " +"offers no protection against accidental or malicious <e>data corruption</e>. " +"If you type <c>cd /; rm -rf *</c> as root on a RAID volume, you'll lose a " +"lot of very important data in a matter of seconds, and the fact that you " +"have a 10 drive RAID-5 configuration will be of little significance. Also, " +"RAID won't help you if your server is physically stolen or if there's a fire " +"in your building. And of course, if you don't implement a backup strategy, " +"you won't have an archive of past data -- if someone in your office deletes " +"a bunch of important files, you won't be able to recover them. That alone " +"should be enough to convince you that, in most circumstances, you should " +"plan and implement a backup strategy <e>before</e> even thinking about " +"tackling RAID-1, 4, or 5." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):94 +msgid "" +"Another mistake is to implement software RAID on a system composed of low-" +"quality hardware. If you're putting together a server that's going to do " +"something important, it makes sense to purchase the highest-quality hardware " +"that's still comfortably within your budget. If your system is unstable or " +"improperly cooled, you'll run into problems that RAID can't solve. On a " +"similar note, RAID obviously can't give you any additional uptime in the " +"case of a power outage. If your server is going to be doing anything " +"relatively important, make sure that it's been equipped with an " +"uninterruptible power supply (UPS)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):106 +msgid "" +"Next, we move on to filesystem issues. The filesystem exists \"on top\" of " +"your software RAID volume. This means that using software RAID does not " +"allow you to escape filesystem issues, such as long and potentially " +"problematic <c>fsck</c>s if you happen to be using a non-journalled or flaky " +"filesystem. So, software RAID isn't going to make the ext2 filesystem more " +"reliable; that's why it's so important that the Linux community has " +"ReiserFS, as well as JFS and XFS in the works. Software RAID and a reliable " +"journalling filesystem make a great combination." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):120 +msgid "RAID - intelligent implementation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):123 +msgid "" +"Hopefully, the previous section dispelled any RAID myths that you might have " +"had. When you implement RAID-1, 4, or 5, it's very important that you view " +"the technology as something that will enhance <e>uptime</e>. When you " +"implement one of these RAID levels, you're protecting yourself against a " +"very specific situation -- a spontaneous complete (single or multiple) drive " +"failure. If you experience this situation, software RAID will allow the " +"system to continue running, while you make arrangements to replace the " +"failed drive with a new one. In other words, if you implement RAID 1, 4, or " +"5, you'll be reducing your risk of having a long, unplanned downtime due to " +"a complete drive failure. Instead, you can have a short planned downtime -- " +"just enough time to replace the dead drive. Obviously, this means that if " +"having a highly-available system isn't a priority for you, then you " +"shouldn't be implementing software RAID, unless you plan to use it primarily " +"as a way to boost file I/O performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):141 +msgid "" +"A smart system administrator uses software RAID for a specific purpose -- to " +"improve the reliability of an already very reliable server. If you're a " +"smart sysadmin, you've already covered the basics. You've protected your " +"organization against catastrophe by implementing a regular backup plan. " +"You've hooked your server up to a UPS, and have the UPS monitoring software " +"up and running so that your server will shut down safely in the case of an " +"extended power outage. Maybe you're using a journalling filesystem such as " +"ReiserFS to reduce <c>fsck</c> time and increase filesystem reliability and " +"performance. And hopefully, your server is well-cooled and is composed of " +"high-quality hardware, and you've paid close attention to security issues. " +"Now, and only now, should you consider implementing software RAID-1, 4 or 5 " +"-- by doing so, you'll potentially give your server a few more percentage " +"points of uptime by guarding it against a complete drive failure. Software " +"RAID is that added layer of protection that makes an already rugged server " +"even better." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):165 +msgid "A RAID-1 walkthrough" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):169 +msgid "" +"Now that you've read about what RAID can and can't do, I hope you have " +"reasonable expectations and the right attitude. In this section, I'll walk " +"you through the process of simulating a disk failure, and then bringing your " +"RAID volume back out of degraded mode. If you're have the ability to set up " +"a RAID-1 volume on a test machine and follow along with me, I highly " +"recommend that you do so. This kind of simulation can be fun. And having a " +"little fun right now will help to ensure that when a drive really fails, " +"you'll be calm and collected, and know exactly what to do." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(impo):181 +msgid "" +"To perform this test, it's essential that you set up your RAID-1 volume so " +"that you can still boot your Linux system with one hard drive unplugged, " +"because this is how we're going to simulate a drive failure." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):187 +msgid "" +"OK, our first step is to set up a RAID-1 volume; refer to my <uri link=\"/" +"doc/en/articles/software-raid-p1.xml\">previous article</uri> if you need a " +"refresher on how to do this. Once you've set up your volume, you'll see " +"something like this if you <c>cat /proc/mdstat</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):194 +msgid "Examining the RAID volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):194 +#, no-wrap +msgid "" +"\n" +"# <i>cat /proc/mdstat</i>\n" +"Personalities : [linear] [raid0] [raid1] [raid5] \n" +"read_ahead 1024 sectors\n" +"md0 : active raid1 ide/host2/bus0/target0/lun0/part1[1] ide/host0/bus0/target0/lun0/part5[0]\n" +" 4610496 blocks [2/2] [UU]\n" +" [======>..............] resync = 34.8% (1606276/4610496) finish=3.2min speed=15382K/sec\n" +"\n" +"unused devices: <none>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):205 +msgid "" +"Note that I'm using devfs, and that's why you see the extremely long device " +"names listed above. I'm actually using <path>/dev/hda5</path> and <path>/dev/" +"hde1</path> as my RAID-1 disks. At the moment, the kernel software RAID code " +"is synchronizing the drives so that they're exact mirrors of each other. If " +"your RAID-1 volume is at this point, you can go ahead and create a " +"filesystem on the volume, and then mount it somewhere. Copy some files over " +"to it, and then set up your <path>/etc/fstab</path> so that the volume " +"(<path>/dev/md0</path>) will be mounted when your system boots. Here's the " +"line I added to my fstab; yours may differ slightly:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):218 +msgid "fstab information" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):218 +#, no-wrap +msgid "" +"\n" +"/dev/md0 /mnt/raid1 reiserfs defaults 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):222 +msgid "" +"OK; we're almost ready to simulate a drive failure, but not quite. First, " +"<c>cat /proc/mdstat</c> again, and wait until all your volume's disks are " +"synchronized. When they are, your <path>/proc/mdstat</path> will look like " +"this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):229 +msgid "Re-examining the RAID volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):229 +#, no-wrap +msgid "" +"\n" +"# cat /proc/mdstat \n" +"Personalities : [linear] [raid0] [raid1] [raid5] \n" +"read_ahead 1024 sectors\n" +"md0 : active raid1 ide/host2/bus0/target0/lun0/part1[1] ide/host0/bus0/target0/lun0/part5[0]\n" +" 4610496 blocks [2/2] [UU]\n" +" \n" +"unused devices: <none>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):242 +msgid "The simulation begins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):245 +msgid "" +"OK, now that the resync is complete, we're ready for the simulation. Go " +"ahead and shut down your machine and power it down. Then, open it up and " +"unplug one of the hard disks that make up your RAID-1 array. Of course, you " +"won't want to unplug the disk that contains your Linux root partition -- " +"we'll need to boot Linux again! OK, now that the hard drive is unplugged, " +"bring the machine back up. Once you log in, you should find that <path>/dev/" +"md0</path> is mounted and that you're still able to use the volume. When you " +"<c>cat /proc/mdstat</c>, you'll see the major change:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):258 +msgid "Missing a disk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):258 +#, no-wrap +msgid "" +"\n" +"# <i>cat /proc/mdstat</i>\n" +"Personalities : [linear] [raid0] [raid1] [raid5]\n" +"read_ahead 1024 sectors\n" +"md0 : active raid1 ide/host0/bus0/target0/lun0/part5[0]\n" +" 4610496 blocks [2/1] [U_]\n" +" \n" +"unused devices: <none>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):268 +msgid "" +"Here, you can see that my <path>/dev/md0</path> volume is running in " +"degraded mode. I unplugged drive <path>/dev/hde</path>, so <path>/dev/hde1</" +"path> wasn't found when the kernel booted and tried to autostart my array. " +"Fortunately, the kernel found <path>/dev/hda5</path>, and <path>/dev/md0</" +"path> was able to start in degraded mode. As you can see, the <path>/dev/" +"hde1</path> partition isn't listed in <path>/proc/mdstat</path>, and one of " +"the RAID disks is marked as \"down\" (<c>[U_]</c> instead of <c>[UU]</c>). " +"But hey, since <path>/dev/md0</path> is still going, software RAID-1 is " +"doing what it's supposed to do: keeping our data available." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):285 +msgid "Recovery" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):288 +msgid "" +"Right now, we're experiencing a simulated drive failure. If the drive that " +"currently doesn't have power actually failed while the system was running, " +"this is the kind of situation we'd be in. Our RAID-1 volume would be running " +"in degraded mode, meaning that our volume is still available but without any " +"redundancy. At a convenient time, we'd want to shut down the system, replace " +"the failed drive, and start the system back up again. Our RAID-1 volume " +"would still be running in degraded mode at this point." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):299 +msgid "" +"Once we have the new drive in the machine, we'd want to create a RAID " +"autodetect (<c>FD</c>) partition of the appropriate size on our new disk. An " +"additional reboot may be needed so that Linux can reread the disk's " +"partition tables. Once the new partition is visible to the system, we're " +"ready to restore our degraded RAID-1 array -- then, we'll have some " +"redundancy again." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):308 +msgid "" +"Of course, we're only performing a simulation. To practice adding a " +"partition back into our RAID array, we can do one of two things, depending " +"on what kind of scenario you'd like to prepare or. You can either shut down " +"your machine, plug the drive in, boot it up, and add the old partition back " +"to the array, or you can shut down your machine, plug the drive in, boot up, " +"wipe the drive, create a <e>new</e> RAID autodetect (<c>FD</c>) partition to " +"add the array (of the correct size, of course -- at least as big as the " +"partition it's replacing) and then add this brand-new partition to the " +"array. The second choice would be closer to what would happen in the event " +"of a real drive failure, while the first would simulate something like a " +"failed disk controller or bad cable situation -- where one of your mirror " +"drives was temporarily unavailable, causing <path>/dev/md0</path> to run in " +"degraded mode, and requiring one of the partitions to be added back to the " +"volume after the problem was remedied. Whichever simulation you choose to " +"do, the \"fix\" is the same -- after the new partition is ready, we need to " +"manually add it back to the <path>/dev/md0</path> volume." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):332 +msgid "Looking at dmesg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):335 +msgid "" +"Before we add the partition back to our array, this would be a good time to " +"take a look at our kernel boot messages. If you type <c>dmesg | more</c>, " +"you'll be able to view the kernel boot messages. You should see a bunch of " +"text similar to this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):342 +msgid "Kernel boot messages" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):342 +#, no-wrap +msgid "" +"\n" +"linear personality registered\n" +"raid0 personality registered\n" +"raid1 personality registered\n" +"raid5 personality registered\n" +"raid5: measuring checksumming speed\n" +" 8regs : 1291.209 MB/sec\n" +" 32regs : 1195.197 MB/sec\n" +" pII_mmx : 2110.740 MB/sec\n" +" p5_mmx : 2652.522 MB/sec\n" +"raid5: using function: p5_mmx (2652.522 MB/sec)\n" +"md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27\n" +"md.c: sizeof(mdp_super_t) = 4096\n" +"autodetecting RAID arrays\n" +"(read) ide/host0/bus0/target0/lun0/part5's sb offset: 4610560 [events: 00000004]\n" +"(read) ide/host2/bus0/target0/lun0/part1's sb offset: 4610496 [events: 00000002]\n" +"autorun ...\n" +"considering ide/host2/bus0/target0/lun0/part1 ...\n" +" adding ide/host2/bus0/target0/lun0/part1 ...\n" +" adding ide/host0/bus0/target0/lun0/part5 ...\n" +"created md0\n" +"bind<ide/host0/bus0/target0/lun0/part5,1>\n" +"bind<ide/host2/bus0/target0/lun0/part1,2>\n" +"running: <ide/host2/bus0/target0/lun0/part1><ide/host0/bus0/target0/lun0/part5>\n" +"now!\n" +"ide/host2/bus0/target0/lun0/part1's event counter: 00000002\n" +"ide/host0/bus0/target0/lun0/part5's event counter: 00000004\n" +"md: superblock update time inconsistency -- using the most recent one\n" +"freshest: ide/host0/bus0/target0/lun0/part5\n" +"md: kicking non-fresh ide/host2/bus0/target0/lun0/part1 from array!\n" +"unbind<ide/host2/bus0/target0/lun0/part1,1>\n" +"export_rdev(ide/host2/bus0/target0/lun0/part1)\n" +"md0: max total readahead window set to 124k\n" +"md0: 1 data-disks, max readahead per data-disk: 124k\n" +"raid1: device ide/host0/bus0/target0/lun0/part5 operational as mirror 0\n" +"raid1: md0, not all disks are operational -- trying to recover array\n" +"raid1: raid set md0 active with 1 out of 2 mirrors\n" +"md: updating md0 RAID superblock on device\n" +"ide/host0/bus0/target0/lun0/part5 [events: 00000005](write) ide/host0/bus0/target0/lun0/part5's sb offset: 4610560\n" +"md: recovery thread got woken up ...\n" +"md0: no spare disk to reconstruct array! -- continuing in degraded mode\n" +"md: recovery thread finished ...\n" +"..\n" +".... autorun DONE.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):388 +msgid "" +"Now would be a good time to carefully read these messages, because they'll " +"help you to understand the process that the kernel uses to autostart <path>/" +"dev/md0</path>, giving you another valuable insight into the inner workings " +"of Linux software RAID. If you read the kernel output listed above, you'll " +"find that my kernel found <path>/dev/hda5</path> and <path>/dev/hde1</path>, " +"but <path>hde1</path> was out of sync with <path>hda5</path>. So, the kernel " +"started up <path>/dev/md0</path> in degraded mode, using <path>/dev/hda5</" +"path> and not touching <path>/dev/hde1</path> at all. Now, it's time to add " +"our original (or newly created) partition to our volume. Here's how." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):405 +msgid "Restoration continues" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):408 +msgid "" +"First, if your replacement partition has a new device name, update <path>/" +"etc/raidtab</path> so that it reflects this new information. Then, add the " +"new partition to the volume using the following command, replacing <path>/" +"dev/hde1</path> with the device name of the partition you're adding:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):416 +msgid "Adding the new device" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):416 +#, no-wrap +msgid "" +"\n" +"# <i>raidhotadd /dev/md0 /dev/hde1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):420 +msgid "" +"Your hard drive lights should begin glowing as reconstruction begins. Go " +"ahead and <c>cat /proc/mdstat</c> to check the status of the RAID-1 " +"reconstruction that's now in progress:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):426 +msgid "Check the status of the RAID-1 reconstruction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):426 +#, no-wrap +msgid "" +"\n" +"# <i>cat /proc/mdstat</i>\n" +"Personalities : [linear] [raid0] [raid1] [raid5] \n" +"read_ahead 1024 sectors\n" +"md0 : active raid1 ide/host2/bus0/target0/lun0/part1[2] ide/host0/bus0/target0/lun0/part5[0]\n" +" 4610496 blocks [2/1] [U_]\n" +" [>....................] recovery = 1.8% (84480/4610496) finish=3.5min speed=21120K/sec\n" +"unused devices: <none>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):436 +msgid "In a matter of minutes, your RAID-1 volume will be back to normal:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):440 +msgid "The normal RAID volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):440 +#, no-wrap +msgid "" +"\n" +"# <i>cat /proc/mdstat</i>\n" +"Personalities : [linear] [raid0] [raid1] [raid5] \n" +"read_ahead 1024 sectors\n" +"md0 : active raid1 ide/host2/bus0/target0/lun0/part1[1] ide/host0/bus0/target0/lun0/part5[0]\n" +" 4610496 blocks [2/2] [UU]\n" +" \n" +"unused devices: <none>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):450 +msgid "" +"Voila! We've successfully recovered from a simulated drive failure, and " +"you're ready to start using RAID-1 in a production environment. You can now " +"affix your homemade \"RAID-1 certified\" sticker to your forehead and begin " +"flapping your arms and running around the office to the delight of your " +"coworkers. Actually, maybe that isn't such a great idea. See you in the next " +"article." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):462 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):466 +msgid "" +"Read <uri link=\"/doc/en/articles/software-raid-p1.xml\">Part 1</uri> in " +"Daniel's series on RAID, where he introduces Linux 2.4's software RAID " +"functionality and shows how to set up linear, RAID-0, and RAID-1 volumes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):473 +msgid "" +"The <uri link=\"http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html\"> " +"Software-RAID HOWTO</uri> is another excellent resource for information " +"related to Linux Software RAID." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):479 +msgid "" +"You may want to check out the <uri link=\"http://www.tldp.org/HOWTO/Boot+Root" +"+Raid+LILO.html\"> Boot+Root+RAID+Lilo Software RAID HOWTO</uri> if you'd " +"like to learn how to create a root RAID filesystem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):485 +msgid "" +"For updated versions of raidtools-0.90, keep an eye on <uri link=\"http://" +"people.redhat.com/mingo/raid-patches/\"> people.redhat.com</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):490 +msgid "" +"Find a <uri link=\"http://www.kernel.org\">recent kernel</uri> in The Linux " +"Kernel Archives." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):495 +msgid "" +"Read Daniel's <uri link=\"/doc/en/articles/linux-kernel-compiling.xml" +"\">tutorial</uri> on compiling and installing a new kernel from sources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):500 +msgid "" +"Find the <uri link=\"http://people.redhat.com/mingo/raidtools/\"> raidtools " +"program</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):504 +msgid "" +"Snag the <uri link=\"http://people.redhat.com/mingo/raid-patches\"> latest " +"version of raidtools</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):508 +msgid "" +"Check out <uri link=\"http://linas.org/linux/raid.html\">more tips on " +"Software Raid solutions for Linux</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(None):0 +msgid "translator-credits" +msgstr "" diff --git a/article/gettext/samba-p1.xml.pot b/article/gettext/samba-p1.xml.pot new file mode 100644 index 0000000..88f7aeb --- /dev/null +++ b/article/gettext/samba-p1.xml.pot @@ -0,0 +1,283 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(guide:link):5 +msgid "/doc/en/articles/samba-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):6 +msgid "Introduction to Samba, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(abstract):15 +msgid "Samba is an incredible tool for anyone who uses both Unix and Windows. By implementing the SMB/CIFS protocol for Unix, Samba allows Unix systems to share their resources with standard Windows clients. In this introductory article, Daniel Robbins introduces you to what Samba can do. The focus will be on key concepts. (He'll step you through the setup process in his next article.) By the end of this article, you'll have a good understanding of what Samba does, and how it goes about doing it." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This document +#. is an updated version of the original article, and contains various improvements +#. made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(version):30 +msgid "1.0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(date):31 +msgid "2005-10-06" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):34 +msgid "Key concepts" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):36 +msgid "Show me Samba" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):39 +msgid "First, I'm going to show you a bunch of screenshots from one of my Windows NT boxes named kompressor. These screenshots demonstrate what a fully-configured Samba system looks like from the Windows side. They'll give you a real-world grasp of what Samba can do." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):46 +msgid "I currently have three machines set up on my internal LAN:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):51 +msgid "<b>ntbox</b> (a Windows NT Workstation)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):52 +msgid "<b>freebox</b> (a FreeBSD server)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):53 +msgid "<b>kompressor</b> (the Windows NT Workstation that I use as my primary desktop)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):59 +msgid "In this environment, I use Samba extensively to share files, print, and even run Windows applications directly from freebox (Unix). Here's a screenshot showing the contents of kompressor's Network Neighborhood:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(figure:link):66 +msgid "/images/docs/l-samba-1.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(figure:caption):66 +msgid "kompressor's Network Neighborhood" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):68 +msgid "As you can see, both ntbox and kompressor are visible, which is no surprise since they are both NT Workstations. What is rather unusual, however, is the fact that I can see freebox as well. Because freebox is running Samba, I can see it under Network Neighborhood on every Windows machinethat is part of my \"GENTOO\" Windows workgroup." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):76 +msgid "Now it's time to take a look at what's \"inside\" freebox. The following window pops up after double-clicking on the freebox icon:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(figure:link):82 +msgid "/images/docs/l-samba-2.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(figure:caption):82 +msgid "SMB/CIFS shares on freebox" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):84 +msgid "In this window you can see a bunch of what are called \"shares\". More specifically, they're called SMB/CIFS shares and contain parts of freebox's file system that are accessible through the network." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(note):90 +msgid "I should mention that SMB stands for Server Message Block, the original name for the protocol used to share files on Windows. CIFS stands for the Common Internet File System, Microsoft's new acronym describing the more recent version of this protocol." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):97 +msgid "On freebox, Samba has been specifically configured to create only those particular shares that you see above. The drobbins share contains the contents of my home directory. I like to store all my files on freebox (under Unix) to keep things centralized and easy to manage. One of the wonderful things about Samba is that it allows administrators to centralize the storage of user files rather than providing each user with two separate file locations for Windows and Unix." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):110 +msgid "Samba printing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):113 +msgid "In addition to standard shares (which act as virtual directories), you can also see a printer share called nec. Another really great feature of Samba is that you can share printers the same way you can from any Windows machine. Nec is my NEC SuperScript 870 laser printer, which is hooked up to freebox and set up as a standard Unix lpd-based printer. Samba allows this printer to be used by Windows clients just like a standard Windows network printer would." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):122 +msgid "You may be wondering how the printer driver situation is handled since the printer is running under Unix. Good question. On freebox, nec is set up as a standard, parallel port-based printer running in \"raw\" mode. In other words, any print jobs sent to nec are handed directly to the printer as is, without any filtering or data massaging." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):130 +msgid "On kompressor, nec is configured as an NEC SuperScript 870 network printer. When I print to it, the local NT printer driver generates the appropriate binary data for nec, which is then automatically spooled over the network to Samba running on freebox. Samba then automatically inserts this data untouched into nec's queue, and my printer begins printing the job." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):138 +msgid "I should note that unfortunately my NEC SuperScript 870 is not a Postscript printer; it uses Adobe's proprietary PrintGear technology. While my printer is not fully supported under Unix, it still works perfectly when printing from Windows (this is because all the printer-specific data is generated on the Windows side, using the Windows driver). Ironically, since GhostScript (a freely-available PostScript-compatible interpreter available for Unix) does not know how to produce PrintGear output, I can only print plain ASCII text or 300 dpi PCL4-based documents from the Unix side; but from the Windows side, the Windows NT driver allows me to print at a full 600 dpi. I don't find this cumbersome at the moment because I do most of my printing from Windows. Although in the future it would be nice to have a printer that has Postscript built-in so that I can use the printer's full functionality from Unix as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):156 +msgid "Samba shares" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):159 +msgid "OK, now it's time to move on to the next screen shot. This one illustrates the contents of the drobbins share on freebox, which is configured to share my Unix home directory. All the files listed in the window actually reside on freebox but are directly accessible from my Windows NT client machines. Being able to integrate Windows and Unix is wonderful stuff!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(figure:link):168 +msgid "/images/docs/l-samba-3.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(figure:caption):168 +msgid "My home directory on freebox, accessed from kompressor" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):173 +msgid "Understanding Samba" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):176 +msgid "To show you more about how Samba works internally, I'm going to give you a very simplified explanation of what happened behind the scenes when I poked around in the Network Neighborhood. I should first explain something about my current Windows session. Since I am running Windows NT Workstation, I had to log in to gain access to the machine. For this NT session I logged in to the local machine with the username \"Administrator\" and the password \"mypass\". If I were running Windows 95 or 98, the standard Windows networking drivers would have asked me for a username or password as well. Under Windows 95 and 98, this password isn't really used to determine who can access the local machine; rather, it is cached and used to connect to network resources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):189 +msgid "Of course, Windows NT is extremely secure compared to Windows 95 and 98 and will not allow you to use the machine unless you supply a valid username and password. After kompressor validated my username and password against its local security database, it allowed me to begin using Windows. Kompressor will also use my username and password to try to automatically authenticate itself when I connect to password-protected network resources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):201 +msgid "Browsing the network" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):204 +msgid "When I clicked on Network Neighborhood, a window containing a list of all Windows-compatible machines on my network popped up. For this to happen, kompressor contacted freebox behind the scenes to obtain a \"browse list\" of all the Windows-compatible machines on the current subnet. Kompressor contacted freebox because I configured freebox's Samba so that it would become \"local master browser\" on my network (which means that freebox manages the list of network resources that appear in Network Neighborhood)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):214 +msgid "The next thing I did was double-click on freebox, which caused a new window to appear and display all of the shares on freebox. For kompressor to receive this information it connected to a special hidden share on freebox (called IPC$) as the guest user, and downloaded the names and types of all the available shares. In the next article, when we configure Samba, we will need to put an option in Samba's configuration file that specifies which Unix account is equivalent to NT's \"guest\" user. If this isn't set up correctly, you will not be able to browse any of the resources on a Samba machine. This is also worth mentioning because it shows that you don't need any special permission to view the SMB/CIFS shares on a Samba server, noteworthy for security purposes." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):227 +msgid "I was now able to click on the drobbins share to display the contents of my home directory. While this happened automatically and without any fuss, it's important to understand the hidden conversation between freebox and kompressor that ultimately granted me access to the drobbins share. But before we get into that, let's quickly discuss some Samba security issues." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):238 +msgid "Samba security" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):241 +msgid "When I configured Samba I set up the drobbins share to be password protected; even though I'm on my own private LAN, I still like to keep things locked down to a certain extent. At the same time I set up two Samba users: drobbins and administrator. I set their passwords to match those on my NT Workstations for consistency. For the drobbins share, my security policy is as follows: if you are a valid Samba user, and you supply the correct password for that user, you will be allowed access to the drobbins share. So, both administrator and drobbins will be granted access as long as the user also supplies the correct password for their account." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):253 +msgid "Now, back to the conversation between freebox and kompressor. Because I logged in as administrator, double-clicking on the drobbins share caused Windows NT to automatically try to authenticate me to Samba by sending the username \"administrator\" and the password \"mypass\" to freebox. Samba then checked these values against its internal security database (which is separate from the standard Unix <c>passwd</c> database), thereby verifying the username and password. After seeing that the username/password combo checked out, Samba granted me access." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):264 +msgid "You may be wondering why Samba has its own unique password database. Why doesn't it just use the standard Unix password to authenticate the administrator user? While it used to be possible to do this when Windows transmitted passwords in plain-text, all modern versions of Windows now transmit SMB/CIFS passwords in an encrypted form that is not compatible with the standard Unix password hash. In other words, there is no way for Samba to use the standard Unix <c>passwd</c> hash to verify that a Windows encrypted password is correct. Fortunately, Samba provides numerous ways to synchronize these two databases so that a system administrator's life doesn't get too confusing." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):279 +msgid "Samba from the Unix side" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):282 +msgid "Now that we've seen Samba from the Windows side, it's time to take a look at Samba from the Unix side. First some general information. The main Web site for Samba is <uri>http://fi.samba.org</uri>, and the current production version of Samba is 2.0.7, as of April 25, 2000, which we will be using in this series. Since some of you may be installing Samba from RPM, others may be trying to get Samba to run under FreeBSD or Solaris (rather than Linux), and a good number of you may be compiling Samba from scratch, there is likely to be some variability in file locations. (Samba's default file locations are configurable at compile-time.) On some systems certain files will be in <path>/usr/local/</path>, while on other systems they may end up somewhere else. I will be referring to configuration files by their filename (rather than their full path) to avoid any inconsistencies." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):297 +msgid "If you compile and install Samba from the original sources, Samba's configuration file can be found at <path>/usr/local/samba/etc/smb.conf</path>. However, if you install the software from binary RPM or another Linux packaging format, you'll likely find <path>smb.conf</path> in <path>/etc</path>. This all gets confusing very fast. In order to make things easier I'll review the locations of files when Samba is compiled from sources and everything is installed into its default location in <path>/usr/local/samba</path>. Please note that the purpose of this section is simply to get you familiar with the Unix-side configuration of Samba and is not intended to step you through the compilation process, which will be covered in the next article. Right now we're just getting you warmed up! Here are the default locations of files after a clean Samba compile and install:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):312 +msgid "<path>/usr/local/samba/bin</path> contains all the Samba binary executables. In 2.0.7, the main Samba executables are called <c>smbd</c> and <c>nmbd</c>. <c>smbd</c> is designed to provide SMB/CIFS file-sharing services, while <c>nmbd</c> performs WINS-related functions by facilitating IP address lookups for NetBIOS names. There are also a host of other utilities, including <c>smbclient</c>, an ftp-like tool that can be used to connect and interact with SMB/CIFS shares, and <c>testparm</c>, a handy utility that checks to make sure that Samba's main configuration file has correct syntax." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):323 +msgid "<path>/usr/local/samba/etc</path> contains <path>smb.conf</path>, the main Samba configuration file. <path>smb.conf</path> is a very important file, containing almost all of Samba's configuration options. In this file you'll find settings to control global Samba functionality as well as configuration options to enable the sharing of specific directory trees and printers. As you gain experience with Samba, you'll supplement your <path>smb.conf</path> file with additional configuration options that fine-tune Samba to your particular site." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):333 +msgid "One of the major complaints about Samba is that the smb.conf file has a relatively high learning curve. While this is true, remember that Samba is not just a simple network file sharing program. It has the responsibility of sensibly integrating two significantly different systems: Windows and Unix. Sometimes the configuration process will seem tricky, but do not fear. When you have everything working perfectly, it will all be worth it!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):342 +msgid "<path>/usr/local/samba/private</path> contains <path>smbpasswd</path>, Samba's encrypted password file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(note):347 +msgid "In <path>smb.conf</path>, Samba can be configured so that it will only listen for connections on particular network interfaces or accept connections only from particular subnets or IP addresses. These methods can be used to enhance security even further." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):354 +msgid "I mentioned earlier that Samba has its own password store that is unique from the standard Unix <c>passwd</c> database. In the <path>smbpasswd</path> file Samba stores all users and workstations (and their associated passwords) that are allowed to access Samba's shares. Individual shares can be further locked down to particular users and groups. To modify the <path>smbpasswd</path> file, the identically-named binary executable <c>smbpasswd</c> is used." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):363 +msgid "<path>/usr/local/samba/var</path> contains Samba's two log files, <path>log.smb</path> and <path>log.nmb</path>. As you may have guessed, <path>log.smb</path> is the log file for <c>smbd</c> while <path>log.nmb</path> is <c>nmbd</c>'s log file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):370 +msgid "<path>/usr/local/samba/swat</path> contains files used for SWAT. SWAT is the Samba Web Administration Tool, and is a neat little web application that allows administrators to remotely manage their Samba network. We won't be covering SWAT in this series, but you can find more information on SWAT in SWAT's main page (see <uri link=\"#resources\">Resources</uri>)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):381 +msgid "What's next" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(p):384 +msgid "We've covered a lot of Samba's key functionality and key concepts. We've also seen an overview of Samba's Unix-side file structure. In my next article I'll walk you through the process of setting up Samba on your own system. Unlike this article, which focused more on concepts, the <uri link=\"/doc/en/articles/samba-p2.xml\">next article</uri> will have more of a HOWTO style. Now that we've covered key concepts, it's time to pick up the pace. See you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(title):398 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):402 +msgid "The main <uri link=\"http://fi.samba.org\">Samba</uri> web site" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):403 +msgid "<uri link=\"http://linuxguy.net/samba.htm\">Samba</uri> by Ed Weinberg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):404 +msgid "<e><uri link=\"http://www.amazon.com/exec/obidos/ASIN/0672318628/\">Samba Unleashed</uri></e>, by Steve Litt, with contributions from Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):408 +msgid "<e><uri link=\"http://www.oreilly.com/catalog/samba/\">Using Samba</uri></e> (O'Reilly Publishing; 1999)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):412 +msgid "<uri link=\"http://jazz.external.hp.com/src/samba/\">Samba/iX</uri>: Samba support on MPE/iX 6.0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(li):416 +msgid "The <uri link=\"http://fi.samba.org/docs/swat_ssl.html\">SWAT</uri> main page" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/samba-p2.xml.pot b/article/gettext/samba-p2.xml.pot new file mode 100644 index 0000000..4f7b1fd --- /dev/null +++ b/article/gettext/samba-p2.xml.pot @@ -0,0 +1,525 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(guide:link):5 +msgid "/doc/en/articles/samba-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):6 +msgid "Introduction to Samba, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(abstract):15 +msgid "In his previous article, Daniel introduced you to what Samba can do. Now it's time to get it running on your system. In this article, he'll walk you through the process of compiling, installing, and initially configuring Samba (version 2.0.7) so that it works in your environment." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This document +#. is an updated version of the original article, and contains various improvements +#. made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(version):27 +msgid "1.0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(date):28 +msgid "2005-10-06" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):31 +msgid "Compiling, installing, and configuring Samba for your environment" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):33 +msgid "Downloading Samba" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):36 +msgid "OK, it's time to download Samba 2.0.7 or greater from the Samba.org Web site (see <uri link=\"#resources\">Resources</uri> later in this article)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(note):41 +msgid "While I'll be compiling Samba from scratch, you may choose to install Samba from a binary package (such as RPM that came with your Linux distribution). This is perfectly OK. But, as I mentioned in my last article, if you do this, your file locations may be slightly different than what I refer to here." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):48 +msgid "After you've downloaded Samba 2.0.7 or greater, it's time to decompress it to a directory location of your choice. From the command prompt, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):53 +msgid "Unpacking the source files" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):53 +#, no-wrap +msgid "\n$ <i>tar -xzvf samba-2.0.7.tar.gz</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):57 +msgid "A <path>samba-2.0.7</path> directory will be created. <c>cd</c> into it, and we'll take a look around. First, notice the docs directory. Inside it you'll see another directory called <path>textdocs</path>. <path>texdocs</path> contains a whole bunch of Samba documentation. One of the most important files in the <path>textdocs</path> directory is called DIAGNOSIS.txt. It walks you through a step-by-step process of diagnosing problems you may have with proper Samba operation. We'll be covering some, but not all, of the diagnosis procedures mentioned in this file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):71 +msgid "Compiling and installing Samba" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):74 +msgid "You'll also notice the <path>sources</path> directory in the main <path>samba-2.0.7</path> directory. Inside <path>sources</path> you'll find a well designed configure script designed to set up all the makefiles properly. As with any other configure script, to get a list of the configuration options, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):82 +msgid "Investigating options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):82 +#, no-wrap +msgid "\n$ <i>./configure --help</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):86 +msgid "You will probably want to pipe the output to <c>more</c> so that you can view all the options:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):91 +msgid "Even more options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):91 +#, no-wrap +msgid "\n$ <i>./configure --help | more</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):95 +msgid "Note the directory and file name options. Notice where everything gets installed, and that the default install path is <path>/usr/local/samba</path>. You will probably want to change this to <path>/usr/local</path> by passing the <c>--prefix=/usr/local</c> option when you configure Samba. For this example, I'm going to use the following path settings:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):103 +msgid "Configuring the directory options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):103 +#, no-wrap +msgid "\n$ <i>./configure --prefix=/usr/local --localstatedir=/var/log --sysconfdir=/etc</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):107 +msgid "The above configuration options will cause Samba's default tree to be in <path>/usr/local</path>, with the exception of the configuration files. Samba will expect to find these in <path>/etc</path> and log files, which will end up in <path>/var/log</path>. If you omit those configure options, you'll find everything in the <path>/usr/local/samba</path> directory tree (<path>/usr/local/samba/var</path>, <path>/usr/local/samba/etc</path>, etc.)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):116 +msgid "It's now time to start the compilation. After running <c>configure</c>, type:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):120 +msgid "Compiling Samba" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):120 +#, no-wrap +msgid "\n$ <i>make</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):124 +msgid "After compilation completes, type the following as root to install the software:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):129 +msgid "Installing Samba" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):129 +#, no-wrap +msgid "\n# <i>make install</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):136 +msgid "Configuring the server" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):139 +msgid "For the most part, configuring Samba begins and ends with the <path>smb.conf</path> file. This is Samba's main configuration file. It has many different configuration options. To avoid confusion, we're going to start only with those options essential to the proper operation of Samba. First, you'll need to find out where <path>smb.conf</path> should be. If you used the configuration options I specified above, you should place <path>smb.conf</path> in <path>/etc</path>. If you used the default paths, Samba will look for it in <path>/usr/local/samba/etc</path>. To get started, <c>cd</c> to the appropriate directory, fire up your favorite text editor, and type in the following lines. I'll intersperse commentary along the way to provide you with a good understanding of what each option does. Add these lines to your <path>smb.conf</path> file:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):154 +msgid "smb.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):154 +#, no-wrap +msgid "\n[global] \nworkgroup = YOURWORKGROUP \nsecurity = user \nencrypt passwords = yes \nguest account = guest\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):162 +msgid "The first line tells Samba that we are placing options in the \"global\" section. There are many options that are intended to be defined only in this section. These options control the global behavior of Samba." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):168 +msgid "The second line tells Samba the name of the Windows workgroup that Samba will create. Replace YOURWORKGROUP with an appropriate name for your workgroup." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):173 +msgid "On the third line, we tell Samba to run in user-level security mode. This option will cause Samba to tell all connecting Windows clients that they need to provide a valid username/password combination to gain access to any network resource. This is definitely a good thing. User-level security is Samba's most often used security level because it's an excellent match for the majority of file sharing situations. However, there are other security levels available. One handy mode tells Samba to authenticate all users against the security database of an existing Windows NT or 2000 Server. We won't be covering that particular mode in this article. If you want more information about it, take a look at the \"security\" option in the <path>smb.conf</path> main page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):186 +msgid "Now, on to the fourth line. Here we tell Samba to exchange passwords with Samba in encrypted mode. You will always want to run Samba in encrypted mode, unless all your client machines are extremely ancient (like Windows for Workgroups-era machines). Enabling encrypted passwords does cause Samba to need its own password file, in addition to the standard Unix password database. If you are thinking that it may be nice to turn encrypted passwords off, so that you can avoid having to maintain two password files, don't do it! Turning encrypted passwords off will cause sharing problems with even moderately old versions of Windows NT 4.0 in addition to Windows 2000. If you really want to avoid maintaining two separate databases, Samba provides several ways to synchronize both databases, which is a better approach." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):200 +msgid "The next line specifies a valid Unix user account that will be used for guest access. While people often use \"guest account=nobody\", it's recommended that you add a literal \"guest\" user to your system if one doesn't exist already. The new \"guest\" account does not need a password set and does not need to be able to log in interactively. (It's fine if you do choose to configure guest with a password and a valid default shell.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):210 +msgid "Now we're ready to add WINS support options to <path>smb.conf</path>. You'll want to add one of the following two lines to the global section:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):215 +msgid "WINS support" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):215 +#, no-wrap +msgid "\nwins support = yes\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):219 +msgid "OR" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):223 +msgid "WINS server IP address" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):223 +#, no-wrap +msgid "\nwins server = IP address of WINS server\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):227 +msgid "If you already have a WINS server on your current subnet (a Windows NT Server running WINS, for example), you'll want to use the second option and specify the name of the WINS server on the right side of the equals sign. Samba's internal WINS services will then be disabled, and it will use the WINS server you specify." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):235 +msgid "If you don't have a WINS server running on your subnet, or you're setting Samba up at home and you don't know exactly what a WINS server is, you'll want to use the first option. This will tell Samba to become a WINS server for your LAN." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):241 +msgid "You may be wondering what WINS does. Basically, you can think of WINS as a local dynamic DNS database. When Samba is running as a WINS server, every Windows-compatible machine on the same subnet will register its IP address and NetBIOS name (a.k.a. \"computer name\") with Samba. This enables Windows machines to use Samba's WINS database to request an IP address for a particular NetBIOS name. WINS is a key component of network browsing, which is what you are doing when you poke around inside the Network Neighborhood on a Windows machine." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):251 +msgid "Now we're ready to add several more options to the global section:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):255 +msgid "Network browsing setup" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):255 +#, no-wrap +msgid "\nlocal master = yes \nos level = 99 \ndomain master = yes \npreferred master = yes\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):262 +msgid "Now for an explanation. All these options are related to network browsing. I've already mentioned that WINS is a key component of network browsing, but there's another element required for browsing to work properly. A local master browser must exist. Sound strange? Some further explanation is required." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):269 +msgid "For browsing to work properly, there must be some central location that keeps track of what machines and workgroups exist on the local subnet. This particular list is called the browse list. The browse list is used to construct the list of workgroups, domains, and machines you see when you first click on the Network Neighborhood. Any modern Windows machine can become the local master browser. Ideally, we'd like Samba to be the local master browser on the network." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):278 +msgid "How is this accomplished? Basically, several beefy Windows-compatible machines on your subnet will regularly duke it out by flinging packets back and forth across your LAN in an attempt to determine who will become the local master browser. This process is called a \"browser election.\"" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(note):285 +msgid "Be a good sport. Please don't use Samba's ability to beat Windows in all browser elections as an excuse to tease Microsoft administrators in your organization. Remember, it's important to be a good winner." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):291 +msgid "In the end the \"winner\" of this broadcast packet war gets to become the local master browser. We can cause Samba to win the battle by using the <c>os level = 99</c> option, which causes it to beat every other machine on the LAN. This happens because every version of Windows (from Windows 95 to NT to 2000) has a hard-coded OS level that was intended to cause the most advanced version of Windows to become the local master browser (later versions of Windows have a bigger number). Setting Samba to 99 will cause it to beat all Microsoft products, allowing it to become the local master browser every time." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):305 +msgid "Security options" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):308 +msgid "Before we leave the global section, here are a few security options that you may be interested in. The host's <c>allow</c> option lets you limit the IP addresses that can connect to Samba:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):314 +msgid "Allowed IP addresses" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):314 +#, no-wrap +msgid "\nhosts allow = 192.168.1. 127.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):318 +msgid "This option allows only machines in the <b>192.168.1</b> network to connect to Samba, in addition to <b>127</b>, the localhost. Always make sure there is a <b>127.</b> at the end of your hosts allow line." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):324 +msgid "The interfaces option is very useful if your machine happens to have multiple network interfaces. It allows you to specify the network interfaces on which Samba is available. It is used as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):330 +msgid "Specifying interfaces" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):330 +#, no-wrap +msgid "\ninterfaces = eth1\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):334 +msgid "This is an easy way to limit Samba to the necessary interfaces. And limiting the interfaces prevents possible hacking attempts from unwanted users." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):342 +msgid "A test share" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):345 +msgid "Now that we've configured Samba's global options, it's time to create a test share that will allow us to access the <path>/tmp</path> directory. Add the following lines:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):351 +msgid "Setting the /tmp directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):351 +#, no-wrap +msgid "\n[tmp] \npath=/tmp \nwriteable=yes\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):357 +msgid "When Samba is started, these settings will make a share available called <c>tmp</c>. This share will contain the contents of your <path>/tmp</path> directory on your Samba server. Also, if a particular user has write permission in <path>/tmp</path>, as almost all do, that user will be able to create and modify files in that directory." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):365 +msgid "Now that we've added all these entries to <path>smb.conf</path>, it's time to verify that our configuration is correct. To do this, we'll use the <c>testparm</c> utility:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):371 +msgid "Using testparm" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):371 +#, no-wrap +msgid "\n$ testparm\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):375 +msgid "A list of all your configuration options will be listed to the screen after you hit Enter. Any errors in <path>smb.conf</path> will also be noted and commented upon at this point. If there are any errors, follow the instructions on-screen to fix them. Now we're ready to configure Samba users and fire up Samba for the test run." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):386 +msgid "Creating users" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):389 +msgid "In order for the \"myuser\" user with the \"mypass\" password to be able to use Samba, the following things must exist:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):395 +msgid "A valid <b>myuser</b> Unix account. <b>myuser</b> does not need to be able to log in, and <b>myuser</b>'s Unix password is not used by Samba, so you can set to a dummy value if you like. If <b>myuser</b> also logs in interactively to your Samba server, that's OK, too." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):401 +msgid "A valid <b>myuser</b> entry in the <path>smbpasswd</path> file. The <path>smbpasswd</path> file is found in the directory called <path>private</path> that resides in the default Samba install prefix (<path>/usr/local/private</path> in this example). <b>myuser</b> can be added to the <path>smbpasswd</path> file by using the <c>smbpasswd</c> command and by typing the following as root:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):411 +msgid "Adding users" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):411 +#, no-wrap +msgid "\n# <i>smbpasswd -a myuser</i>\nNew SMB password: <enter \"mypass\" here>\nRetype new SMB password: <enter \"mypass\" again>\nAdded user myuser.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):418 +msgid "These steps must be repeated for every new Samba user. If you are Samba-enabling an existing Unix account, remember to add the username and password to the <path>smbpasswd</path> file. If you're adding a Windows-only user, remember that in addition to adding the user to the <path>smbpasswd</path> file you'll also need to create a valid Unix account with an identical username. In fact, you'll need to create the Unix account first since <path>smbpasswd</path> won't add a user unless the Unix account already exists." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):428 +msgid "Both accounts are needed because Samba uses the Unix account to set the proper permissions on disk, while the <path>smbpasswd</path> file is used for authentication purposes. If you are going to connect from Windows NT, you'll want to create a Samba \"administrator\" user." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):438 +msgid "Final server configuration" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):441 +msgid "We're almost ready to start Samba and configure the client machines. But you must first make sure that your Samba box can ping every Windows client machine on your network, by name. If this doesn't work, you'll need to add some entries to <path>/etc/hosts</path> or update your DNS so that your Samba box can properly find your Windows machines." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):449 +msgid "It is also helpful to note that Samba works best when <path>/etc/hosts</path> is set up so that only the \"localhost\" name maps to 127.0.0.1. The FQDN of your machine should map to the primary IP address used on your LAN. For example:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):455 +msgid "/etc/hosts" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):455 +#, no-wrap +msgid "\n<comment>/etc/hosts excerpt</comment>\n\n127.0.0.1 localhost \n192.168.1.1 mybox mybox.mydomain.com\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):465 ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):474 +msgid "Starting Samba" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):468 +msgid "Samba is now configured and ready to go. We'll start Samba and then focus on configuring the Windows machines properly. To start Samba, type the following as root:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):474 +#, no-wrap +msgid "\n# <i>smbd</i>\n# <i>nmbd</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):479 +msgid "This will start Samba's two main server processes, <c>smbd</c> and <c>nmbd</c>. They will log any informational and error messages to <path>/var/log/log.smb</path> and <path>/var/log/log.nmb</path>, respectively. Now that the Unix side is up and running, it's time to turn to the client machines and get them set up properly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):490 +msgid "Configuring client machines" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):493 +msgid "To configure a Windows machine so that it can participate in your Samba Workgroup, you'll need to make sure the TCP/IP protocol is properly configured. You must also make sure that:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):500 +msgid "Your Windows machine can ping your Unix machine by name. (Type <c>ping myserver</c> at the C:\\> prompt.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):504 +msgid "Your Windows machine is configured to use a WINS server. If Samba is providing WINS services, this should be set to the IP of your Samba box. If not, it should be set to the IP of a valid WINS server. This setting is normally found inside the TCP/IP settings dialog." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):510 +msgid "Your Windows machine is a member of YOURWORKGROUP." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):516 +msgid "Testing it out" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):519 +msgid "Now is the moment of truth. After your Windows machines have finished rebooting, you'll need to log on to Windows using a username/password that will be accepted by Samba. If you're using Windows 95/98, this username/password combo will be simply stored in a file and used later when you try to connect to any network resource." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):527 +msgid "If you are using Windows NT Workstation, this username/password combo must also be in the NT's local security database (otherwise you won't be able to initially log in to NT). To do this, log on to NT as administrator and create the account using User Manager. Afterwards, log out and log in as the new user." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):534 +msgid "After you've properly logged in, double-click on the Network Neighborhood and take a look at the YOURWORKGROUP workgroup. Look inside. See if your Samba server is listed. Double-click on it and see if the <path>/tmp</path> share is listed. If so, congratulations! Samba is working! If not, here are some things to check:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):543 +msgid "Run <c>testparm</c>. Is your <path>smb.conf</path> OK? If not, fix the problem and restart Samba." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):547 +msgid "Are <c>smbd</c> and <c>nmbd</c> running? If not, check the log files for possible errors, correct any issues, and restart <c>smbd</c> and <c>nmbd</c>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):552 +msgid "Did you configure your Windows client machines to use a proper WINS server? If not, they will have problems looking up the IP addresses of machines on your network." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):557 +msgid "Can you ping the Unix machine from Windows and vice-versa? If not, you'll need to configure your <path>/etc/hosts</path> file or DNS so that name resolution is working properly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):564 +msgid "If all these things check out and Samba is still not working, carefully follow each step in the DIAGNOSIS.txt file found in the <path>docs/textdocs</path> directory. You should be able to pinpoint and fix your configuration or network problem within minutes. If you change <path>smb.conf</path> in any way, you'll need to send <c>smbd</c> and <c>nmbd</c> a HUP signal to force them to reread <path>smb.conf</path>. This is done as follows:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre:caption):573 +msgid "Troubleshooting" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(pre):573 +#, no-wrap +msgid "\n# <i>kill -hup <pid of smbd></i>\n# <i>kill -hup <pid of nmbd></i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):578 +msgid "Alternately, you can simply kill <c>smbd</c> and <c>nmbd</c> and restart them again." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):586 +msgid "Next time" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(p):589 +msgid "In my <uri link=\"/doc/en/articles/samba-p3.xml\">next Samba article</uri> I'll familiarize you with Samba's more advanced options. Then you'll be able to set up shares that function exactly the way you want them to. We'll also look at several advanced features of Samba, like Samba printing. I'll see you then!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(title):599 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):603 +msgid "The main <uri link=\"http://fi.samba.org\">Samba</uri> web site" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):604 +msgid "<uri link=\"http://www.kampsax.dtu.dk/~rask/Samba/mailinglist/\">Amiga Samba</uri> mailing list" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):608 +msgid "<uri link=\"http://linuxguy.net/samba.htm\">Samba</uri> by Ed Weinberg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):609 +msgid "<uri link=\"http://www.amazon.com/exec/obidos/ASIN/0672318628/\">Samba Unleashed</uri>>, by Steve Litt, with contributions from Daniel Robbins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):613 +msgid "<uri link=\"http://www.oreilly.com/catalog/samba/\">Using Samba</uri> (O'Reilly Publishing; 1999)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):617 +msgid "<uri link=\"http://www.mdb.ku.dk/tarvin/samba/\">Samba Notes</uri> on Samba and Redhat" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(li):621 +msgid "The <uri link=\"http://fi.samba.org/docs/swat_ssl.html\">SWAT</uri> main page" +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p2.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/samba-p3.xml.pot b/article/gettext/samba-p3.xml.pot new file mode 100644 index 0000000..4069eae --- /dev/null +++ b/article/gettext/samba-p3.xml.pot @@ -0,0 +1,456 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(guide:link):5 +msgid "/doc/en/articles/samba-p3.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):6 +msgid "Introduction to Samba, Part 3" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. <author title="Editor"> +#. <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> +#. </author> +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(abstract):15 +msgid "In his previous article, Daniel Robbins guided you through the process of setting up Samba for the first time. Now it's time to configure Samba so that it does everything that you want it to do." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This document +#. is an updated version of the original article, and contains various improvements +#. made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(version):26 +msgid "1.0" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(date):27 +msgid "2005-10-08" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):30 +msgid "Getting Samba to samba: The configuration stage" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):32 +msgid "A brief review" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):35 +msgid "Here's a listing of the <path>smb.conf</path> that we've been working with:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):39 +msgid "/etc/smb.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):39 +#, no-wrap +msgid "\n[global]\n\n<comment># set YOURWORKGROUP to the name of your workgroup</comment>\n \nworkgroup = YOURWORKGROUP \nsecurity = user \nencrypt passwords = yes \nguest account = guest \n\n<comment># enable *one* of the following two lines</comment>\n<comment># enable the first line if you want to use an existing</comment>\n<comment># WINS server on your subnet, otherwise, enable the</comment>\n<comment># second.</comment>\n\n# wins server = IP address of WINS server \n# wins support = yes \n\nlocal master = yes \nos level = 99 \ndomain master = yes \npreferred master = yes \n\n<comment># optional security options. Customize for your site.</comment>\n\n# hosts allow = 192.168.1. 127. \n# interfaces = eth1 \n\n[tmp] \npath=/tmp \nwriteable=yes\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):75 +msgid "Adding some shares" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):78 +msgid "While this <path>smb.conf</path> file is functional, all it does is share the <path>/tmp</path> directory with Windows by creating a share with the name of \"tmp\". Not too exciting. Let's create another share that could be more useful. Add the following lines to your <path>smb.conf</path> and restart Samba." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):85 +msgid "Adding an FTP share" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):85 +#, no-wrap +msgid "\n[ftp] \npath=/path/to/ftp/root \nwriteable=no\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):91 +msgid "If you have an ftp site or some kind of file archive on your Samba server, you can use something like this to share the data over the network. The <b>writeable=no</b> parameter tells Samba that no one should be allowed to create or modify files on this share. Anyone who has a valid Samba account set up will be able to access this share." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):102 +msgid "An exciting share" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):105 +msgid "OK, I know what you're thinking. This still isn't too exciting. How about sharing a home directory? Here's how:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):110 +msgid "Sharing a home directory" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):110 +#, no-wrap +msgid "\n[drobbins] \ncomment=Home directory for drobbins \npath = /home/drobbins \nforce user = drobbins \nread only = no \nvalid users = drobbins administrator\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):119 +msgid "This one is a lot more interesting. Adding something like this to your <path>smb.conf</path> will allow you to share a home directory. In this example, a \"drobbins\" share is created. This shares the contents of <path>/home/drobbins</path> over the network. Fortunately, however, thanks to the <b>valid users</b> line, not just anyone can access this hare. This line causes Samba to reject access by anyone other than the \"drobbins\" or \"administrator\" account. Since I'm using Windows NT, I'm often logged in as administrator. In such situations, it's nice to still be able to access the \"drobbins\" share. Such a valid users line allows this to happen." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):131 +msgid "You'll also notice the use of the <b>read only</b> parameter. As you might guess, <b>read only</b> is the opposite of the <b>writeable</b> parameter. We could have just as easily replaced this line with <b>writeable=yes</b>. This means that Samba will permit writing to this particular share, as long as you have the proper permissions to do so. Since the Samba \"drobbins\" user maps directly to the Unix \"drobbins\" user, and drobbins happens to be the owner of the <path>/home/drobbins</path> directory and its contents, writing and modifying files will be permitted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):142 +msgid "Have you ever created a file in your home directory as root, and then tried to modify it when you're logged in as a normal user only to be denied write access? This seems to happen all the time to me. To fix the problem, I need to <c>su</c>, <c>chown drobbins.drobbins filename</c> and then <c>exit</c> from root. Finally, I'm allowed to modify the file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):150 +msgid "I bring this up because a similar problem can occur when you share out home directories and access them using different Samba users. Consider the following situation. I access a share as administrator and created a file. Normally, this file would be owned by administrator and it would not be modifiable by the drobbins user. If drobbins tried to modify it, access would be denied. Fortunately, Samba has the <b>force user</b> option that works around this situation. The <b>force user</b> option will cause all actions performed on files (on a particular Samba SMB/CIFS share) to be performed using a single Unix account. In my \"drobbins\" share example, this means that any files that administrator creates will actually be owned by drobbins, preventing any ownership conflicts. Since the \"drobbins\" share contains the contents of my home directory, I like to keep everything in it owned by the drobbins account." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):165 +msgid "Before we head on to the next topic, I should mention the <b>comment</b> parameter. This allows you to complement your share with a descriptive comment visible from Windows." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):174 +msgid "Sharing lots of home directories" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):177 +msgid "So, we've covered how to share a single home directory. But what do you do if you happen to administrate a server that contains hundreds of users, all of whom want to be able to access their home directories from Windows? Fortunately, Samba has a special share just for this purpose called \"homes\". Here's how it works:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):185 +msgid "Sharing multiple homes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):185 +#, no-wrap +msgid "\n[homes] \ncomment=Home directory for %S \npath=/home/%u \nvalid users = %u administrator \nforce user=%u \nwriteable = yes \nbrowseable = no\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):195 +msgid "As I mentioned, this is a \"special\" share. It doesn't work like ordinary shares. Samba recognizes the special identifier <b>[homes]</b> and treats this share differently." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):201 +msgid "One of the most unusual things about this share is the use of the <b>browseable=no</b> parameter. This particular option causes a share to be invisible under the Network Neighborhood, and it's normally used to deter those malicious users who may be tempted to \"explore\" any share they can see. But why use it here?" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):209 +msgid "The answer is a bit tricky. You see, the \"homes\" share does create a share called \"homes\". But that particular share is of no use to us. It doesn't do anything, so we hide it. What the \"homes\" share does do for us is quite tremendous. It tells Samba to automatically create home directories on the fly for each individual user. For example, let's say our \"drobbins\" share wasn't defined in <path>smb.conf</path> and we explored the Network Neighborhood as NT user \"drobbins\". We would find a share called \"drobbins\" that would behave identically to our original \"drobbins\" share. If we accessed Samba using the NT user \"jimmy\", we'd find a perfectly configured \"jimmy\" share. This is the beauty of homes. Adding one special share causes all home shares to be properly created." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):223 +msgid "Now, how does it work? When the \"homes\" share is set up, Samba will detect which NT user is accessing Samba. Then it will create a home share that's been customized for this particular user. This share will show up in the Network Neighborhood as if it's a normal, non-dynamic share. The NT user will have no idea that this particular share was created on the fly. Let's look at what each particular option does." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):232 +msgid "The comment parameter uses the <b>%S</b> wildcard, which expands to the actual name of the share. This will cause the \"drobbins\" share to have the comment \"Home directory for drobbins\", the \"jimmy\" share to have the comment \"Home directory for jimmy\", etc. The path parameter also contains the wildcard <b>%u</b>. <b>%u</b> expands to the name of the user accessing the share. In this particular case, %u is equivalent <b>%S</b>, so we could have used <b>path=/home/%S</b> instead. This allows Samba to dynamically map the share to the proper location on disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):243 +msgid "Again, we use macros in the <b>valid users=</b> line so that only the owner of the share and administrator are allowed to access it. <b>force user</b> uses a macro too, so that all file access will be performed by a single account. And of course we make the share writeable for any authenticated users. While we use the <b>browseable=no</b> parameter, the dynamically-created shares will be browseable when they are created. Again, this just hides the non-functional \"homes\" share." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):258 +msgid "Share parameters" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):262 +msgid "We've seen a couple of handy techniques to use when creating shares. In this section I'll cover several popular options that allow you to customize Samba functionality on a per-share basis. All share-related options can also be placed in the <b>[globals]</b> section to set a default value for all shares." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):272 +msgid "comment=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):275 +msgid "The <b>comment=</b> parameter is a very handy option to make your Samba system look more professional from the Windows side. It allows you to specify a comment that accompanies a particular share intended to describe its contents. When specifying comments (especially when using \"homes\"), I often use the <b>%S</b> macro, which expands to the name of the share." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):286 +msgid "path=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):289 +msgid "<b>path=</b> is one of the most fundamental Samba share parameters. It allows you to set the path to the directory to be exported. Note that by default any symlinks in this directory tree can be followed. So it is possible for users to \"jump out\" of the directory tree. From the Windows side, they will have no indication that they are following a symlink. It will just appear as a regular file or directory. We'll look at several parameters that can change this behavior to make Samba more secure." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):302 +msgid "force user=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):305 +msgid "<b>force user=</b> is one of my favorite parameters. It forces all file modifications to be performed by the account of a single user. You'll want to use the <b>valid users=</b> option often with this one so that you can limit access to select users. Since all file operations are performed using a single user account, one of the side effects of <b>force-user=</b> is that you can't look at the Unix file permissions to figure out who did what. Thus for writeable shares, the <b>force user=</b> option should be accompanied by reasonable security defaults. Without this option, all file operations will be performed by the Samba user who is accessing the share." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):317 +msgid "force user example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):317 +#, no-wrap +msgid "\nforce user=drobbins\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):324 +msgid "browseable=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):327 +msgid "One simple way to enhance your security is to make certain shares invisible. Shares are browseable by default under the Network Neighborhood. Making them invisible can help to deter unwanted hacking attempts. But this should not be used as the only means of security. Just because a share isn't listed in the browse list does not prevent it from being accessed from Windows. It just decreases the amount of information you may potentially be providing to a malicious user. To access a hidden share, you can type its UNC name into the <c>Run...</c> dialog box. For example, the hidden share on myserver called 'test' can be accessed by typing <c>\\\\myserver\\test</c> from Windows." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):339 +msgid "browseable example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):339 +#, no-wrap +msgid "\nbrowseable=no\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):346 +msgid "available=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):349 +msgid "The <b>available=</b> option, which is 'yes' by default, is just a handy way of disabling a share without commenting it out or erasing it from the <path>smb.conf</path> entirely. <b>available=no</b> will make the share inactive after Samba is restarted." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):356 +msgid "available example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):356 +#, no-wrap +msgid "\navailable=no\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):363 +msgid "valid users=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):366 +msgid "Definitely take advantage of the <b>valid users=</b> option to restrict access to certain shares. By default, any authenticated user will be allowed to access a Samba share. You can refer to a valid NIS netgroup or Unix group by appending an \"@\" to the group name." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):373 +msgid "valid users example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):373 +#, no-wrap +msgid "\n<comment>To allow drobbins and the members of the wheel group access to the shares:</comment>\n\nvalid users = drobbins @wheel\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):382 +msgid "dont descend=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):385 +msgid "<b>dont descend=</b> specifies directories in the share that Samba should not enter. This can be handy to prevent Samba from entering a directory that contains recursive symlinks, or to restrict access to irrelevant directories like <path>/proc</path> and <path>/dev</path>. Be sure to test out your <b>dont descend=</b> settings to make sure they are working. You may need to switch <b>dont descend= /dev</b> to <b>dont descend= ./dev</b>, for example." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):397 +msgid "follow symlinks=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):400 +msgid "<b>follow symlinks=</b> normally defaults to 'yes' and will cause Samba to follow all symlinks, even if they redirect Samba to files or directories outside of the exported directory tree. Setting follow symlinks to 'no' will turn off this functionality, and prevent symlinks from being followed at all. Turning off follow symlinks does eliminate a potential security hole and should be done when symlinks are not needed or required." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):409 +msgid "follow symlinks example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):409 +#, no-wrap +msgid "\nfollow symlinks=no\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):416 +msgid "volume=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):419 +msgid "The <b>volume=</b> option can cause Samba to associate a \"volume name\" with the particular share. This is especially useful if you are using a Samba share to export the contents of a CD-ROM. Many installation programs will expect to find an exact volume name on the CD, without which they won't work." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):426 +msgid "volume example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):426 +#, no-wrap +msgid "\nvolume=My Favorite CD\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):433 +msgid "create mask=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):436 +msgid "Samba uses the <b>create mask</b> to set the proper permissions on newly created files. The <b>create mask</b> defines which permissions newly created files will allow. The supplied octal number will be combined with the desired permissions using a binary <c>and</c> operation. This causes any permissions not in the mask to be dropped from the new file's permissions." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):444 +msgid "create mask example" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):444 +#, no-wrap +msgid "\ncreate mask= 0755\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):451 +msgid "directory mask=" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):454 +msgid "<b>directory mask=</b> works in a manner similar to <b>create mask=</b>. It specifies an octal number that defines those permissions allowed for the new directory." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):463 +msgid "The many options of smb.conf" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):466 +msgid "In this section, we've covered only those <path>smb.conf</path> options that are the most essential in configuring a useful and secure Samba system. Samba itself has many additional configuration options that you may find useful. To find out more about them, check out the smb.conf main page, where they are listed and described in detail. (See <uri link=\"#resources\">Resources</uri>.)" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):479 +msgid "Printing from Samba" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):483 +msgid "Samba's printer-sharing abilities come in handy and work well. To refresh your memory, Samba allows you to export existing lpd-based printers so that Windows clients can connect and print to them. One of the wonderful things about this arrangement is that all printer-specific code is generated on the Windows side. This means that your Unix system does not need to have explicit support for a particular printer. As long as your Unix system is able to dump raw data to the printer, it will work and work well. This even allows you to share and use printers that are not fully functional in a pure Unix environment, such as my Adobe PrintGear-based NEC SuperScript 870." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):498 +msgid "How Samba printing works" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):501 +msgid "To get printing to work, you first need to get <c>lpd</c> working. While <c>lpd</c> configuration is beyond the scope of this article, it's not too hard and is described in detail in the Printing FAQ available at tldp.org. (See <uri link=\"#resources\">Resources</uri>.) You'll want to configure your printers to be \"raw\" printers by default, so that any data sent to the printer using an <c>lpr</c> command is copied verbatim without any filtering or massaging. It's easy to test <c>lpd</c> to make sure that it is configured in \"raw\" mode. On the Windows side, install a printer driver for that particular printer that prints to <b>FILE:</b>. Print a page from your favorite Windows word processor and save it to file. Then copy it to your Unix machine and print it using <c>lpr</c>. If you get correct output, you're all set to configure Samba to use the printer automatically." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):519 +msgid "Samba print globals" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):522 +msgid "To get Samba working properly for printing under a Linux system, you'll want to add the following parameters to your <b>[global]</b> section:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):527 +msgid "Edit smb.conf to allow printing" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):527 +#, no-wrap +msgid "\nprintcap name=/etc/printcap \nprinting=bsd\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):532 +msgid "If your printcap is located somewhere else, adjust the <b>printcap name=</b> parameter accordingly. If you use a printing system other than standard BSD <c>lpd</c>, consult the <b>rinting=</b> option on the <path>smb.conf</path> main page for more information on how to get Samba to work with your printing system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):539 +msgid "Now, setting up the printer share. This is what I have in <path>smb.conf</path> for my printer. We'll use it as a model:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre:caption):544 +msgid "Example printer share" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(pre):544 +#, no-wrap +msgid "\n[nec] \n<comment>#my NEC SuperScript 870</comment>\npath=/var/spool/smb \nprint command=/usr/bin/lpr %s \nlprm command=/usr/bin/lprm -P%p %j \nprinter=lp \npublic=yes \nprintable=yes\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):555 +msgid "It is important to first understand the path parameter. When Samba accepts a print job from Windows, it needs to store it somewhere on disk before Samba can submit the job using <c>lpr</c>. The directory referred to by the <b>path=</b> parameter should have Unix permissions 1777 so that anyone can write to this directory. The <b>print command=</b> and <b>lprm=</b> lines are not usually needed. Include them if you want to specify the exact path for your print commands or if you need to pass any command-line parameters to <c>lpr</c>. Use the above macros as an example. <b>%s</b> expands to the temporary file name, <b>%p</b> expands to the printer name, and <b>%j</b> expands to the job number." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):567 +msgid "The <b>printer=</b> option, as you may guess, tells Samba which Unix printer to print to. Make sure this printer is set up in raw mode. <b>public=yes</b> allows even users with no password to connect to this printer. Eliminate this option later if you want to tighten up security (you may want to replace this line with a valid <b>users=</b> line to really tighten up security). <b>printable=yes</b> tells Samba both that this share should be configured as a printer, and to allow this share to accept print jobs." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):577 +msgid "After restarting Samba, you should be able to see the new printer from Windows. At this point you should be able to install this printer on the Windows side and fire off a test-page to your new, shared resource. (Windows will tell you that you are installing a driver for the NULL printer. Don't worry. Just select the correct printer driver from the list.) If for some reason printing doesn't work, be sure to check <path>/var/log/log.smb</path> for any error messages. I should also mention that there are tons of printer-related <path>smb.conf</path> configuration options that you may find useful. I've just touched on the most popular ones. Be sure to check out the <path>smb.conf</path> main page to get familiar with all of them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):595 +msgid "Finishing up" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):599 +msgid "In this article we've covered the key elements of Samba functionality, including sharing home directories and printing. I've also tried to highlight several security-related parameters. But don't get the idea that this is all there is to Samba. Samba is not only very powerful, but also very configurable. It's designed to let you, the administrator, decide how and to what extent it will be used in your organization. While quite a bit of manual <path>smb.conf</path> configuration is involved in a Samba setup, the results are well worth it because you can get everything working exactly how you want." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(p):610 +msgid "Samba has additional functionality that we haven't even touched on, including the ability to become part of (or even control!) an entire Windows NT domain. I encourage you to fully explore the potential of this extremely powerful tool." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(title):619 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):623 +msgid "Download Samba at the main <uri link=\"http://www.samba.org\">Samba</uri> web site" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):627 +msgid "<uri link=\"http://www.theknuddel.de/english/enfrgpasswd.html\">frgpasswrd</uri> is a password synchronization utility to set Samba and shadow passwords concomitantly" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):633 +msgid "<uri link=\"http://www.spanware.com/\">SambaLink/Q</uri> is a version-independent editor for the <path>smb.conf</path> file." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):637 +msgid "See the Printing FAQ at <uri link=\"http://tldp.org\">tldp.org</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):640 +msgid "Read <uri link=\"http://linuxguy.net/samba.htm\">Samba</uri> by Ed Weinberg." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):643 +msgid "<e><uri link=\"http://www.oreilly.com/catalog/samba/\">Using Samba</uri></e> (O'Reilly Publishing; 1999) is a comprehensive guide to Samba administration, including such recent additions as integration with Windows NT domains and the SWAT graphic configuration tool." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):649 +msgid "Visit the <uri link=\"http://fi.samba.org/docs/swat_ssl.html\">SWAT</uri> main page." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):653 +msgid "Check out <uri link=\"http://jazz.external.hp.com/src/samba/\">Samba/iX</uri>, a suite of programs that allow an HP e3000 running MPE/iX operating system to provide service using Microsoft's Message Block (SMB)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(li):658 +msgid "Read <e><uri link=\"http://www.amazon.com/exec/obidos/ASIN/0672318628/\">Samba Unleashed</uri></e>, by Steve Litt, with contributions from Daniel Robbins." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/samba-p3.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/software-raid-p1.xml.pot b/article/gettext/software-raid-p1.xml.pot new file mode 100644 index 0000000..43552fd --- /dev/null +++ b/article/gettext/software-raid-p1.xml.pot @@ -0,0 +1,373 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(guide:link):5 +msgid "/doc/en/articles/software-raid-p1.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):6 +msgid "Software RAID in the new Linux 2.4 kernel, Part 1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by: Joshua Saddler (nightmorph@gentoo.org) +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(abstract):13 +msgid "In his two-part series on the Linux 2.4 Software RAID, Daniel Robbins introduces the new technology that's used to increase disk performance and reliability by distributing data over multiple disks. This first installment covers Software RAID setup (kernel and tools installation) and shows you how to create linear and RAID-0 volumes." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(version):26 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(date):27 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):30 +msgid "Installation and a general introduction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):32 +msgid "The wonders of RAID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):35 +msgid "The 2.4 kernel has a number of nifty features and additions. One of these is the inclusion of a modern Software RAID implementation -- yay! Software RAID allows you to dramatically increase Linux disk IO performance and reliability without buying expensive hardware RAID controllers or enclosures. Because it's implemented in software, Linux RAID software is flexible, fast... and fun!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):44 +msgid "The concept behind Software RAID is simple -- it allows you to combine two or more block devices (usually disk partitions) into a single RAID device. So let's say you have three empty partitions: <path>hda3</path>, <path>hdb3</path>, and <path>hdc3</path>. Using Software RAID, you can combine these partitions and address them as a single RAID device, <path>/dev/md0</path>. <path>md0</path> can then be formatted to contain a filesystem and used like any other partition. There are also a number of different ways to configure a RAID volume -- some maximize performance, others maximize availability, while others provide a mixture of both." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):57 +msgid "There are two forms of RAID: linear and RAID-0 mode. Neither one is technically a form of RAID at all, since RAID stands for \"redundant array of inexpensive disks\", and RAID-0 and linear mode don't provide any kind of data redundancy. However, both modes -- especially RAID-0 -- are very useful. After giving you a quick overview of these two forms of \"AID\", I'll step you through the process of getting Software RAID set up on your system." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):72 +msgid "Introduction to linear mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):76 +msgid "Linear mode is one of the simplest methods of combining two or more block devices into a RAID volume -- the method of simple concatenation. If you have three partitions, <path>hda3</path>, <path>hdb3</path>, and <path>hdc3</path>, and each is about 2GB, they will create a resultant linear volume of 6GB. The first third of the linear volume will reside on <path>hda3</path>, the last third on <path>hdc3</path>, and the middle third on <path>hdb3</path>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):86 +msgid "To configure a linear volume, you'll need at least two partitions that you'd like to join together. They can be different sizes, and they can even all reside on the same physical disk without negatively affecting performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):96 +msgid "Linear applications" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):99 +msgid "Linear mode is the best way to combine two or more partitions on the same disk into a single volume. While doing this with any other RAID technique will result in a dramatic loss of performance, linear mode is saved from this problem because it doesn't write to its constituent partitions in parallel (as all the other RAID modes do). But for the same reason, linear mode has the liability of lacking scale in performance compared to RAID-0, RAID-4, RAID-5, and to some extent RAID-1." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):110 +msgid "In general, linear mode doesn't provide any kind of performance improvement over traditional non-RAID partitions. Actually, if you spread your linear volume over multiple disks, your volume is more likely to become unavailable due to a random hard drive failure. The probability of failure of a linear volume will be equal to the sum of the probabilities of failure of its constituent physical disks and controllers. If one physical disk dies, the linear volume is generally unrecoverable. Linear mode does not offer any additional redundancy over using a single disk." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):122 +msgid "But linear mode is a great way to avoid repartitioning a single disk. For example, say your second IDE drive has two unused partitions, <path>hdb1</path> and <path>hdb3</path>. And say you're unable to repartition the drive due to critical data hanging out at <path>hdb2</path>. You can still combine <path>hdb1</path> and <path>hdb3</path> into a single, cohesive whole using linear mode." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):131 +msgid "Linear mode is also a good way to combine partitions of different sizes on different disks when you just need a single big partition (and don't really need to increase performance). But for any other job there are better RAID technologies you can use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):143 +msgid "Introduction to RAID-0 mode" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):147 +msgid "RAID-0 is another one of those \"RAID\" modes that doesn't have any \"R\" (redundancy) at all. Nevertheless, RAID-0 is immensely useful. This is primarily because it offers the highest performance potential of any form of RAID." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):154 +msgid "To set up a RAID-0 volume you'll need two or more equally (or almost equally) sized partitions. The RAID-0 code will evenly distribute writes (and thus reads) between all constituent partitions. And by parallelizing reads and writes between all constituent devices, RAID-0 has the benefit of multiplying IO performance. Ignoring the complexities of controller and bus bandwidth, you can expect a RAID-0 volume composed of two partitions on two separate identical disks to offer nearly double the performance of a traditional partition. Crank your RAID-0 volume up to three disks, and performance will nearly triple. This is why a RAID-0 array of IDE disks can outperform the fastest SCSI or FC-AL drive on the market. For truly blistering performance, you can set up a bunch of SCSI or FC-AL drives in a RAID-0 array. That's the beauty of RAID-0." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):171 +msgid "To create a RAID-0 volume, you'll need two or more equally sized partitions located on separate disks. The capacity of the volume will be equal to the combined capacity of the constituent partitions. As with linear mode, you can combine block devices from various sources (such as IDE and SCSI drives) into a single volume with no problems." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):180 +msgid "If you're creating a RAID-0 volume using IDE disks, you should try to use UltraDMA compliant disks and controllers for maximum reliability. And you should use only one drive per IDE channel to avoid sluggish performance -- a slave device, especially if it's also part of the RAID-0 array, will slow things down so much as to nearly eliminate any RAID-0 performance benefit. You may also need to add an off-board IDE controller so that you have the extra IDE channels you require." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):191 +msgid "If you're creating a RAID-0 volume out of SCSI devices, be aware that the combined throughput of all the drives can potentially exceed the maximum throughput of the SCSI (and potentially PCI) bus. In such a case, the SCSI bus will be the performance-limiting factor. If, for example, you have four drives that have a maximum throughput of 15Mb/sec set up on a 40Mb/sec 68-pin Ultra Wide bus, there will be times when the drives will saturate the bus, and performance will reach an upper maximum of close to 40Mb/sec. This may be fine for your application (after all, 40Mb/sec IO ain't bad!), but you'd probably have identical peak IO performance from a RAID-0 volume that used only three drives." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):208 +msgid "RAID-0 applications" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):211 +msgid "From a reliability standpoint, RAID-0 has the same characteristics as linear mode -- the more drives you add to the array, the higher the probability of volume failure. And, like linear mode, the death of a single drive will bring down the entire RAID-0 volume and make it unrecoverable. To figure out the probability of failure of your RAID-0 volume, simply add together the probabilities of failure of all constituent drives." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):221 +msgid "RAID-0 is ideal for applications for which you need maximum IO performance, since it's the highest-performing RAID mode available. But remember that RAID-0 should only be used if you can tolerate a slightly higher risk of volume failure." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):228 +msgid "If you're putting together a compute farm or web cluster, RAID-0 is an excellent way to increase disk IO performance. Since in this case you would already have an existing level of redundancy (lots of spare machines), your resources would continue to be available for the rare case that a machine with a failed hard drive needs to be brought down for a drive replacement and reload." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):242 +msgid "Setting up Linux 2.4 Software RAID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):246 +msgid "There are two steps involved in getting your 2.4 system ready for Software RAID. First, RAID support needs to be enabled in the kernel. This normally involves recompiling and installing a new kernel unless you're already using a 2.4 series kernel with RAID support compiled-in." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):254 +msgid "Then the raidtools package needs to be compiled and installed. The raidtools are the user-level tools that allow you to initialize, start, stop, and control your RAID volumes. Once these two steps are complete, you'll be able to create your own RAID volumes, create filesystems on the volumes, mount them, etc." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):265 +msgid "Kernel issues" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):268 +msgid "I'm using kernel 2.4.0-test10 for this series. I recommend that you use the most recent 2.4 kernel you can track down, which should at least be kernel 2.4.0-test10 or later (but not 2.4.0-test11, which had serious filesystem corruption problems). You can find a recent kernel over at <uri link=\"http://www.kernel.org\">kernel.org</uri>, and a tutorial showing you how to recompile and install a new kernel from sources elsewhere on gentoo.org (see the <uri link=\"#resources\">Resources</uri> section later in this article)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):282 +msgid "Configuring the kernel" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):285 +msgid "I recommend that you configure your kernel so that Software RAID support is compiled-in, rather than supported as modules. When you type <c>make menuconfig</c> or <c>make xconfig</c>, you'll find the Software RAID settings under the \"Multi-device support (RAID and LVM)\" section. I also recommend that you enable everything RAID-related here, including \"Boot support\" and \"Auto Detect support\". This will allow the kernel to auto-start your RAID volume at boot-time, as well as allow you to create a root RAID filesystem if you so desire. Here's a snapshot of <c>make menuconfig</c>. The last two options (LVM support) are not required, although I compiled them into the kernel anyway:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(figure:link):300 +msgid "/images/docs/l-raid.gif" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(figure:caption):300 +msgid "Configuring the kernel for RAID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):302 +msgid "Once the kernel is properly configured, install it and reboot. Now let's track down the latest version of raidtools." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):310 ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):329 +msgid "Installing raidtools" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):313 +msgid "Before we can install raidtools we need to do a bit of searching to find the latest version. You can generally find the raidtools program at <uri link=\"http://www.kernel.org\">kernel.org</uri>. Now track down the most recent \"raidtools-0.90\" archive (not \"raid0145\"!). Currently it's \"raidtools-19990824-0.90.tar.gz\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):321 +msgid "If you like living on the bleeding edge (and if you're using a 2.4.0-test kernel, then you do), you may want to head over to RedHat (see <uri link=\"#resources\">Resources</uri>) and snag the latest version of raidtools you can find. Currently it's \"raidtools-dangerous-0.90-20000116.tar.gz\"." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):329 +#, no-wrap +msgid "\n# <i>cd raidtools-0.90</i>\n# <i>./configure</i>\n# <i>make</i>\n# <i>make install</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):336 +msgid "Examining RAID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):336 +#, no-wrap +msgid "\n# <i>cat /proc/mdstat</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):343 +msgid "Partition setup" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):346 +msgid "OK, now it's time to prepare some disk partitions, of which you'll need at least two. If you're using RAID-0, make sure they're on separate disks and approximately the same size. It goes without saying that the data on these partitions will be destroyed." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):353 +msgid "One other important note -- when you create your partitions, give them the partition type <c>FD</c>. This will allow the Linux kernel to recognize them as Linux RAID partitions, so they will be autodetected and started at every boot. If you don't mark your RAID partitions this way, you'll need to type <c>raidstart --all</c> after every boot before you can mount your RAID volumes. That can be annoying, so set the partition type correctly." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):367 +msgid "/etc/raidtab setup" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):370 +msgid "The raidtab syntax is fairly easy to figure out: each block of directives begins with a <c>raiddev</c> entry specifying the RAID volume that will be created. When you installed raidtools, the Makefile created <path>/dev/md0</path> through <path>md15</path> for you, so they're available for use." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):378 +msgid "Next, <c>nr-raid-disks</c> should specify the number of disks in your array. Then you set the <c>persistent-superblock</c> to <c>1</c>, telling the raid tools that when this volume is created, a special superblock should be written to each constituent device describing the configuration of the RAID array. The Linux kernel uses this information to auto-detect and start up RAID arrays at boot time, so you should make sure that every RAID volume you create is configured to do this." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):389 +msgid "<c>chunk-size</c> specifies the granularity of the chunks used for RAID-0 in kilobytes. In this example, our RAID-0 volume will write to its constituent partitions in 32K blocks; that is, the first 32K of the RAID volume maps to <path>hde1</path>, the second 32K maps to <path>hdg1</path>, etc. We also specify a chunk size for our <path>/dev/md1</path> linear volume -- this is just a dummy entry and doesn't mean anything." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):399 +msgid "Finally, you specify the devices that make up the volume. First you specify the actual block device with a <c>device</c> line, and then you immediately follow it with a <c>raid-disk</c> entry that specifies its position in the array, starting with zero." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):406 +msgid "Once you've created your own <path>/etc/raidtab</path> file, you're ready to do a one-time initialization of the array." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):414 +msgid "mkraid and creating the filesystem" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):417 +msgid "OK. Our partitions are created, the raidtab file is in place -- now it's time to initialize our first partition by using the <c>mkraid</c> command:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):423 +msgid "Initializing the partition" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):423 +#, no-wrap +msgid "\n# <i>mkraid /dev/md0</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):427 +msgid "After this command completes, <path>/dev/md0</path> will be initialized and the md0 array will be started. If you type <c>cat /proc/mdstat</c>, you should see something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):433 +msgid "cat /proc/mdstat" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):433 +#, no-wrap +msgid "\nPersonalities : [linear] [raid0] [raid1] [raid5]\nread_ahead 1024 sectors\nmd0 : active raid0 hdg1[1] hde1[0]\n 90069632 blocks 32k chunks\n \nunused devices: <none>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):442 +msgid "Yay! Our RAID device is up and running. All we need to do now is create a filesystem on it. To do this, use the <c>mke2fs</c> command or the <c>mkreiserfs</c> command (RAID-0 and ReiserFS is a great combination!):" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):449 +msgid "An ext2 RAID device" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):449 +#, no-wrap +msgid "\n# <i>mke2fs /dev/md0</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):453 +msgid "or" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):457 +msgid "A ReiserFS RAID device" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):457 +#, no-wrap +msgid "\n# <i>mkreiserfs /dev/md0</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):461 +msgid "Now your new filesystem can be mounted:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):465 +msgid "Mounting the new RAID device" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):465 +#, no-wrap +msgid "\n# <i>mkdir /mnt/raid</i>\n# <i>mount /dev/md0 /mnt/raid</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):470 +msgid "Feel free to add a <path>/dev/md0</path> entry to your fstab. It goes something like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre:caption):475 +msgid "Editing fstab" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(pre):475 +#, no-wrap +msgid "\n/dev/md0 /mnt/raid reiserfs defaults 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(p):479 +msgid "If you set the partition type correctly to <c>FD</c>, your RAID volume will be auto-started at boot time. Now all that's left to do is use and enjoy your new Software RAID volume. And catch my second Software RAID article, in which we'll take a look at some more advanced Software RAID functionality and RAID-1." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(title):491 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):495 +msgid "Read <uri link=\"/doc/en/articles/software-raid-p2.xml\">Part 2</uri> in Daniel's series on RAID, where he explains what software RAID-1, 4, and 5 can and cannot do for you and how you should approach the implementation of these RAID levels in a production environment." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):502 +msgid "The <uri link=\"http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html\"> Software-RAID HOWTO</uri> is another excellent resource for information related to Linux Software RAID." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):508 +msgid "You may want to check out the <uri link=\"http://www.tldp.org/HOWTO/Boot+Root+Raid+LILO.html\"> Boot+Root+RAID+Lilo Software RAID HOWTO</uri> if you'd like to learn how to create a root RAID filesystem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):514 +msgid "For updated versions of raidtools-0.90, keep an eye on <uri link=\"http://people.redhat.com/mingo/raid-patches/\"> people.redhat.com</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):519 +msgid "Find a <uri link=\"http://www.kernel.org\">recent kernel</uri> in The Linux Kernel Archives." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):524 +msgid "Read Daniel's <uri link=\"/doc/en/articles/linux-kernel-compiling.xml\">tutorial</uri> on compiling and installing a new kernel from sources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):529 +msgid "Find the <uri link=\"http://people.redhat.com/mingo/raidtools/\"> raidtools program</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):533 +msgid "Snag the <uri link=\"http://people.redhat.com/mingo/raid-patches\"> latest version of raidtools</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(li):537 +msgid "Check out <uri link=\"http://linas.org/linux/raid.html\">more tips on Software Raid solutions for Linux</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml(None):0 +msgid "translator-credits" +msgstr "" + diff --git a/article/gettext/software-raid-p2.xml.pot b/article/gettext/software-raid-p2.xml.pot new file mode 100644 index 0000000..bd27745 --- /dev/null +++ b/article/gettext/software-raid-p2.xml.pot @@ -0,0 +1,293 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-10-22 00:23+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(guide:link):5 +msgid "/doc/en/articles/software-raid-p2.xml" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):6 +msgid "Software RAID in the new Linux 2.4 kernel, Part 2" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(author:title):8 +msgid "Author" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(mail:link):9 +msgid "drobbins@gentoo.org" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(mail):9 +msgid "Daniel Robbins" +msgstr "" + +#. xmlified by: Joshua Saddler (nightmorph@gentoo.org) +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(abstract):13 +msgid "In this two-part series, Daniel Robbins introduces you to Linux 2.4 Software RAID, a technology used to increase disk performance and reliability by distributing data over multiple disks. In this article, Daniel explains what software RAID-1, 4, and 5 can and cannot do for you and how you should approach the implementation of these RAID levels in a production environment. In the second half of the article, Daniel walks you through the simulation of a RAID-1 failed drive replacement." +msgstr "" + +#. The original version of this article was first published on IBM +#. developerWorks, and is property of Westtech Information Services. This +#. document is an updated version of the original article, and contains +#. various improvements made by the Gentoo Linux Documentation team +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(version):29 +msgid "1.1" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(date):30 +msgid "2005-10-09" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):33 +msgid "Setting up RAID-1 in a production environment" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):35 +msgid "Real-world RAID" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):38 +msgid "In my <uri link=\"/doc/en/articles/software-raid-p1.xml\">previous article</uri>, I introduced you to Linux 2.4's software RAID functionality, showing you how to set up linear, RAID-0, and RAID-1 volumes. In this article, we look at what you need to know in order to use RAID-1 to increase availability in a production environment. This requires a lot more understanding and knowledge than just setting up RAID-1 on a test server or at home -- specifically, you'll need to know exactly what RAID-1 will protect you against, and how to keep your RAID volume up and running in case of a disk failure. In this article, we'll cover these topics, starting with an overview of what RAID-1, 4, and 5 can and can't do for you, and ending with a complete test simulation of a failed RAID 1 drive replacement -- something that you should actually do (with this article as your guide) if at all possible. After going through the simulation, you'll have all the experience you need to handle a RAID-1 failure in a real-world environment." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):60 +msgid "What RAID doesn't do" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):63 +msgid "The fault-tolerant features of RAID are designed to protect you from the negative impacts of a spontaneous complete drive failure. That's a good thing. But RAID isn't a perfect fix for every kind of reliability problem. Before implementing a fault-tolerant form of RAID (1,4,5) in a production environment, it's extremely important that you know exactly what RAID will and <b>will not</b> do for you. When we're in a situation where we're depending on RAID to perform, we don't want to make any false assumptions about what it does. Let's start by dispelling common myths about RAID 1, 4, and 5." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):75 +msgid "A lot of people think that if they place all their important data on a RAID 1/4/5 volume, then they won't have to perform regular backups. This is completely false -- here's why. RAID 1/4/5 helps to protect against unplanned <e>downtime</e> caused by a random drive failure. However, it offers no protection against accidental or malicious <e>data corruption</e>. If you type <c>cd /; rm -rf *</c> as root on a RAID volume, you'll lose a lot of very important data in a matter of seconds, and the fact that you have a 10 drive RAID-5 configuration will be of little significance. Also, RAID won't help you if your server is physically stolen or if there's a fire in your building. And of course, if you don't implement a backup strategy, you won't have an archive of past data -- if someone in your office deletes a bunch of important files, you won't be able to recover them. That alone should be enough to convince you that, in most circumstances, you should plan and implement a backup strategy <e>before</e> even thinking about tackling RAID-1, 4, or 5." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):94 +msgid "Another mistake is to implement software RAID on a system composed of low-quality hardware. If you're putting together a server that's going to do something important, it makes sense to purchase the highest-quality hardware that's still comfortably within your budget. If your system is unstable or improperly cooled, you'll run into problems that RAID can't solve. On a similar note, RAID obviously can't give you any additional uptime in the case of a power outage. If your server is going to be doing anything relatively important, make sure that it's been equipped with an uninterruptible power supply (UPS)." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):106 +msgid "Next, we move on to filesystem issues. The filesystem exists \"on top\" of your software RAID volume. This means that using software RAID does not allow you to escape filesystem issues, such as long and potentially problematic <c>fsck</c>s if you happen to be using a non-journalled or flaky filesystem. So, software RAID isn't going to make the ext2 filesystem more reliable; that's why it's so important that the Linux community has ReiserFS, as well as JFS and XFS in the works. Software RAID and a reliable journalling filesystem make a great combination." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):120 +msgid "RAID - intelligent implementation" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):123 +msgid "Hopefully, the previous section dispelled any RAID myths that you might have had. When you implement RAID-1, 4, or 5, it's very important that you view the technology as something that will enhance <e>uptime</e>. When you implement one of these RAID levels, you're protecting yourself against a very specific situation -- a spontaneous complete (single or multiple) drive failure. If you experience this situation, software RAID will allow the system to continue running, while you make arrangements to replace the failed drive with a new one. In other words, if you implement RAID 1, 4, or 5, you'll be reducing your risk of having a long, unplanned downtime due to a complete drive failure. Instead, you can have a short planned downtime -- just enough time to replace the dead drive. Obviously, this means that if having a highly-available system isn't a priority for you, then you shouldn't be implementing software RAID, unless you plan to use it primarily as a way to boost file I/O performance." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):141 +msgid "A smart system administrator uses software RAID for a specific purpose -- to improve the reliability of an already very reliable server. If you're a smart sysadmin, you've already covered the basics. You've protected your organization against catastrophe by implementing a regular backup plan. You've hooked your server up to a UPS, and have the UPS monitoring software up and running so that your server will shut down safely in the case of an extended power outage. Maybe you're using a journalling filesystem such as ReiserFS to reduce <c>fsck</c> time and increase filesystem reliability and performance. And hopefully, your server is well-cooled and is composed of high-quality hardware, and you've paid close attention to security issues. Now, and only now, should you consider implementing software RAID-1, 4 or 5 -- by doing so, you'll potentially give your server a few more percentage points of uptime by guarding it against a complete drive failure. Software RAID is that added layer of protection that makes an already rugged server even better." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):165 +msgid "A RAID-1 walkthrough" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):169 +msgid "Now that you've read about what RAID can and can't do, I hope you have reasonable expectations and the right attitude. In this section, I'll walk you through the process of simulating a disk failure, and then bringing your RAID volume back out of degraded mode. If you're have the ability to set up a RAID-1 volume on a test machine and follow along with me, I highly recommend that you do so. This kind of simulation can be fun. And having a little fun right now will help to ensure that when a drive really fails, you'll be calm and collected, and know exactly what to do." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(impo):181 +msgid "To perform this test, it's essential that you set up your RAID-1 volume so that you can still boot your Linux system with one hard drive unplugged, because this is how we're going to simulate a drive failure." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):187 +msgid "OK, our first step is to set up a RAID-1 volume; refer to my <uri link=\"/doc/en/articles/software-raid-p1.xml\">previous article</uri> if you need a refresher on how to do this. Once you've set up your volume, you'll see something like this if you <c>cat /proc/mdstat</c>:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):194 +msgid "Examining the RAID volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):194 +#, no-wrap +msgid "\n# <i>cat /proc/mdstat</i>\nPersonalities : [linear] [raid0] [raid1] [raid5] \nread_ahead 1024 sectors\nmd0 : active raid1 ide/host2/bus0/target0/lun0/part1[1] ide/host0/bus0/target0/lun0/part5[0]\n 4610496 blocks [2/2] [UU]\n [======>..............] resync = 34.8% (1606276/4610496) finish=3.2min speed=15382K/sec\n\nunused devices: <none>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):205 +msgid "Note that I'm using devfs, and that's why you see the extremely long device names listed above. I'm actually using <path>/dev/hda5</path> and <path>/dev/hde1</path> as my RAID-1 disks. At the moment, the kernel software RAID code is synchronizing the drives so that they're exact mirrors of each other. If your RAID-1 volume is at this point, you can go ahead and create a filesystem on the volume, and then mount it somewhere. Copy some files over to it, and then set up your <path>/etc/fstab</path> so that the volume (<path>/dev/md0</path>) will be mounted when your system boots. Here's the line I added to my fstab; yours may differ slightly:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):218 +msgid "fstab information" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):218 +#, no-wrap +msgid "\n/dev/md0 /mnt/raid1 reiserfs defaults 0 0\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):222 +msgid "OK; we're almost ready to simulate a drive failure, but not quite. First, <c>cat /proc/mdstat</c> again, and wait until all your volume's disks are synchronized. When they are, your <path>/proc/mdstat</path> will look like this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):229 +msgid "Re-examining the RAID volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):229 +#, no-wrap +msgid "\n# cat /proc/mdstat \nPersonalities : [linear] [raid0] [raid1] [raid5] \nread_ahead 1024 sectors\nmd0 : active raid1 ide/host2/bus0/target0/lun0/part1[1] ide/host0/bus0/target0/lun0/part5[0]\n 4610496 blocks [2/2] [UU]\n \nunused devices: <none>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):242 +msgid "The simulation begins" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):245 +msgid "OK, now that the resync is complete, we're ready for the simulation. Go ahead and shut down your machine and power it down. Then, open it up and unplug one of the hard disks that make up your RAID-1 array. Of course, you won't want to unplug the disk that contains your Linux root partition -- we'll need to boot Linux again! OK, now that the hard drive is unplugged, bring the machine back up. Once you log in, you should find that <path>/dev/md0</path> is mounted and that you're still able to use the volume. When you <c>cat /proc/mdstat</c>, you'll see the major change:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):258 +msgid "Missing a disk" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):258 +#, no-wrap +msgid "\n# <i>cat /proc/mdstat</i>\nPersonalities : [linear] [raid0] [raid1] [raid5]\nread_ahead 1024 sectors\nmd0 : active raid1 ide/host0/bus0/target0/lun0/part5[0]\n 4610496 blocks [2/1] [U_]\n \nunused devices: <none>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):268 +msgid "Here, you can see that my <path>/dev/md0</path> volume is running in degraded mode. I unplugged drive <path>/dev/hde</path>, so <path>/dev/hde1</path> wasn't found when the kernel booted and tried to autostart my array. Fortunately, the kernel found <path>/dev/hda5</path>, and <path>/dev/md0</path> was able to start in degraded mode. As you can see, the <path>/dev/hde1</path> partition isn't listed in <path>/proc/mdstat</path>, and one of the RAID disks is marked as \"down\" (<c>[U_]</c> instead of <c>[UU]</c>). But hey, since <path>/dev/md0</path> is still going, software RAID-1 is doing what it's supposed to do: keeping our data available." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):285 +msgid "Recovery" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):288 +msgid "Right now, we're experiencing a simulated drive failure. If the drive that currently doesn't have power actually failed while the system was running, this is the kind of situation we'd be in. Our RAID-1 volume would be running in degraded mode, meaning that our volume is still available but without any redundancy. At a convenient time, we'd want to shut down the system, replace the failed drive, and start the system back up again. Our RAID-1 volume would still be running in degraded mode at this point." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):299 +msgid "Once we have the new drive in the machine, we'd want to create a RAID autodetect (<c>FD</c>) partition of the appropriate size on our new disk. An additional reboot may be needed so that Linux can reread the disk's partition tables. Once the new partition is visible to the system, we're ready to restore our degraded RAID-1 array -- then, we'll have some redundancy again." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):308 +msgid "Of course, we're only performing a simulation. To practice adding a partition back into our RAID array, we can do one of two things, depending on what kind of scenario you'd like to prepare or. You can either shut down your machine, plug the drive in, boot it up, and add the old partition back to the array, or you can shut down your machine, plug the drive in, boot up, wipe the drive, create a <e>new</e> RAID autodetect (<c>FD</c>) partition to add the array (of the correct size, of course -- at least as big as the partition it's replacing) and then add this brand-new partition to the array. The second choice would be closer to what would happen in the event of a real drive failure, while the first would simulate something like a failed disk controller or bad cable situation -- where one of your mirror drives was temporarily unavailable, causing <path>/dev/md0</path> to run in degraded mode, and requiring one of the partitions to be added back to the volume after the problem was remedied. Whichever simulation you choose to do, the \"fix\" is the same -- after the new partition is ready, we need to manually add it back to the <path>/dev/md0</path> volume." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):332 +msgid "Looking at dmesg" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):335 +msgid "Before we add the partition back to our array, this would be a good time to take a look at our kernel boot messages. If you type <c>dmesg | more</c>, you'll be able to view the kernel boot messages. You should see a bunch of text similar to this:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):342 +msgid "Kernel boot messages" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):342 +#, no-wrap +msgid "\nlinear personality registered\nraid0 personality registered\nraid1 personality registered\nraid5 personality registered\nraid5: measuring checksumming speed\n 8regs : 1291.209 MB/sec\n 32regs : 1195.197 MB/sec\n pII_mmx : 2110.740 MB/sec\n p5_mmx : 2652.522 MB/sec\nraid5: using function: p5_mmx (2652.522 MB/sec)\nmd driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27\nmd.c: sizeof(mdp_super_t) = 4096\nautodetecting RAID arrays\n(read) ide/host0/bus0/target0/lun0/part5's sb offset: 4610560 [events: 00000004]\n(read) ide/host2/bus0/target0/lun0/part1's sb offset: 4610496 [events: 00000002]\nautorun ...\nconsidering ide/host2/bus0/target0/lun0/part1 ...\n adding ide/host2/bus0/target0/lun0/part1 ...\n adding ide/host0/bus0/target0/lun0/part5 ...\ncreated md0\nbind<ide/host0/bus0/target0/lun0/part5,1>\nbind<ide/host2/bus0/target0/lun0/part1,2>\nrunning: <ide/host2/bus0/target0/lun0/part1><ide/host0/bus0/target0/lun0/part5>\nnow!\nide/host2/bus0/target0/lun0/part1's event counter: 00000002\nide/host0/bus0/target0/lun0/part5's event counter: 00000004\nmd: superblock update time inconsistency -- using the most recent one\nfreshest: ide/host0/bus0/target0/lun0/part5\nmd: kicking non-fresh ide/host2/bus0/target0/lun0/part1 from array!\nunbind<ide/host2/bus0/target0/lun0/part1,1>\nexport_rdev(ide/host2/bus0/target0/lun0/part1)\nmd0: max total readahead window set to 124k\nmd0: 1 data-disks, max readahead per data-disk: 124k\nraid1: device ide/host0/bus0/target0/lun0/part5 operational as mirror 0\nraid1: md0, not all disks are operational -- trying to recover array\nraid1: raid set md0 active with 1 out of 2 mirrors\nmd: updating md0 RAID superblock on device\nide/host0/bus0/target0/lun0/part5 [events: 00000005](write) ide/host0/bus0/target0/lun0/part5's sb offset: 4610560\nmd: recovery thread got woken up ...\nmd0: no spare disk to reconstruct array! -- continuing in degraded mode\nmd: recovery thread finished ...\n..\n.... autorun DONE.\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):388 +msgid "Now would be a good time to carefully read these messages, because they'll help you to understand the process that the kernel uses to autostart <path>/dev/md0</path>, giving you another valuable insight into the inner workings of Linux software RAID. If you read the kernel output listed above, you'll find that my kernel found <path>/dev/hda5</path> and <path>/dev/hde1</path>, but <path>hde1</path> was out of sync with <path>hda5</path>. So, the kernel started up <path>/dev/md0</path> in degraded mode, using <path>/dev/hda5</path> and not touching <path>/dev/hde1</path> at all. Now, it's time to add our original (or newly created) partition to our volume. Here's how." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):405 +msgid "Restoration continues" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):408 +msgid "First, if your replacement partition has a new device name, update <path>/etc/raidtab</path> so that it reflects this new information. Then, add the new partition to the volume using the following command, replacing <path>/dev/hde1</path> with the device name of the partition you're adding:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):416 +msgid "Adding the new device" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):416 +#, no-wrap +msgid "\n# <i>raidhotadd /dev/md0 /dev/hde1</i>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):420 +msgid "Your hard drive lights should begin glowing as reconstruction begins. Go ahead and <c>cat /proc/mdstat</c> to check the status of the RAID-1 reconstruction that's now in progress:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):426 +msgid "Check the status of the RAID-1 reconstruction" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):426 +#, no-wrap +msgid "\n# <i>cat /proc/mdstat</i>\nPersonalities : [linear] [raid0] [raid1] [raid5] \nread_ahead 1024 sectors\nmd0 : active raid1 ide/host2/bus0/target0/lun0/part1[2] ide/host0/bus0/target0/lun0/part5[0]\n 4610496 blocks [2/1] [U_]\n [>....................] recovery = 1.8% (84480/4610496) finish=3.5min speed=21120K/sec\nunused devices: <none>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):436 +msgid "In a matter of minutes, your RAID-1 volume will be back to normal:" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre:caption):440 +msgid "The normal RAID volume" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(pre):440 +#, no-wrap +msgid "\n# <i>cat /proc/mdstat</i>\nPersonalities : [linear] [raid0] [raid1] [raid5] \nread_ahead 1024 sectors\nmd0 : active raid1 ide/host2/bus0/target0/lun0/part1[1] ide/host0/bus0/target0/lun0/part5[0]\n 4610496 blocks [2/2] [UU]\n \nunused devices: <none>\n" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(p):450 +msgid "Voila! We've successfully recovered from a simulated drive failure, and you're ready to start using RAID-1 in a production environment. You can now affix your homemade \"RAID-1 certified\" sticker to your forehead and begin flapping your arms and running around the office to the delight of your coworkers. Actually, maybe that isn't such a great idea. See you in the next article." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(title):462 +msgid "Resources" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):466 +msgid "Read <uri link=\"/doc/en/articles/software-raid-p1.xml\">Part 1</uri> in Daniel's series on RAID, where he introduces Linux 2.4's software RAID functionality and shows how to set up linear, RAID-0, and RAID-1 volumes" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):473 +msgid "The <uri link=\"http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html\"> Software-RAID HOWTO</uri> is another excellent resource for information related to Linux Software RAID." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):479 +msgid "You may want to check out the <uri link=\"http://www.tldp.org/HOWTO/Boot+Root+Raid+LILO.html\"> Boot+Root+RAID+Lilo Software RAID HOWTO</uri> if you'd like to learn how to create a root RAID filesystem." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):485 +msgid "For updated versions of raidtools-0.90, keep an eye on <uri link=\"http://people.redhat.com/mingo/raid-patches/\"> people.redhat.com</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):490 +msgid "Find a <uri link=\"http://www.kernel.org\">recent kernel</uri> in The Linux Kernel Archives." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):495 +msgid "Read Daniel's <uri link=\"/doc/en/articles/linux-kernel-compiling.xml\">tutorial</uri> on compiling and installing a new kernel from sources." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):500 +msgid "Find the <uri link=\"http://people.redhat.com/mingo/raidtools/\"> raidtools program</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):504 +msgid "Snag the <uri link=\"http://people.redhat.com/mingo/raid-patches\"> latest version of raidtools</uri>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(li):508 +msgid "Check out <uri link=\"http://linas.org/linux/raid.html\">more tips on Software Raid solutions for Linux</uri>." +msgstr "" + +#. Place here names of translator, one per line. Format should be NAME; ROLE; E-MAIL +#: ../../gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml(None):0 +msgid "translator-credits" +msgstr "" + |