Info | ||
---|---|---|
| ||
|
Example of pshell running on Magnus
Code Block |
---|
ssh magnus.pawsey.org.au
magnus> module load python/2.7.10
magnus> wget https://bitbucket.org/datapawsey/mfclient/downloads/pshell -O pshell
magnus:~> chmod u+x pshell
magnus:~> ./pshell
=== pshell: type 'help' for a list of commands ===
pawsey:offline> |
Pshell is a python command line client that implements a subset of the standard SFTP commands.
...
- whoami: reports the current logged in identity
- file: reports metadata information on a file. This useful for finding size (bytes) of a file
- compare: useful to check on successful transfer from remote to pawsey
Pagination
For file listings that are longer than the terminal height, a pagination control prompt will be displayed with the following options:
Entry | Result |
---|---|
<enter> | Display the next page of files |
<page number><enter> | Display the requested page number |
/<pattern> | Filter the result on the pattern |
q | Leave (quit) paginated display mode |
Exercises
Exercise 1 - pshell with Pawsey account
Perform the following:
- run pshell and login to the mediaflux server,
- query what your logged in identity is,
- display your current working directory on the server,
- display your local working directory
- list the contents of the remote directory on the server.
Expand | ||
---|---|---|
| ||
|
Exercise 2 - downloading data
Perform the following:
- Navigate to the /projects/Data Team folder,
- download the testfiles folder to your local machine,
check the download by listing the files locally.
...
Expand | ||
---|---|---|
| ||
|
Exercise 3 - uploading data
Perform the following:
- Navigate to the /projects/Demo folder
- create a unique new folder (eg your Pawsey account name)
- change into this unique folder and confirm it is your current working directory
- upload the files you downloaded in the previous exercise
- check the upload by listing the remote files.
Expand | ||
---|---|---|
| ||
|
Exercise 4 - deleting data
Perform the following:
- Navigate to the folder where you uploaded files in the previous exercise,
- use a filter to display files with 077 in the filename,
- delete files that match that pattern.
...