1 / 10

Using Linux Command 3

Using Linux Command 3. Lab#6. Some useful commands [clear]. The clear command clears your terminal and returns the command line prompt to the top of the screen. [ root@localhost /root]# clear. Directories [rmdir]. rmdir—Remove empty directories. # rmdir dir1. cal [[0-12] 1--9999].

luyu
Download Presentation

Using Linux Command 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using Linux Command 3 Lab#6

  2. Some useful commands [clear] The clear command clears your terminal and returns the command line prompt to the top of the screen. [root@localhost /root]#clear

  3. Directories [rmdir] rmdir—Remove empty directories #rmdir dir1

  4. cal[[0-12] 1--9999] Prints out a nicely formatted calendar of the current month, or a specified month, or a specified whole year. [root@localhost /root]#cal 1947

  5. df Stands for disk free This tells you how much free space is left on your system. [root@localhost /root]#df -h

  6. free Prints out available free memory. You will notice two listings: swap space and physical memory. [root@localhost /root]#free

  7. wc wc [-c] [-w] [-l] <filename> Counts the number characters/bytes(with -c),words(with -w) or lines (with-l) in a file. [root@localhost /root]#wc –c /etc/passwd

  8. Determining file type file <filename> This command prints out the type of data contained in a file. will tell you that portrate.jpg is a JPEG image data, # file portrate.jpg

  9. head Syntax: head [-count | -nnumber]filename This command will display the first few lines of a file. By default, the first 10 lines of a file are displayed. However, you could use the preceding options to specify a different number of lines. # Outline of future projects ff Last modified: 02/02/99 [root@localhost /root]#head -2 doc.txt

  10. tail [root@localhost /root]# tail -50 doc.txt [root@localhost /root]# tail -r doc.txt

More Related