来源:http://cli.learncodethehardway.org/book/
很好的一个学习命令行的网站,作为入门级别,能够使得编程小白仅需一到两天就可以迅速学习到常用的简单命令行方法。贴出些许正文:
——————
Do More
This exercise has a large “do more” part. The other exercises are not as involved as this one, but I’m having you prime your brain for the rest of the book by doing some memorization. Just trust me, this will make things silky smooth later on.
Linux/Mac OSX
Take this list of commands and create index cards with the names on the left on one side, and the definitions on the other side. Drill them every day while you do this book for just 15 minutes or so.
pwd
print working directory
hostname
my computer’s network name
mkdir
make directory
cd
change directory
ls
list directory
rmdir
remove directory
pushd
push directory
popd
pop directory
cp
copy a file or directory
mv
move a file or directory
less
page through a file
cat
print the whole file
xargs
execute arguments
find
find files
grep
find things inside files
man
read a manual page
apropos
find what man page is appropriate
env
look at your environment
echo
print some arguments
export
export/set a new environment variable
exit
exit the shell
sudo
DANGER! become super user root DANGER!
chmod
change permission modifiers
chown
change ownership
Windows
If you’re using Windows then here’s your list of commands:
pwd
print working directory
hostname
my computer’s network name
mkdir
make directory
cd
change directory
ls
list directory
rmdir
remove directory
pushd
push directory
popd
pop directory
cp
copy a file or directory
robocopy
robust copy
mv
move a file or directory
more
page through a file
type
print the whole file
forfiles
run a command on lots of files
dir -r
find files
select-string
find things inside files
help
read a manual page
helpctr
find what man page is appropriate
echo
print some arguments
set
export/set a new environment variable
exit
exit the shell
runas
DANGER! become super user root DANGER!
attrib
change permission modifiers
iCACLS
change ownership
Drill, drill, drill! Drill until you can say these phrases right away when you see that word. Then drill the inverse, so that you read the phrase and know what command will do that. You’re building your vocabulary by doing this, but don’t spend so much time you go nuts and get bored.