• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
101 4.7 find system files and place files in the correct location
 

101 4.7 find system files and place files in the correct location

on

  • 253 views

 

Statistics

Views

Total Views
253
Views on SlideShare
253
Embed Views
0

Actions

Likes
1
Downloads
4
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    101 4.7 find system files and place files in the correct location 101 4.7 find system files and place files in the correct location Presentation Transcript

    • Junior Level Linux Certification
    • Exam Objectives Key Knowledge Areas Understand the correct locations of files under the FHS. Find files and commands on a Linux system. Know the location and purpose of important file and directories as defined in the FHS. Objective 4: Devices, Linux Filesystems, Filesystem Hierarchy Standard Find system files and place files in the correct location Weight: 2 Terms and Utilities find locate updatedb whereis which type /etc/updatedb.conf 2
    • File system Hierarchy Standard 3 Directories required in / by the Filesystem Hierarchy Standard Set of requirements and guidelines for file and directory placement under UNIX-like operating systems. Directory Description bin Essential command binaries boot Static files of the boot loader dev Device files etc Host-specific system configuration lib Essential shared libraries and kernel modules media Mount point for removable media mnt Mount point for mounting a filesystem temporarily opt Add-on application software packages sbin Essential system binaries srv Data for services provided by this system tmp Temporary files usr Secondary hierarchy var Variable data http://www.pathname.com/fhs/ Create partitions and filesystems
    • Filesystem Hierarchy Standard 4 Ex: Create partitions and filesystems
    • Locating Files # find /home/angie –name stuff /home/angie/stuff # find /home/angie –user root /home/angie/morestuff find utility is used to search for files. 5 Find system files and place files in the correct location Syntax: find /path expression Ex: Options: -atime Searches based on the number of days since last accessed. -ctime Searches based on the number of days since directory entry last changed. -group Searches for files belonging to the specified group. -newer Searches for files more recent than the specified file. -name Searches for files with names matching the specified string. -user Searches for files belonging to the specified user.
    • Locating Files locate provides a secure way to index and quickly search for files on your system. Uses slocate database, by default, to find file locations. Db is updated with cmd updatedb 6 Find system files and place files in the correct location Syntax: locate –options arguments Options: -u Start at / when creating the slocate database. -U /PATH Start at the specified path when creating the slocate database. -e DIR Exclude the specified directories when creating the slocate database. -c Parses the /etc/updatedb.conf file when creating the database. -i Searches without regard to case. -o FILE Specifies the output file to create. -d PATH Specifies the path of databases to search. The database is located in: /etc/updatedb.conf
    • Locating Files # which locate /usr/bin/locate which takes one or more arguments. For each argument it prints to stdout 7 Find system files and place files in the correct location Syntax: which –options program-name Ex:
    • Locating Files whereis locates source/binary and manuals sections for specified files. 8 Find system files and place files in the correct location Options: -b Searches for binaries. -m Searches for manual entries. -s Searches for sources. -u Searches for unusual entries that don’t have one entry for each type. -B Changes where whereis searches for binaries. -M Changes where whereis searches for manual sections. -S Changes where whereis searches for source code. # whereis ls ls: /bin/ls /usr/man/man1/ls.1.gz Ex:
    • Fim de sessão 9
    • Fim de sessão 9