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
What is meant by file type code b ?
block device - hard disk, cd, ram etc
26
What is meant by file type code c ?
character device - hardware device that has data transfered to and from one byte at a time
27
What represents the file octal code 7?
rwx
28
What represents the file octal code 6?
rw-
29
What represents the file octal code 5
r-x
30
What represents the file octal code 4
r--
31
What represents the file octal code 0
---
32
What does the SUID (Set user ID) do?
Runs a program for all users with the permissions of the owner.
33
What does the SGID (Set group ID) do?
Runs a program for all users with the permissions of the owner group.
34
How is the special bit represented?
s
35
What does the sticky bit do?
Prevents deletion of files by anyone except the owner.
36
What does chmod do?
Changes premissions on a file
37
How are the SUID, SGID and sticky bit set?
Extra digit in front of the permission digits
38
What is the numeric code for SUID?
4
39
What is the numeric code for SGID?
2
40
What is the numeric code for the sticky bit?
1
41
What is the symbolic mode set code of owner?
u
42
What is the symbolic mode set code of group?
g
43
What is the symbolic mode set code of world?
o
44
What is the symbolic mode set code of all?
a
45
What is the difference between symbolic mode world (o) and all (a)?
world means all those not owner or group, all means owner, group and world.
46
What would the command chmod o=rwx do?
Change the permissions for world on the file
47
Who are the only users who can change a file's permissions?
Owner and root
48
What command sets the default permissions for a created file?
umask
49
What command will change the attribute of a file?
chattr
50
What are wildcards called when used as part of a search?
globbing
51
What command could be used to compress a file?
gzip or bzip2
52
What gzip command is used to uncompress files?
gunzip
53
What rm, cp or mv option will attempt to move a file even if its not writeable?
-f --force
54
What rm, cp or mv option will ask for confirmation?
-i --interactive
55
What cp or mv option will make a backup of any files that would be replaced?
-b --backup
56
What mkdir option would make the parent directories in this command - mkdir d1/d2/d3
-p
57
What is the important prerequisite of rmdir?
The directory must be empty for deletion.
58
What ls command will list all child directories and their contents?
ls -R
59
What command will delete a directory and its contents?
rm -r -R --recursive
60
What is another name for file wildcard naming?
globbing
61
What command will put a current or any timestamp timestamp on a file's atttibutes?
touch
62
With file access attributes what is meant by the mtime?
Modification time
63
With file access attributes what is meant by the atime?
Access time
64
What command is used to determine the type of file?
file
65
What does the tar option f do?
Where the tarball should be placed?
66
What does the tar option v do?
verbose output
67
What does the tar option c do?
create a tarball
68
What does the tar option x do?
extract an archive
69
What does the tar option z do?
use gzip
70
What does the tar option j do?
use bzip2
71
What does the cpio copy-out mode do?
Creates an archive
72
What does the cpio copy-in mode do?
Restores an archive
73
What does the cpio copy-pass mode do?
Copies files from one location to another
74
What cpio switches are used for copy-out mode?
-o --create
75
What cpio switches are used for copy-in mode?
-i --extract
76
What cpio switches are used for copy-pass mode?
-p --pass-through
77
With dd what does if stand for?
Input file
78
With dd what does of stand for?
Output file