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

A

add text

24
Q

.

A

stop adding text

25
Q

w filename

A

add name to the file

26
Q

q

A

exit

27
Q

wc

A

word-counting

28
Q

grep or ‘-v’

A

search files

29
Q

sort (‘-r’, ‘-n’, ‘-nr’, ‘-f’)

A

sort in alphabetical order

30
Q

chmod 755

A

rwx rwx rwx

31
Q

chmod a+r

A

(u/g/a) ( +/ -) (r/w/x)

32
Q

file

A

utility tells type of file like text, word or pdf

33
Q

what does this do? ‘grep wordpath/filename’

A

grep find a word in a file

34
Q

’ | ‘

A

redirect output of one command to other command

35
Q

what do these key words show? ‘more’ or ‘less’

A

shows files pagewise

36
Q

‘find’ and ‘locate’

A

utility help to find a file by filename

37
Q

what does this line do? ‘find –r path –name filename’

A

will find the location of file in given path. Useful command as we can use wild card pattern