Comandos Unix en
Comandos Unix en
man {section} keyword ls {-a} {wildcard} pwd cd directory mkdir directory rmdir directory cp file1 file2 mv file1 file2 rm file cat file grep string file more file ps {-a} kill {-9} pid diff file1 file2 sort file who or w pico file vi file emacs file # Unix online manual # list directory contents # return working directory name # change directory # make directory # remove directory # copy file(s) # move file(s) # remove file(s) # concatenate and print files to stdout # print lines from a file that match a pattern # print files to stdout page by page # process status # terminate a process (by using -9) # compare two files # sort a file # display who is on the system # file editor # file editor # file editor
Operating Systems
Program compilation
gcc Wall file1.c file2.c (...) o executable (Note: Use compile options Wall . Solve every error and warning that is shown by the compiler. Do not ignore warnings, normally they result from poor and error-prone coding!)
Debugger
Compile using option g (debug information). Execute gdb ddd is the graphical interface for gdb gdb executable OR gdb --core=core ddd executable" Useful commands: o help o run {parameter1} {parameter2} {} o break {line} {function} o step o cont o display {var} o where o list {line} {function} o quit
# help # run a program # set a breakpoint in a line/function # advance one step in the program # continue execution # shows a variable value # shows where the crash occurred # show source code # close debugger
DEI-FCTUC