CSCI 1730 Final Exam Study Guide: Essential Commands and Concepts, Exams of Social Sciences

This study guide covers essential commands and concepts for the csci 1730 final exam. It includes file manipulation commands (mv, cp, rm, mkdir, rmdir), process management (ps, exit), and network utilities (wget, find, ssh). The guide also details system calls (open, close, read, write, lseek), socket programming (socket, af_inet, sock_stream), and network concepts (datagram, connection-oriented protocol). Key topics include byte ordering (little endian, big-endian) and network troubleshooting tools (ifconfig, nslookup, ping, traceroute, netstat).

Typology: Exams

2025/2026

Available from 12/16/2025

ROCKY-B
ROCKY-B 🇰🇪

4.4

(16)

40K documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
/
9
CSCI 1730 FINAL EXAM STUDY GUIDE
Renaming
a
file:
mv <file1> <file2> (rename)
1.
Moving
a
file:
mv <file> <dir> (move)
2.
Move and Rename a file: mv <file1>
<dir/file2>
3.
Copying a file: cp <file1>
[<file2>|<dir>|<dir/file2>]
4.
Removing a file: rm [-i]
<file(s)>
5.
Create a subdirectory of the current directory: mkdir
<dir_name>
6.
Remove a directory (only works for empty directories): rmdir
<dir_name>
7.
Remove a directory and all of its contents, including sub-directories: rm -r
<dir_name>
8.
exiting from the shell and disconnecting from ssh:
exit
9.
current log in proccesses: ps
10.
all current log in processes: ps -ef
11.
Find what user you are on the machine you are currently logged into:
whoami
12.
Find the current date and time stamp:
date
13.
current month calendar date and graphical representation: cal
14.
See the time that the current system has been available (or up):
uptime
15.
Web get utility (copy the file url to the present working directory):
wget
16.
try to find files starting with a certain name or pattern:
find
17.
How many vcfs are there?: 4
18.
how to ssh into vcf?: ssh
0 can be replaced by
1,2 or 3
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download CSCI 1730 Final Exam Study Guide: Essential Commands and Concepts and more Exams Social Sciences in PDF only on Docsity!

CSCI 1730 FINAL EXAM STUDY GUIDE

Renaming a file: mv (rename)

1. Moving a file: mv (move)

2. Move and Rename a file: mv <dir/file2>

3. Copying a file: cp [||<dir/file2>]

4. Removing a file: rm [-i] <file(s)>

5. Create a subdirectory of the current directory: mkdir <dir_name>

6. Remove a directory (only works for empty directories): rmdir <dir_name>

7. Remove a directory and all of its contents, including sub-directories: rm - r

<dir_name>

8. exiting from the shell and disconnecting from ssh: exit

9. current log in proccesses: ps

10. all current log in processes: ps - ef

11. Find what user you are on the machine you are currently logged into: whoami

12. Find the current date and time stamp: date

13. current month calendar date and graphical representation: cal

14. See the time that the current system has been available (or up): uptime

15. Web get utility (copy the file url to the present working directory): wget

16. try to find files starting with a certain name or pattern: find

17. How many vcfs are there?: 4

18. how to ssh into vcf?: ssh

[email protected] 0 can be replaced by 1,2 or 3

19. Home IP Address (i just know this is going to be on the final): 127.0.0.

20. displays the contents of the file: cat

21. debugging inforation flag: - g

22. Turns on all the warnings flag: - Wall

23. pedantic way of displaying errors flag: - pedantic-errors

24. C doesn't have pass by reference:

25. Types of system calls:

File I/O process management Inter-process communication (IPC) - pipe, signals, sockets, ... Single handling

SEEK_CU

R

SEEK_END

39. Fork allows you to a program: clone

40. exec allows you to :

41. To create a socket: #include

<sys/socket.h> int socket(int domain, int type, int protocol);

42. AF_: address family used for domain in socket creation

43. AF_INET: IPv4 Internet domain

44. AF_INET6: IPv6 Internet Domain

45. AF_UNIX: Unix domain alias AF_LOCAL

46. AF_UNSPEC: unspecified domain

47. SOCK_DGRAM: fixed length, connections, unreliable (default UDP) no logical connection needs to exist

between peers for them to communicate

48. SOCK_RAW: datagram interface to IP

49. SOCK_SEQPACKET: fixed length, sequenced, reliable, connection oriented

50. SOCK_STREAM: sequenced, reliable, bidirectional, connection oriented byte stream (default is TCP)

51. IPPROTO_IP: IPv4 Internet Protocol

52. IPPROTO_IPV6: IPv6 Internet Protocol

53. IPPROTO_ICMP: Internet Control Message Protocol

54. IPPROTO_RAW: Raw IP packets protocol

55. IPPROTO_TCP: transmission control protocol

56. IPPROTO_UDP: User Datagram Protocol

57. datagram: provides a connectionless service (it is like mailing a letter, you do not know if it will get there)

58. connection-oriented protocol: A type of Transport layer protocol that requires the establishment of a

connection between communicating nodes before it will transmit data. (it is like making a phone call you first have to ensure the other person in on the phone)

59. Why is calling socket similar to calling open?: you get a file descriptor that can be used for

I/O

60. close: deallocates the socket

61. dup, dup2: duplicates the file descriptor as normal

62. fchdir: fails with errno set to ENOTDIR

63. fchmod: unspecified

64. fchown: implementation defined

65. fcntl: some commands supported, including F_DUPFD

66. fdatasync: implementation defined

75. select: works as expected

76. write: equivalent to send

77. to shutdown a function: #include

<sys/socket.h> int shutdown(int sockfd, int how);

78. if how if SHUT_RD: then reading from the socket is disabled

79. if how is SHUT_WR: then we can't use the socket for transmitting date

80. If how is SHUT_RDWR: then we can disable both data transmission and reception

81. How is shutdown different from close?: The shutdown function allows us to deactivate a socket

independently of the number of active file descriptors referencing it. It is also sometimes convenient to shut a socket down in one direction only. Close will deallocate the network endpoint only when the last active reference is closed.

82. Two components for identifying a process: The machine's network address, helps identify the

computer on the network and the service, represented by a port number helps identify the particular process on the computer

83. sockaddr: So that addresses with ditterent formats can be passed to the socket functions, the addresses are

cast to a generic sockaddr

85. --x: 1

86. - w-: 2

87. - wx: 3

88. r--: 4

89. r-x: 5

90. rw-: 6

91. rwx: 7

92. socket(): creates a socket

93. Little Endian: rightmost bites are most significant

94. Big-endian: leftmost bites are most significant

95. • Host Byte-Ordering: the byte ordering used by a host (big or little)

96. • Network Byte-Ordering: the byte ordering used by the network - always big-endian

97. ifconfig: Linux command for finding out a computer's IP address information

98. nslookup: a tool used to query the DNS system to find the IP addresses for domain names, and vice versa

99. host: network host

100. ping: to test whether a particular host is reachable across an IP network