Anda di halaman 1dari 2

To compile: cc helloworld.c To run: $ ./a.out Hello World! $ mv a.out helloworld $ ./helloworld Hello World!

The Gcc Command Compiles A C Program, And G++ Compiles A C++ Program johndoe on ce.uml.edu>gcc assignment1.c OR To compile a C++ program called "assignment1.cpp": johndoe on ce.uml.edu>g++ assignment1.cpp Removing and deleting files: rm filename removes a file called filename. rm filena* removes all files starting with filena. del filename deletes a file called filename. del filena* deletes all files starting with filena. Renaming files: mv oldname newname will move a file called oldname to one called newname. ren oldname newname will rename a file called oldname to one called newname. Reading and editing files: vi filename allows you to view and edit a text file called filename while in UNIX. :q! (colon q exclamation) stops vi without making changes. :wq (colon w q) saves and logs out. See vi Commands for all vi editing commands. <control> c (hold down <control> and c keys together) to quit something when things go wrong in order to stop a process and get back to the prompt. <control> d (hold down <control> and d keys together) to log out and end the session Listing directory contents:

ls lists all the files and sub-directories in the current directory. ls text* lists all files starting with text. dir (or ls -al) tells more about these files and sub-directories such as permissions, owner, group, size, and date last modified. Note: The asterisk (*) represents any character, text or number.

Anda mungkin juga menyukai