Wiki
Version 10 (Panagiotis Louridas, 05/27/2010 05:03 pm)
1 | 1 | Panagiotis Louridas | h1. Java GSS Command Line Interface Client (JGSSCLI) |
---|---|---|---|
2 | 2 | Panagiotis Louridas | |
3 | 3 | Panagiotis Louridas | JGSSCLI is a command line for GSS, and in particular the "Pithos":http://pithos.grnet.gr online storage service. |
4 | 3 | Panagiotis Louridas | |
5 | 3 | Panagiotis Louridas | It is open source and released under the terms of the "BSD licence":http://www.opensource.org/licenses/bsd-license.php. |
6 | 3 | Panagiotis Louridas | |
7 | 3 | Panagiotis Louridas | h1. Why JGSSCLI? |
8 | 3 | Panagiotis Louridas | |
9 | 4 | Panagiotis Louridas | * JGSSCLI is portable; it runs wherever a Java Virtual Machine runs. GSS and Pithos are accesible through web browsers and plugins, but these offer only a Graphical User Interface (GUI). Sometimes a command line application is more appropriate. Command like users may appreciate the choice anyway, especially since WebDAV does not work on every platform. |
10 | 3 | Panagiotis Louridas | |
11 | 3 | Panagiotis Louridas | * JGSSCLI is predictable; it runs in the same way on any platform supporting Java. This is not necessarily true for other types of access to GSS. For instance, browsers may impose their own limits on certain operations, such as maximum file size for uploads. Indeed, we have noticed that really big files can only be uploaded by 64-bit browsers on 64-bit operating systems. JGSSCLI does not suffer from any such dependencies. |
12 | 1 | Panagiotis Louridas | |
13 | 4 | Panagiotis Louridas | * JGSSCLI can be used in scripts. |
14 | 4 | Panagiotis Louridas | |
15 | 4 | Panagiotis Louridas | * JGSSCLI is faster than web browser access as it does not require the client to login each and every time. |
16 | 4 | Panagiotis Louridas | |
17 | 4 | Panagiotis Louridas | h1. How to Use JGGCLI |
18 | 5 | Panagiotis Louridas | |
19 | 9 | Panagiotis Louridas | # Download the "latest version":http://code.grnet.gr/projects/jgsscli/repository/entry/java/jgsscli/deploy/jgsscli.zip?format=raw. |
20 | 1 | Panagiotis Louridas | # Unzip the file |
21 | 6 | Panagiotis Louridas | # Create a directory called <pre>.gss</pre> in your home directory. In MS-Windows 7 this is something like <pre>C:\Users\YourName</pre> In Mac OS X, Linux, etc., your designated home. |
22 | 6 | Panagiotis Louridas | # Create a file called <id> in the directory you just created. The contents of the file must be four lines as follows: |
23 | 6 | Panagiotis Louridas | <pre> |
24 | 6 | Panagiotis Louridas | Name:<Name Surname> |
25 | 6 | Panagiotis Louridas | E-mail:<youremail@wherever.gr> |
26 | 6 | Panagiotis Louridas | Username:<Your full username in Pithos> |
27 | 6 | Panagiotis Louridas | Token:<Your current Pithos token> |
28 | 6 | Panagiotis Louridas | </pre> |
29 | 6 | Panagiotis Louridas | Your full username in Pithos is the one you see displayed when you login with your browser on the upper right part of the screen (below the logos). You can see your current token by clicking on menu <pre>Settings</pre> and then <pre>Show Credentials</pre> |
30 | 6 | Panagiotis Louridas | Note that you only need to enter your token once. You can renew it later from inside JGSSCLI, using the corresponding command. |
31 | 6 | Panagiotis Louridas | # That's it. You can now invoke it with <pre>java -jar jgsscli.jar <your command here> </pre> |
32 | 5 | Panagiotis Louridas | |
33 | 6 | Panagiotis Louridas | h1. Commands |
34 | 7 | Panagiotis Louridas | |
35 | 7 | Panagiotis Louridas | * <pre>get <remote file> <local file> </pre> |
36 | 7 | Panagiotis Louridas | |
37 | 10 | Panagiotis Louridas | Gets (downloads) the remote file to the destination pointed to by the local file. |
38 | 10 | Panagiotis Louridas | |
39 | 7 | Panagiotis Louridas | * <pre> ls <remote path> </pre> |
40 | 7 | Panagiotis Louridas | |
41 | 10 | Panagiotis Louridas | Lists the contents of the remote path indicated. If passed the -l switch, it will |
42 | 10 | Panagiotis Louridas | produce a long output that will contain all the item's metadata in JSON format. |
43 | 10 | Panagiotis Louridas | |
44 | 7 | Panagiotis Louridas | * <pre> mkdir <remote path> </pre> |
45 | 7 | Panagiotis Louridas | |
46 | 10 | Panagiotis Louridas | Makes a new directory at the remote path indicated. The remote path may contain a series |
47 | 10 | Panagiotis Louridas | of directories, all of which will be created if needed (it works like mkdir -p in POSIX systems). |
48 | 10 | Panagiotis Louridas | |
49 | 7 | Panagiotis Louridas | * <pre> put <local file> <remote file> </pre> |
50 | 7 | Panagiotis Louridas | |
51 | 10 | Panagiotis Louridas | Uploads a local file to the destination indicated. |
52 | 10 | Panagiotis Louridas | |
53 | 7 | Panagiotis Louridas | * <pre> rm <remote file> </pre> |
54 | 7 | Panagiotis Louridas | |
55 | 10 | Panagiotis Louridas | Permanently deletes a remote file. |
56 | 10 | Panagiotis Louridas | |
57 | 7 | Panagiotis Louridas | * <pre> token </pre> |
58 | 1 | Panagiotis Louridas | |
59 | 10 | Panagiotis Louridas | Refreshes the user token. |
60 | 10 | Panagiotis Louridas | |
61 | 9 | Panagiotis Louridas | * <pre> trash <remote file> </pre> |
62 | 9 | Panagiotis Louridas | |
63 | 10 | Panagiotis Louridas | Moves a remote file to the trash. |
64 | 10 | Panagiotis Louridas | |
65 | 9 | Panagiotis Louridas | * <pre> rfa <remote file> </pre> |
66 | 9 | Panagiotis Louridas | |
67 | 10 | Panagiotis Louridas | Makes a remote file readable by everybody. The file is then accessible by anybody with a web connection, by its URI listed among the other properties when ls -l is given. |
68 | 10 | Panagiotis Louridas | |
69 | 9 | Panagiotis Louridas | * <pre> nrfa <remote file> </pre> |
70 | 10 | Panagiotis Louridas | |
71 | 10 | Panagiotis Louridas | Removes the "read for all" property for the file. That does not mean that the file is not readable by others (it may have been shared to specific users or groups). |