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
Q

*

A

wildcard that can represent the beginning or end of any filename

26
Q

alias

A

defines a short number of characters to represent a long command

27
Q

history

A

views a history of previously typed commands

28
Q

!(number)

A

displays the numbered command in the history

29
Q

file types

A
  • file
    d directory
    l link
30
Q

user types

A

u user
g group associated with the file
o other users

31
Q

permissions

A

r read
w write
x execute

32
Q

chmod

A

changes permissions e.g. chmod u+x filename

33
Q

|

A

a pipe allowing the output of the preceding command to be the input of the following command

34
Q

< and >

A

operators used to read input from or send output to files e.g. ls -R ~ > filename

35
Q

R

A

recursive

36
Q

;

A

separates commands to allow them to be run on one line

37
Q

grep

A

allows looking through the contents of a file for a given string
e.g. -i ‘look for this’ filename

38
Q

-i

A

ignore case of expression

39
Q

ssh

A

allows access to other computers
e.g. nameofcomputer

40
Q

signing in with different username

A

e.g. ssh username@host

41
Q

hamilton

A

the Durham University computational research computer, possessing over 15000 processors; full name to log in: username@hamilton.dur.ac.uk

42
Q

-Y

A

forwards graphical output to the screen when used with ssh

43
Q

PuTTY

A

provides command line execution for Windows

44
Q

:

A

separates the name of the remote computer and the path for the file to go to

45
Q

copy file from home computer to computer on mira

A

scp filename.txt username@mira.dur.ac.uk:~/

46
Q

copy file from computer on mira to home computer

A

scp username@mira.dur.ac.uk:~/filename.txt

47
Q

PATH

A

variable which tells the shell where to search for programs

48
Q

setnev

A

sets the value of environment variables

49
Q

echo

A

displays contents of a variable

50
Q

man

A

displays the manual pages for a given command, navigable by arrow kwys

51
Q

man

A

displays the manual pages for a given command, navigable by arrow keys and quitable with q

52
Q

man

A

displays the manual pages for a given command, navigable by arrow keys and quittable with q

53
Q

apropos

A

displays a list of commands for a given task

54
Q

viewer

A

selects commands that can be used for visiting files in different formats

55
Q

molden

A

used for viewing files, end by clicking a skull or typing Ctrl-c in the terminal

56
Q

babel/obabel

A

allows switching between file formats
e.g. obabel -i<input-type> input-name -o<output-type></output-type></input-type>

57
Q

jmol

A

a program that is able to view molecular structures and read xyz files