File commands Flashcards

1
Q

cd ~

A

change directory to your home

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

cd ~luis

A

change directory to sonali’shome

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

cd ..

A

change directory to upper directory

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

cd /

A

change directory to root

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

What are tabs used for?

A

to finish file names

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

ctl-d

A

delete turn off terminal

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

date

A

date and time

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

who am i

A

Who’s using the machine

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

‘who’ ‘whoami’

A

Who’s using the machine

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

‘ls’

A

list the files

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

‘-a’

A

option means ‘list all’, will show hidden files as wel

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

all filenames starting with a period are….

A

Hidden files

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

‘-l’, ‘–color’ ‘-t’ ‘-lt’ ‘-la’

A

other commands

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

‘cat’ or ‘pr’

A

Printing File

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

‘mv’

A

means rename or move

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

‘cp’

A

means copy

17
Q

mkdir

A

making new directories

18
Q

rm

A

removing a file

19
Q

corresponds to ‘rm’: ‘rm-i’

A

will ask “are you sure that you want to delete”

20
Q

corresponds to ‘rm’; ‘rm -r’

A

will do everything recursivily, ‘-f’ force

21
Q

rmdir

A

remove directory

22
Q

ed

A

text editor

23
Q

a

24
Q

.

A

stop adding text

25
w filename
add name to the file
26
q
exit
27
wc
word-counting
28
grep or '-v'
search files
29
sort (‘-r’, ‘-n’, ‘-nr’, ‘-f’)
sort in alphabetical order
30
chmod 755
rwx rwx rwx
31
chmod a+r
(u/g/a) ( +/ -) (r/w/x)
32
file
utility tells type of file like text, word or pdf
33
what does this do? 'grep wordpath/filename'
grep find a word in a file
34
' | '
redirect output of one command to other command
35
what do these key words show? 'more' or 'less'
shows files pagewise
36
‘find’ and ‘locate’
utility help to find a file by filename
37
what does this line do? ‘find –r path –name filename’
will find the location of file in given path. Useful command as we can use wild card pattern