Linux Commands and syntax Flashcards

1
Q

Command format

A

command options arguments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

/

A

absolute path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

pwd

A

print working directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

~

A

shortcut to absolute path of home directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

cd

A

change directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

ls

A

list directory contents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

ls -l

A

produces a detailed long format list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

ls -lrth

A

displays files in chronological order rather than alphabetical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

t

A

time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

r

A

reverse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

h

A

human-readable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

du-h

A

disk usage reveals the size of the current directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

mkdir

A

make directory in current directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

!$

A

represents most recently used argument (last argument of last command)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

gedit and nano

A

text editors that can be used as commands to open or create a file in the editors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

xyz

A

file format that represents molecules: number of atoms, comment line, types of atoms and their positions in angstroms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

cp

A

copy (and rename)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

mv

A

move (and rename)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

rm

A

remove

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

../

A

parent directory of current directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

cat

A

prints the contents of the file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

less

A

allows paging through contents (of a large file) using the space bar, end with q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

head or tail -

A

retrieves the first or last (given number) of lines of a file

24
Q

tabs

A

predict and auto-type the rest of a directory or file name

25
*
wildcard that can represent the beginning or end of any filename
26
alias
defines a short number of characters to represent a long command
27
history
views a history of previously typed commands
28
!(number)
displays the numbered command in the history
29
file types
- file d directory l link
30
user types
u user g group associated with the file o other users
31
permissions
r read w write x execute
32
chmod
changes permissions e.g. chmod u+x filename
33
|
a pipe allowing the output of the preceding command to be the input of the following command
34
< and >
operators used to read input from or send output to files e.g. ls -R ~ > filename
35
R
recursive
36
;
separates commands to allow them to be run on one line
37
grep
allows looking through the contents of a file for a given string e.g. -i 'look for this' filename
38
-i
ignore case of expression
39
ssh
allows access to other computers e.g. nameofcomputer
40
signing in with different username
e.g. ssh username@host
41
hamilton
the Durham University computational research computer, possessing over 15000 processors; full name to log in: username@hamilton.dur.ac.uk
42
-Y
forwards graphical output to the screen when used with ssh
43
PuTTY
provides command line execution for Windows
44
:
separates the name of the remote computer and the path for the file to go to
45
copy file from home computer to computer on mira
scp filename.txt username@mira.dur.ac.uk:~/
46
copy file from computer on mira to home computer
scp username@mira.dur.ac.uk:~/filename.txt
47
PATH
variable which tells the shell where to search for programs
48
setnev
sets the value of environment variables
49
echo
displays contents of a variable
50
man
displays the manual pages for a given command, navigable by arrow kwys
51
man
displays the manual pages for a given command, navigable by arrow keys and quitable with q
52
man
displays the manual pages for a given command, navigable by arrow keys and quittable with q
53
apropos
displays a list of commands for a given task
54
viewer
selects commands that can be used for visiting files in different formats
55
molden
used for viewing files, end by clicking a skull or typing Ctrl-c in the terminal
56
babel/obabel
allows switching between file formats e.g. obabel -i input-name -o
57
jmol
a program that is able to view molecular structures and read xyz files