首页 > 系统服务 > 详细

Shell Commands

时间:2015-09-13 09:17:49      阅读:217      评论:0      收藏:0      [点我收藏+]

Most commands operate like this: command -options arguments



pwd (print working directory)

cd (change directory).

    Absolute pathname: "cd /home/students" ;

    Relative pathname: "cd .." (parent directory) and "cd ./students" (currently working directory,  the "./" can be omitted)

    Shotcuts:

    "cd " to your home directory"

    "cd ~user_name" to the home directory of the specified user

    "cd - "  to the previous one

ls (list files and directories)

 

Examples of the ls command
CommandResult
ls

List the files in the working directory

ls /bin

List the files in the /bin directory (or any other directory you care to specify)

ls -l

List the files in the working directory in long format

ls -l /etc /bin

List the files in the /bin directory and the /etc directory in long format

ls -a 

show all files include hiddend files(begig with ".")

ls -la ..

List all files (even ones with names beginning with a period character, which are normally hidden) in the parent of the working directory in long format

 

 

less (view text files)

Keyboard commands for the less program
CommandAction

Page Up or b

Scroll back one page

Page Down or space

Scroll forward one page

G

Go to the end of the text file

1G

Go to the beginning of the text file

/characters

Search forward in the text file for an occurrence of the specified characters

n

Repeat the previous search

h

Display a complete list less commands and options

q

Quit

 


file
 (
tell you what kind of file it is.

 

 

 

 

 

 

 

 

 

Reference: http://linuxcommand.org/lc3_lts0020.php

tell you what kind of file it is.

Shell Commands

原文:http://www.cnblogs.com/freyfly/p/4804043.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!