Unix commands

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/72

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

73 Terms

1
New cards

Print Working Directory

pwd

2
New cards

List Contents

ls

3
New cards

Make Directory

mkdir

4
New cards

Change Directory

cd

5
New cards

Copy

cp

6
New cards

Move

mv

7
New cards

Remove

rm

8
New cards

Manual

man

9
New cards

Log File

script

10
New cards

Should you expect an output for pwd?

yes

11
New cards

Should you expect an output for ls?

yes

12
New cards

Should you expect an output for mkdir?

no

13
New cards

Should you expect an output for cd?

no

14
New cards

Should you expect an output for cp?

no

15
New cards

Should you expect an output for mv?

no

16
New cards

Should you expect an output for rm?

Yes if -f isn't used

17
New cards

Should you expect an output for man?

yes

18
New cards

Should you expect an output for script?

yes

19
New cards

What does the append option do?

It allows you to append a log file

20
New cards

What does the flushed option do?

It writes to the log file in real time

21
New cards

What does the forced (-f) option do?

It deletes without asking permission

22
New cards

What does the recursive (-r) option do?

It deletes folders

23
New cards

What is the difference between the copy and move commands?

Copy moves a file from one location to another without deleting the original while move deletes the original after the file is moved

24
New cards

What does the all (-a) command do?

It shows all files including hidden ones

25
New cards

What does the long (-l) command do?

It shows files in long format with options

26
New cards

What is the proper syntax for the ls command?

ls -options location/directory

27
New cards

What is the proper syntax for the mkdir command?

mkdir location/directory

28
New cards

What is the proper syntax for the cp command?

cp location/file.ext newlocation

29
New cards

What is the proper syntax for the mv command?

mv location/file.ext newlocation/newname.ext

30
New cards

What is the proper syntax for the rm command?

rm -options location/file.ext

31
New cards

What is the proper syntax for the script command?

script -options logfilename.txt

32
New cards

What is the absolute pathname of the E 115 Course Locker?

/afs/eos.ncsu.edu/courses/e/e115

33
New cards

What is the absolute pathname of my home directory

/afs/unity.ncsu.edu/users/d/dcmcfar2

34
New cards

What 2 commands are associated with text files?

More and less

35
New cards

What does the quota command show?

The amount of storage you have used

36
New cards

What does the add command do?

Installs a command through the command window

37
New cards

What does the attach command do?

Creates a shortcut to a directory

38
New cards

What subcommands of the file system command control who has access to files?

la and sa

39
New cards

What subcommands of the file system command control who has access to backups?

mkm and rmm

40
New cards

List access

la

41
New cards

Set access

sa

42
New cards

Make mount

mkm

43
New cards

Remove mount

rmm

44
New cards

What command allows you to create an archive?

zip

45
New cards

What does rlidwka stand for? What other access list options are there?

read, look, insert, delete, write, lock, admin. The other options are all and none

46
New cards

What is the proper syntax for the more/less comamnd?

more/less location/file.txt

47
New cards

What is the proper syntax for the attach command?

attach absolute_pathname

48
New cards

What is the proper syntax for the fs command?

fs subcommand path unityid accesslist

49
New cards

What is the syntax of the command to make a backup?

fs mkm BACKUP users.unityid.backup

50
New cards

How would you remove a backup?

fs rmm BACKUP

51
New cards

What command extracts files from an archive?

unzip

52
New cards

What is the proper syntax for the unzip command?

unzip location/file.zip

53
New cards

What is the proper syntax for the zip command?

zip zipfile.zip file1.ext file2.ext

54
New cards

On UNIX-based systems, the 'rm' command performs which function?

Deletes a file

55
New cards

Which flag is necessary to allow the "rm" command to delete directories

-rf

56
New cards

Which UNIX command is used to display a list of all files in the current working directory

ls-a

57
New cards

Which command would change the permissions on a file named 'gnomy.txt' to ensure that it was visible to strangers on the Internet?

chmod o+r gnomy.txt

58
New cards

Which command changes the current working directory to the parent directory?

cd..

59
New cards

Which command changes the current working directory to the root directory?

cd /

60
New cards

Which command changes the current working directory to the user's account home directory?

cd ~

61
New cards

Which command changes the current working directory to the current working directory?!!

cd.

62
New cards

Which command changes the current working directory to a sub-directory?

cd root

63
New cards

Which command changes the current working directory to the sub-directory named 'insolvent'?

cd insolvent

64
New cards

The command 'ls -l' shows the files and folders in the current working directory along with their metadata. One of the results shows the following metadata: 'drwxr-xr-x'. Is this a file or a folder?

Folder

65
New cards

The command 'ls -l' shows the files and folders in the current working directory along with their metadata. One of the results shows the following metadata: '-r-x------'. Is this a file or a folder?

File

66
New cards

With the following permissions, who has write permissions for this file or folder? ''-rw---xr-x'

The user who owns the file

67
New cards

Would the user who owns a file with the permissions '--wx-wx----' be able to read the contents of that file?

No

68
New cards

Which Unix command moves a file from one location to another

mv

69
New cards

In UNIX-based systems, the cp command…

Copies a file or folder from a source to a destination

70
New cards

Unix commands also generally work on Linux operating systems.

True

71
New cards

Linux was created to be a free (as in "freedom") clone of UNIX.

True

72
New cards

Which of the following operating systems are extensions of UNIX or Linux?

Apple OS X

73
New cards

Everything that can be done from the UNIX or Linux command line can also be done using an operating system's Graphical User Interface.

False