WGU Operating Systems 1 Chapter 4

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Sticky Bit

The sticky bit has changed meaning during the course of Unix history. In modern Linux implementations (and most modern versions of Unix), it's used to protect files from being deleted by those who don't own the files. When this bit is present on a directory, the directory's files can be deleted only by their owners, the directory's owner, or root. The sticky bit i indicated by a t in the world execute bit position, as in rwxr-xr-t.

What will be the outcome of the chmod o+t /mydirectory command?

The sticky bit will be enabled on the /mydirectory directory.

Which tar command should be used to archive the contents of the /home/user/tempdata directory in a new file named tempdata.tar within the current directory?

The tar -cf tempdata.tar /home/user/tempdata command

tar

The tar program's name stands for "tape archiver." Despite this fact, you can use tar to archive data to other media. In fact, tarballs (archive files created by tar and typically compressed with gzip or bzip2) are often used for transferring multiple files between computers in one step, such as when distributing source code.

Which command is used to change the modification and last access time of a file?

The touch command

What happens if the touch command is issued for a file that does not exist?

The touch command will create the file.

Which symbolic parameter should be used with the chmod command to change the permission string of a file from -rw-r--r-- to -rwx-r--r--?

The u+x symbolic parameter

Which command configures the file and directory creation mask?

The umask command

What are the two parameters that can be used to configure quotas in the /etc/fstab file?

The usrquota or grpquota parameters

whereis

The whereis program searches for files in a restricted set of locations, such as standard binary file directories, library directories, and man page directories. This tool does not search user directories or many other locations that are easily searched by find or locate.

What is the primary function of the mkdir command?

To create directories

rm

To delete a file, use the rm command, whose name is short for remove.

What is the function of the edquota command?

To manipulate the disk space quota for a user

-rw-rw-r--

What will be the file permission of a user with umask value 002?

mkdir

Which command is used to create a directory in a Linux computer?

user mask (umask)

A bit pattern representing the permission bits that are to be removed from new files as they're created by processes.

Wildcard

A character or group of characters that, when used in a shell as part of a filename, matches more than one character. For instance, b??k matches book, back, and buck, among many other possibilities.

Soft link

A type of file that refers to another file on the computer. When a program tries to access a soft link, Linux passes the contents of the linked-to file to the program. If the linked-to program is deleted, the soft link stops working. Deleting the soft link doesn't affect the original file. Also referred to as a symbolic link

Symbolic link

A type of file that refers to another file on the computer. When a program tries to access a soft link, Linux passes the contents of the linked-to file to the program. If the linked-to program is deleted, the soft link stops working. Deleting the soft link doesn't affect the original file. Also referred to as a symbolic link.

Superuser

A user with extraordinary rights to manipulate critical files on the computer. The superuser's username is normally root.

Filesystem Standard (FSSTND)

An early attempt to define the names and contents of critical directories in a Linux filesystem (meaning 2). The FSSTND has been supplanted by the FHS.

What is the purpose of /lib?

It contains all libraries required at system startup and run in the root filesystem.

What is the purpose of /usr/local/lib?

It contains libraries for downloaded programs and programs that were not part of the Linux distribution.

What is the purpose of /usr/lib?

It contains libraries used by the system internally.

Which option of the chown command makes the command recursive and changes the ownership of the subdirectories?

The -R option

Which parameter of the chmod command change files and directories recursively?

The -R or --recursive parameter

Which parameter is used with the bzip2 command to decompress the specified files?

The -d or --decompress parameter

Which option of the mv command prevents you from being prompted if you want to overwrite the files?

The -f option

Which option of the mv command will prompt you for permission before overwriting any files?

The -i option

Which expression of the find command limits the search to the directory and the next two layers of subdirectories?

The -maxdepth 2 expression

If the parent directories do not exist, which parameter should be used with the mkdir command to create parent directories of a directory?

The -p or --parents parameter

