Complete Common File System Tasks in Software

Generator Code 128C in Software Complete Common File System Tasks

Complete Common File System Tasks
Printing Code128 In None
Using Barcode creator for Software Control to generate, create Code 128 Code Set A image in Software applications.
Code 128 Scanner In None
Using Barcode scanner for Software Control to read, scan read, scan image in Software applications.
FIGURE 6-27
USS Code 128 Generation In C#.NET
Using Barcode encoder for .NET Control to generate, create Code 128C image in VS .NET applications.
Code 128 Code Set B Generation In .NET Framework
Using Barcode printer for ASP.NET Control to generate, create Code 128 Code Set C image in ASP.NET applications.
Using YaST to install the findutils-locate package
Make Code 128 Code Set C In Visual Studio .NET
Using Barcode generator for VS .NET Control to generate, create Code128 image in .NET framework applications.
Code 128 Code Set B Maker In Visual Basic .NET
Using Barcode generator for .NET framework Control to generate, create Code128 image in Visual Studio .NET applications.
With the index updated, you can search for files by simply entering locate filename at the shell prompt For example, if you wanted to search for a file named snmpdconf, you could enter locate snmpdconf This is shown in Figure 6-28 Notice that locate found several files in Figure 6-28 that had the text snmpdconf somewhere in the file name With this in mind, let s next discuss how to use grep
EAN-13 Encoder In None
Using Barcode generator for Software Control to generate, create EAN 13 image in Software applications.
Draw Universal Product Code Version A In None
Using Barcode maker for Software Control to generate, create UPC-A image in Software applications.
Using grep
Printing ANSI/AIM Code 128 In None
Using Barcode maker for Software Control to generate, create USS Code 128 image in Software applications.
Bar Code Creator In None
Using Barcode maker for Software Control to generate, create bar code image in Software applications.
Thus far, we ve discussed utilities that search for files in the file system However, Linux also provides a utility called grep that you can use to search for content within a file The grep utility is extremely useful Using grep, you can search through a file
Print Code 39 Full ASCII In None
Using Barcode maker for Software Control to generate, create Code39 image in Software applications.
Painting Barcode In None
Using Barcode creation for Software Control to generate, create bar code image in Software applications.
6: Managing the Linux File System
Creating UPCE In None
Using Barcode generator for Software Control to generate, create UPC - E0 image in Software applications.
ANSI/AIM Code 128 Creation In Visual Basic .NET
Using Barcode creator for Visual Studio .NET Control to generate, create Code 128A image in .NET applications.
FIGURE 6-28
Drawing ANSI/AIM Code 128 In Java
Using Barcode drawer for Java Control to generate, create Code 128 Code Set A image in Java applications.
Scan Code 128B In VB.NET
Using Barcode reader for .NET Control to read, scan read, scan image in .NET applications.
Using locate to search for files
EAN13 Generator In Java
Using Barcode encoder for Java Control to generate, create GS1 - 13 image in Java applications.
Printing 1D In VB.NET
Using Barcode encoder for Visual Studio .NET Control to generate, create Linear Barcode image in .NET applications.
for a particular text string This can come in handy when you want to search a very large log file for a specific message You can also use grep to search through multiple files to locate a particular text string To use grep, you would enter grep search_text file For example, let s suppose you want to want to search through your /var/log/messages file for any log entries related to the VNC service running on your Linux system You would enter grep vnc /var/log/messages The grep utility would then display each line from the file that contained your search term, as shown in Figure 6-29
ANSI/AIM Code 128 Generator In Java
Using Barcode generation for Android Control to generate, create Code 128B image in Android applications.
Print Barcode In VS .NET
Using Barcode drawer for VS .NET Control to generate, create barcode image in .NET applications.
FIGURE 6-29
Searching for content with grep
Complete Common File System Tasks
SCENARIO & SOLUTION
You are working on a Linux system and need to determine where the crontab resides in the file system What command would you use You need to find a line that contains the directive server in your /etc/ntpconf file What command could you use to do this You could enter find / name crontab Or, if the findutils-locate package is installed, you could enter locate crontab You could enter grep server /etc/ntpconf
When working with grep, you can use the following options:
i l
Ignores case when searching for the search text
Doesn t display the actual matching line of text Only displays the names of the files that contain the matching text Searches recursively through subdirectories of the path specified
r
Let s practice using Linux search tools in the following exercise
EXERCISE 6-3
ON THE CD
Using Linux Search Tools
In this exercise, you will practice using Linux search tools Complete the following: 1 Verify that you are logged in to your Linux system 2 Change to your root user account by entering su and entering your root password If you used the exercises in 3 of this book to set up your system, your root user password is tuxPenguin1 3 Search for a file named xinetdconf by entering find / name xinetdconf at the shell prompt Where is this file located 4 At the shell prompt, enter locate / name xinetdconf 5 Locate references to the xinetdconf file in your system log file by entering grep xinetdconf /var/log messages What can you learn about this file from the output of grep Now it s time to work with disk partitions
6: Managing the Linux File System
CERTIFICATION OBJECTIVE 603
Manage Disk Partitions
When you initially installed your Linux system, you defined a series of partitions on your hard disk drives to host your file system Depending on which distribution you installed, you probably used some kind of graphical or menu-driven partitioning utility to accomplish this After the system has been in use for a while, it s likely that you will need to add more storage space at some point If you install a new hard disk in the system, you will need to partition it and create a file system on it To do this, most distributions provide you with some type of graphical partitioning utility For example, on a SUSE Linux system, you can use the YaST Partitioner module to manage the partitions on your system This utility is shown in Figure 6-30 These utilities work great; however, for your Linux+ certification exam, you have to know how to manage your partitions from the command line In this part of the chapter, you will learn the following:
Using fdisk to create disk partitions Building a file system with mkfs Mounting a partition with mount Checking the file system with fsck
Copyright © OnBarcode.com . All rights reserved.