月度归档:2014年09月

Command Line Interface Basics

The directory structure on your computer looks something like this
Dir_structure

CLI Basics
In your CLI prompt, type pwd and press enter.
This will display the path to you’re working directory.
As you can see we get the prompt back after entering a command.
CLI_window
CLI Commands
CLI commands follow this recipe: command flags arguments
command is the CLI command which does a specific task
flags are options we give to the command to trigger certain behaviors, preceded by a –
arguments can be what the command is going to modify, or other options for the command
Depending on the command, there can be zero or more flags and arguments
For example pwd is a command that requires no flags or arguments
pwd displays the path to the current working directory
clear will clear out the commands in your current CLI window

ls lists files and folders in the current directory ls -a lists hidden and unhidden files and folders ls -al lists details for hidden and unhidden files and folders Notice that -a and -l are flags (they’re preceded by a -) They can be combined into the flag: -al

cd stands for “change directory” cd takes as an argument the directory you want to visit cd with no argument takes you to your home directory cd .. allows you to change directory to one level above your current directory

mkdir stands for “make directory” Just like: right click -> create new folder mkdir takes as an argument the name of the directory you’re creating

touch creates an empty file

cp stands for “copy” cp takes as its first argument a file, and as its second argument the path to where you want the file to be copied
cp can also be used for copying the contents of directories, but you must use the -r flag The line: cp -r Documents More_docs copies the contents of Documents into More_docs

rm stands for “remove” rm takes the name of a file you wish to remove as its argument

You can also use rm to delete entire directories and their contents by using the -r flag Be very careful when you do this, there is no was to undo an rm

mv stands for “move” With mv you can move files between directories
You can also use mv to rename files

echo will print whatever arguments you provide

date will print today’s date

Summary:
pwd clear ls cd mkdir touch cp rm mv date echo

一封加州理工教授写给博士后的邮件

在美国UCF读博的师兄发来一张图,让我很惊讶。这位加州理工的教授居然要求他的博士后晚上和周末都来实验室工作,而且说这很正常,甚至威胁说如果不来的话就考虑换人。美国大学教授真的这么push吗?还是说这只是特例?

a_letter

参考链接:

1. I expect you to correct your work-ethic immediately

2. Something Deeply Wrong With Chemistry

3. “I have noticed that you failed to come into the lab on several weekends”

4. Chemist who ordered night and weekend work replies to critics