NIU CS 330 midterm
word anchor start
/<start
chgrp
Change group ownership
chmod
Changes mode of a file
fork
Create a new process, duplicate of current process
sizeof
Determine the size of data
#!/bin/bash
Sh-Bang!
Wildcard
Special characters in filename pattern
relative path
a path that begins at the current working directory
man
an interface to the on-line reference manuals
bg
background
cd
change directory
chown
changes which user owns a file
input redirection
command < inputfile
output redirection
command > outputfile or command >> outputfile
cat
concatenate files and print on the standard output
cp
copy one or more files
strlen
counts before the null terminator
$HOSTNAME
current host
echo
display a line of text
word anchor end
end>/
1
execute
exec
execute for command specified in path
fg
foreground
$varName
get the value of a variable
g
group
$HOME
home directory
wait
let's parent process wait until a child process terminates
ls
list files in current directory
history
lists the prior commands issued to the shell
.
matches any 1 character
?-wildcard
matches any single characters
*
matches if 0 or more of the preceding character
[]-wildcard
matches sets of characters
*-wildcard
matches zero or more characters
mv
move one or more files
o
other
perror
print a system error message
pwd
print name of current/working directory
4
read
read
read from a file descriptor
pipefd[0]
refers to the read end of the pipe.
pipefd[1]
refers to the write end of the pipe.
rmdir
remove/delete a directory
rm
remove/delete a file
pipefd[]
return two file descriptors referring to the ends of the pipe.
!5
run 5 commands back again
!!
runs last command again
!500
runs the 500th command again
!something
runs the last command starting with something
$PATH
search command/(which)
write
send a message to another user
stderr
standard error:2
stdin
standard input:0
stdout
standard output:1
absolute path
starts from the root directory
crtl+z
stop a foreground command
read return
the number of bytes read is returned
write return
the number of bytes written are returned
open
to open a file in the associated application
grep
to search files for the occurrence of a string of characters that matches a specified pattern.
crtl+c
used to kill a process
u
user
Anchors
where text patterns happen
.*
works like shell wildcard *
2
write