-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUnixNotes_Day1.txt
106 lines (63 loc) · 2.7 KB
/
UnixNotes_Day1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---------------------------------------------------------------------
Astronomy 300 - Inital Setup
---------------------------------------------------------------------
Open up a terminal on one the astrolab machines (right click on the
background and select Open Terminal). First thing to do is to run the
setup file. The "$" is the Unix prompt, you do not type this character.
Get the setup file:
$ cd
$ cp ~pikaia/setup . make sure to type the "."
$ tcsh setup
Skip next two lines
***** Latop users start here *****
$ cd
$ git clone https://github.com/UWashington-Astro300/Astro300-A19.git
---------------------------------------------------------------------
Astronomy 300 - Week 0 Notes - Command Line Data Exploration
---------------------------------------------------------------------
$ cd Astro300-A19 change directory
$ pwd Show the current directory path.
$ cd Data change to the Data directory
$ pwd
$ ls
. a single "." - this refers to the directory you are in
$ ls .
.. two ".." - this refers to the directory above your current directory
$ ls ..
$ ls Week0 list the files in the subdirectory named "Week0"
$ ls -R list all of the files in this dirctory AND below
$ ls -l detailed list of files
total 24
-rw------- 1 user user 23070 Sep 24 18:39 BrightStars.csv
-rw------- 1 user user 3308 Sep 24 18:39 Constellations.csv
-rw------- 1 user user 262 Sep 24 18:39 Jabber.txt
drwxr-xr-x 6 user user 6 Sep 24 18:43 Week0
premissions own grp size Date Name
---------------------------------------------------------------------
---------------------------------------------------------------------
$ cd Week0 move down to the subdirectory named "Week0"
$ pwd
$ cp A/a_file . cp = "copy", . at end means cp file to current dir
$ ls
$ mv a_file FILE mv = "move", renames the file
$ ls
$ rm FILE rm = "remove" Delete file (NO RECOVERY!)
$ ls
---------------------------------------------------------------------
$ cp ../Jabber.txt . cp file "Jabber.txt" from dir above
$ ls
$ cat Jabber.txt "stream" file to terminal
---------------------------------------------------------------------
[TAB] Completion
$ cat J[TAB] Hit [TAB] again to show all options
[UP] [DOWN] arrows - command history
$ history Shows history of commands
$ !num will rerun num command
---------------------------------------------------------------------
$ cd change directory
$ ls list files in directory
$ pwd show current directory
$ cp copy
$ mv move (rename)
$ rm remove (delete)
---------------------------------------------------------------------