Which parameter of the mkdir command creates the parent directories specified in the directory path if they do not exist?

The -p parameter

Which parameter of the find command checks the file permissions?

The -perm parameter

Which option of the mv command moves the file only when the source file is newer than the destination file or when the destination file is missing?

The -u option

Which parameter of the cpio command to ensure that all files are replaced with the versions from the backup file?

The -u parameter

While creating the archive of a directory, which parameter should you use with the tar command to display a list of files and directories being archived?

The -v parameter

Which file should you edit to configure user disk quotas on your Linux server?

The /etc/fstab file

By default, in which system directory is the find command located?

The /usr/bin directory

Which system directory stores the logging and spooling information for a user?

The /var directory

Which command is used to uncompress a file that was compressed using the bzip2 command?

The bunzip2 command

Which command allows you to change a file's attributes?

The chattr command

Which command will enable a sticky bit on a directory named /home/usr/shared, and grant the read, write, and execute permissions to all the users of the /home/usr/shared directory?

The chmod 1777 /home/usr/shared command

Which command changes the access permissions associated with a file or directory?

The chmod command

Which command can be used to enable the sticky bit on the /home/user/userdata directory without changing the directory permissions?

The chmod o+t /home/user/userdata command

Which command changes the owner of a file?

The chown command

Which command changes the ownership of a directory but not the permissions of the directory?

The chown command

What will the find command do if you issue the find / -perm 4000 >> /var/log/ command daily?

The command will search for files in the / directory that have the Set User Identifier (SUID) permission, and will append the output in the /var/log/ file on a daily basis.

What are the three common compression utilities in Linux?

The compress, gzip, and bzip2 utilities

cp

The cp command copies a file.

Which command will be used to copy a file named mydocument.dat from the present working directory to the /home/usr/files directory?

The cp mydocument.dat /home/usr/files command

cpio

The cpio program is similar in principle to tar, but the details of its operation differ. As with tar, you can direct its output straight to a tape device or to a regular file. Backing up to a tape device can be a convenient way to back up the computer because it requires no intermediate storage. To restore data, you use cpio to read directly from the tape device file or from a regular file.

What element cannot be modified using the touch command?

The creation time of the file

Which command can be used to create the duplicate image of a boot disk?

The dd command

Which command is used to create an image of a boot disk for duplication?

The dd command

What happens when a directory's sticky bit is set and someone tries to rename or delete a file in the directory?

The filesystem treats the files in the directory so that they cannot be renamed or deleted by anyone except the file's owner, the directory's owner, or root.

Which command should a user issue to search for a file named cache.log in the current directory structure?

The find -name cache.log command

Which command should you issue to find all the files and directories in the current directory that have the 1777 permission?

The find . -perm 1777 command

Which two commands are used to search for files and directories on a file system?

The find command and the locate command

Which command is used to view all the files and directories within a directory, including the hidden files and directories?

The ls -al command

Which command should the user issue to view details, such as the permission string, size, creation date, and group name, regarding a file?

The ls -al filename command

Which command is used to list all the contents in a directory?

The ls command

ls

The ls command displays the names of files in a directory.

Which command will create a directory named /temp with a numeric permission string of 1777?

The mkdir -m 1777 /temp command

mkdir

The mkdir command creates a directory.

mv

The mv command (short for move) is commonly used both to move files and directories from one location to another and to rename them. Linux doesn't distinguish between these two types of operations, although many users do.

Which symbolic parameter can be used with the chmod command to grant the execute permission to the other users on a file?

The o+x symbolic parameter

Which symbol is prefixed to hide a file or a directory?

The period (.)

How will you know whether a directory has a sticky bit enabled?

The permission string of the directory will end with a t character, such as drwxrwxrwt.

What will be the effect of issuing the chmod u=rw myfile.txt command on the file permissions for the group users of the myfile.txt file?

The permissions for the group users on myfile.txt will remain unchanged.

File globbing

