lpic 1 - Ch 4

¡Supera tus tareas y exámenes ahora con Quizwiz!

Command ls: How to display color when listing a directory?

--color

What are the meanings behind file types? / * | = @

/ Directory * Executable | Named pipe = Socket @ Symbolic Link

What are common character extension name sizes in Linux

1-4 characters

What is the max character limit on ext2fs, ext3fs, ext4fs, XFS, BTRFS?

255 Characters or 255 Bytes

Wildcard character ([ ])

A bracketed set of characters matches any character in the set.

Wildcard character ?

A question mark stands in for a single character.

Wildcard character (*)

An asterisk matches any character or set of characters including no characters.

Linux Naming Files: List possible options

Can contain uppercase, lowercase letters, numbers and event most punctuation and control characters. Recommended (.), (-), or (_.). Backups sometimes use the (~) character.

Command cp: Can the destination option be a file or folder?

Command allows for a folder to be specified in the event that a folder is copied or a file name if it's a file.

What does the cp command do?

Command copies a file.

What does the following command do? rm

Deletes a file. Short for remove.

What does the command below do? ls -d

Displays the directory names

What is the process of wildcard expansion called?

File globbing, or filename expansion, or simply globbing.

What does the command below do? cp -f

Forces overwrite

Why is the mv command fast or slow?

If command is ran on low level system, Linux does the job by rewriting directory entries; the files data need not be read and rewritten. When the target directory is on another partition or disk Linux must read the original file, rewrite it to a new location and delete the original. This slows the command down.

Does cp preserve the file name when copying a file?

If the command specifies a destination if a folder is specified the original file name is kept otherwise this goes to a filename.

What filestamps does Linux maintain on files?

Last file modification time, last inode change time, last access time.

What is USMSDOS?

Linux only extension that supported Linux-style long file names. Discontinued after 2.6.11 kernel.

Command cp: Can the source files be more than one file or just one file?

Multiple files are allowed.

Can you recover a file once it's deleted with rm?

Nope, it's gone without a backup. It's possible to try debugfs but very unlikely.

What does the following command do? ls -R

Outputs directory contents recursively.

What does the following command do? ls -l

Outputs string of permission strings, ownership, file sizes, file creation dates, and so on in addition to file names.

What does the following command do? cp -R

Performs a recursive copy runs better than -r for unfamiliar files.

What does the following command do? cp -a

Performs an archive copy and preserves file ownership and copies links as is.

What does the following command do? cp -u

Performs an update copy. Command copies the file only if the original file is newer than the target or if the target doesn't exist.

What does the following command do? cp -p

Preserves file permissions when copying a file

What does the command below do? cp -i

Prompt before overwriting any existing files

Command rm options are similar to what other command?

RM is similar to cp, minuts --preserve, --archive, and --update. -r and -R are synonymous within rm.

What is a file name that consists only of a dot (.)?

Represents the current directory.

What is a file name that consists only of two dots (..) ?

Represents the parent directory.

What does the following command do? mv

Short for move, is commonly used both to move files and directories from one location to another and rename them.

Command: ls

Used to find information out about files. Ls is short for list. It displays the names of files in a directory.

What is a wildcard expansion rule?

Wildcards can be used with many commands. It's a symbol or set of symbols that stand in for other characters.

Are Linux file names case sensitive?

YES.

Can Linux file names contain spaces?

Yes, but they must be escaped by a backslash (\) or enclosed in quotes ("").

Can file names begin with a dot (.)?

Yes, file names can contain any number of (.) characters.

Can you combine multiple ls command options together?

Yes, you can run multiple commands with a single dash, i.e. ls -lF

What is the basic syntax for the cp command?

cp [options] source destination

When creating a new file with touch what is the access time set to?

current time

How to display the file type of a file or folders?

ls -F or ls --classify

How to display all files even hidden files?

ls -a or ls --all

What is the syntax for command ls?

ls [options] [files], options and files are optional as files displays the current directory if not included.

What is the syntax of the mv command?

mv [options] source destination

pwd

print working directory

What is the syntax for rm?

rm [options] files

What is the syntax for the command touch?

touch [options] files


Conjuntos de estudio relacionados

A&P JEPPESEN AIRFRAME CHAPTER 5 AIRCRAFT FABRIC COVERING

View Set

Chapter 1 Introduction to Economics and the Economy

View Set

Earth Science Regents Chapter 4 Review, Earth Science Topic 4

View Set

Exercise Prescription of Resistance Training

View Set

Hazard Communication Standard with GHS

View Set

Unit 1 - European Settlement of North America

View Set