LinuxQA - Jan. 18, 2005 Exercises for learning basic...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Jan. 18, 2005 Exercises for learning basic Unix/Linux commands: The following contain a series of Q&A’s for the purpose of learning the most fundamental Unix/Linux commands. Commands are shown using the Arial font , different from the Times New Roman font used for other texts. This practice assumes access to a Unix system, as a non- root user. 1. How to use the online help (manual pages)? Use the man command to locate manual pages, for example, type man date to learn about the date command; man w for the w command, and even man man to learn about the man command itself. You can also do a keyword search for commands that have a certain keyword, for example, man –k permission lists about a dozen commands that contain the word “permission” in their descriptions. 2. How to use a text editor to create and save files? The vi editor is available on all Unix/Linux systems although it will take some effort to learn how to use vi . There are simpler text editors such as pico and nano but need to be installed on your system. A simple way to create single-line text files is to use the echo command and redirect the output using the “>” notation to a file, for example, typing echo “A single line of text.” > file1 creates a text file named “file1” containing a single line of words, and saves it to the current directory. 3. How to use the list file command ls (letters L and S in lower case)? Before you start using the ls command, find out where you are within the file system hierarchy using the pwd (print working directory) command. Suppose your current directory is /home/doe, and there are two files named “file1” and “file2” under the current directory. Then the command ls will list these two files (only the file names), while the command ls –l will print a long listing of the files in the current directory. The long listing format includes more information about the listed files, such as the file type,
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/25/2011 for the course ECE 101 taught by Professor Sd during the Spring '11 term at Birla Institute of Technology & Science, Pilani - Hyderabad.

Page1 / 3

LinuxQA - Jan. 18, 2005 Exercises for learning basic...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online