The process of wildcard expansion-for instance, matching the existing file glossary.txt when the string glos*.txt is typed. Also called globbing.

Which command is used to display the current and total disk space used by a user?

The quota command

Which commands are used to enable and disable the quota for a user?

The quotaon and quotaoff commands

Which command reports the quota information and disk usage on the file system?

The repquota command

Which command is used to delete files in a Linux system?

The rm command

rmdir

The rmdir command is the opposite of mkdir; it destroys a directory.

Which parameter of the chmod command is used to set the SUID and SGID permissions for the file specified?

The s parameter

set group ID (SGID)

The set group ID (SGID) option is similar to the SUID option, but it sets the group of the running program to the group of the file. It's indicated by an s in the group execute bit position in the permission string, as in rwxr-sr-x. When the SGID bit is set on a directory, new files or subdirectories created in the original directory will inherit the group ownership of the directory, rather than be based on the user's current default group.

Which command configures Extended ACL permissions for a file?

The setfacl command

Which command ensures that only the owner and the owner's group have read, write, and execute permissions to the data directory?

chmod 770 data

True

(T or F) Symbolic links work on the inode level to point to a particular file.

Hard link

A directory entry for a file that has another directory entry. All hard links are equally valid ways of accessing a file, and all must be deleted in order to delete a file.

Variable file

A file whose data may change at any time. Examples include user data files and queues maintained by servers.

Which type of link can NOT be created across filesystems?

A hard link

Disk quota

A limit on the amount of disk space that an individual or group may use.

user ID (UID)

A number associated with a particular account. Linux uses the UID internally for most operations, and it converts to the associated username only when interacting with people.

group ID (GID)

A number associated with a particular group. Similar to a user ID (UID).

Socket

A programming construct enabling connection to network connection endpoints (the combination of IP addresses and port numbers).

FAT

A simple filesystem using a table to index files on a block device (floppy or hard disk). It comes in the varieties of FAT-12 (MS-DOS), FAT-16 (MS-DOS, MS-Windows 3.x) and "FAT-32" (MS-Windows 9x).

Permission bit

A single bit used to define whether a given user or class of users has a particular type of access to a file. For instance, the owner's execute permission bit determines whether the owner can run a file as a program. The permission bits together make up the file's mode.

Filesystem Hierarchy Standard (FHS)

A standard that defines the names and contents of critical directories in a Linux filesystem (meaning 2).

When you create a symbolic linked file, what is its permission string?

A symbolic linked file has the default lrwxrwxrwx permission string.

Incremental backup

A type of backup in which only files that have changed since the last backup are backed up. This is used to reduce the time required to back up a computer, at the cost of potentially greater restoration complexity.

ACL

An access control list (ACL) is a list of users or groups and the permissions they're given. Linux ACLs, like Linux owner, group, and world permissions, consist of three permission bits, one each for read, write, and execute permissions. The file's owner can assign ACLs to an arbitrary number of users and groups, making ACLs more flexible than Linux permissions, which are limited to groups defined by the system administrator.

What are the three modes of the cpio command?

Copy-out mode, Copy-in mode, and Copy-pass mode

What will the rm -rf mypersonalfiles command do?

Delete the mypersonalfiles directory and all its content without prompting

Globbing

Filename expansion using asterisks (*), question marks (?), and so on is sometimes called globbing.

Shareable files

Files that can be reasonably shared with another computer, as in users' home directory files and program files in /opt or /usr.

#

In Linux, which prompt does the Shell display to indicate that the logged in user is Superuser?

Variable

In computer programming or scripting, a placeholder for data. Variables may change from one run of a program to another or even during a single run of a program.

What will be the permission string for the myfile.txt file after the chmod 744 myfile.txt command is issued?

rwxr--r--


Set pelajaran terkait

Chapter 2 Study Questions- Intro to Sociology- Teander

View Set

Study Guide, CH 7, 9, 10 ,11 ,12

View Set

Foundations Exam 3 (ian's study guide)

View Set