Perform basic file management Flashcards

1
Q

How are hidden files named?

A

Begin with a dot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What shorthand refers to the present directory?

A

.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What shorthand refers to the parent directory?

A

..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What wildcard represents a single character in a filename?

A

?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What wildcard matches any sequence of characters om a filename?

A

*

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What notifies matching any character in a set for wildcards in a filename?

A

[a-z]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What command will list hidden files and directories?

A

ls -a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What command will show the file types in a listing?

A

ls -F –file-type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What command will show files recursively?

A

ls -R –recursive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What command will copy a file?

A

cp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What command will move a file?

A

mv

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What command will delete a file?

A

rm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What command is used to create files and or set the modification / access times?

A

touch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What utility creates a zipped archive and is based on tape archives?

A

tar

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What utility creates an archive based on Copy-out and Copy-in mode?

A

cpio

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What command will copy partitions?

A

dd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What command will create a directory?

A

mkdir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What command will delete a directory?

A

rmdir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What command changes the owner of a file?

A

chown

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What command changes the group for a file?

A

chgrp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is meant by file type code - ?

A

file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is meant by file type code d ?

A

directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is meant by file type code p ?

A

named pipe - two programs use the file to communicate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is meant by file type code s ?

A

socket - similar to pipe with networking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What is meant by file type code b ?

A

block device - hard disk, cd, ram etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is meant by file type code c ?

A

character device - hardware device that has data transfered to and from one byte at a time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What represents the file octal code 7?

A

rwx

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What represents the file octal code 6?

A

rw-

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What represents the file octal code 5

A

r-x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What represents the file octal code 4

A

r–

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What represents the file octal code 0

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What does the SUID (Set user ID) do?

A

Runs a program for all users with the permissions of the owner.

33
Q

What does the SGID (Set group ID) do?

A

Runs a program for all users with the permissions of the owner group.

34
Q

How is the special bit represented?

A

s

35
Q

What does the sticky bit do?

A

Prevents deletion of files by anyone except the owner.

36
Q

What does chmod do?

A

Changes premissions on a file

37
Q

How are the SUID, SGID and sticky bit set?

A

Extra digit in front of the permission digits

38
Q

What is the numeric code for SUID?

A

4

39
Q

What is the numeric code for SGID?

A

2

40
Q

What is the numeric code for the sticky bit?

A

1

41
Q

What is the symbolic mode set code of owner?

A

u

42
Q

What is the symbolic mode set code of group?

A

g

43
Q

What is the symbolic mode set code of world?

A

o

44
Q

What is the symbolic mode set code of all?

A

a

45
Q

What is the difference between symbolic mode world (o) and all (a)?

A

world means all those not owner or group, all means owner, group and world.

46
Q

What would the command chmod o=rwx do?

A

Change the permissions for world on the file

47
Q

Who are the only users who can change a file’s permissions?

A

Owner and root

48
Q

What command sets the default permissions for a created file?

A

umask

49
Q

What command will change the attribute of a file?

A

chattr

50
Q

What are wildcards called when used as part of a search?

A

globbing

51
Q

What command could be used to compress a file?

A

gzip or bzip2

52
Q

What gzip command is used to uncompress files?

A

gunzip

53
Q

What rm, cp or mv option will attempt to move a file even if its not writeable?

A

-f –force

54
Q

What rm, cp or mv option will ask for confirmation?

A

-i –interactive

55
Q

What cp or mv option will make a backup of any files that would be replaced?

A

-b –backup

56
Q

What mkdir option would make the parent directories in this command - mkdir d1/d2/d3

A

-p

57
Q

What is the important prerequisite of rmdir?

A

The directory must be empty for deletion.

58
Q

What ls command will list all child directories and their contents?

A

ls -R

59
Q

What command will delete a directory and its contents?

A

rm -r -R –recursive

60
Q

What is another name for file wildcard naming?

A

globbing

61
Q

What command will put a current or any timestamp timestamp on a file’s atttibutes?

A

touch

62
Q

With file access attributes what is meant by the mtime?

A

Modification time

63
Q

With file access attributes what is meant by the atime?

A

Access time

64
Q

What command is used to determine the type of file?

A

file

65
Q

What does the tar option f do?

A

Where the tarball should be placed?

66
Q

What does the tar option v do?

A

verbose output

67
Q

What does the tar option c do?

A

create a tarball

68
Q

What does the tar option x do?

A

extract an archive

69
Q

What does the tar option z do?

A

use gzip

70
Q

What does the tar option j do?

A

use bzip2

71
Q

What does the cpio copy-out mode do?

A

Creates an archive

72
Q

What does the cpio copy-in mode do?

A

Restores an archive

73
Q

What does the cpio copy-pass mode do?

A

Copies files from one location to another

74
Q

What cpio switches are used for copy-out mode?

A

-o –create

75
Q

What cpio switches are used for copy-in mode?

A

-i –extract

76
Q

What cpio switches are used for copy-pass mode?

A

-p –pass-through

77
Q

With dd what does if stand for?

A

Input file

78
Q

With dd what does of stand for?

A

Output file