ls- Looking in Directories- Permissions
cd- Changing Directoriesless- Read filesscreen- Screen a commandscp- Copying files to desktop
lslists just the file and subfolder names in your directoryls -1does the same, but puts it all in a single columnlllists contents with permissions, size, and date informationls -lrtalist in reverse time, anything (lists latest last in list)
drwxr-xr-- example 1
-rwxr-xr-- example 2
- initial
d= directory;-= file w= can writex= can executer= can read
pwd
/media/burchardraid01/datafreeze # example directory
cd .. && pwd # change then prnt new directory
/media/burchardraid01 # parent directory
cd ~ && pwd
/media/.../your.directory # you are now in your home directory
cd path/to/desired/directory && pwd
path/to/desired/directory # you are now in the directory you asked forpwd = print working directory; tells you where you are
cd = change directory
. = current directory
.. = previous directory
~ = home
note: when typing a path, use / not backslash; if you get an error, check that you are not trying to cd into a file instead of the directory; if error persists, check your slashes, your capitalization and your path
less filename = opens 1 page view of data without printing the whole thing to screen; move by line (arrow keys) or page (space)
head filename = prints first 10 lines of file
head -3 filename= prints first 3 linestail filename= prints last 10 lines of filetail -3 filename= print last 3 lineshead 10 filenme | tail -3 -= print 3 lines after line 10 of filecut -d' ' -f 1-5 filename= print columns 1-5 of file;dis your file delimiter (the symbol that separates columns, usually space' ', comma',', or tab'\t')cut -d' ' -f 1-5 filename | head -5 -= print only rows 1-5 of columns 1-5 of file
vim filename = let's you view and edit file
- to edit, press
i(for insert) and write as you please - navigate lines with arrow keys
- to save click
Escand type :w - to quit, click
Escand type :q - to save and quit type :wq
this is especially useful if you are running an automated script that will take a while and doesn't require interaction after it starts
start a new screen
screen
# this changes your console window to a detachable "screen"
# title will now read "screen 0: username@hostname:~/PATH/TO/current_directory"
# normal title bar reads: "username@hostname:~/PATH/TO/current_directory"start a new screen with a particular name
screen -S namedetach your screen
# while in the new screen type
ctrl+A ctrl+Dreturn to your screen
screen -r # if you only have one screen
# if you have multiple screens, the list will print here
screen -r [number/name] # if returning to one of multiple screenskill an old screen
screen -r [name/number] # return to screen
# type
crtl+A Kexit # leave server
scp username@hostname.edu:path/to/file/filename.csv ~/Desktop- translation: copy/paste [this file on server] [to my personal desktop]
scp= secure copy paste (copy paste over secure ssh connection)- to push to server, just switch ~/Desktop and username@hostname.edu:/path
Angel's step-by-step instructions for setting up FileZilla can be found on the Wiki here