Skip to content

Commit 80160a6

Browse files
committed
Added better wildcard example based upon Sakib's example. Added some draft info for usage of metadata tags. Added comment on replicas.
1 parent be58439 commit 80160a6

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

_episodes/02-rucio_usage.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ rucio did list epic:/RECO/26.02.0/epic_craterlake/EXCLUSIVE/DEMP/DEMPgen-1.2.4/\
123123

124124
We now have a more manageable list and we can see that we have some different beam energy configurations and Q2 ranges available. Note that we can list just the DID itself by adding `--short` as a prefix to our `did list` call.
125125

126+
We could also make slightly better use of wildcards in this command too:
127+
128+
```bash
129+
rucio did list epic:*RECO*26.02.0*DEMP*
130+
```
131+
132+
But as above, this does require some knowledge of what our DID looks like to begin with.
133+
126134
> ## `Pin for later:`
127135
> If we used `--short` as suggested to just get a list of DIDs, we could pipe this output to a file.
128136
>
@@ -159,6 +167,15 @@ rucio replica list file --protocols root --pfns --rses isopenaccess epic:/RECO/2
159167
> ```bash
160168
> rucio replica list file --protocols root --pfns --rses isopenaccess epic:/RECO/26.02.0/epic_craterlake/EXCLUSIVE/DEMP/DEMPgen-1.2.4/10x250/q2_3_10/pi+
161169
> ```
170+
> You could pope this to a file for later usage. However, note that replicas may exist for a given file. Both would be printed by this command as is. You can check if multiple copies exist via:
171+
> ```bash
172+
> rucio rule list --did scope:name
173+
> ```
174+
> e.g.
175+
> ```bash
176+
> rucio rule list --did epic:/RECO/26.02.0/epic_craterlake/EXCLUSIVE/DEMP/DEMPgen-1.2.4/10x250/q2_3_10/pi+
177+
> ```
178+
> This will list where the DID is stored and how many copies exist.
162179
{: .callout}
163180
164181
The `root://dtn-eic.jlab.org` at the start of the output tells us that this particular file is stored on JLab servers. As mentioned in the outset, Rucio works across multiple sites easily, however, methods which we might use to stream files do not. **As such, being able to check where our files are stored is a useful feature.**
@@ -213,7 +230,13 @@ As noted on some items in this list, some tags are optional and may not be appli
213230
We can use these tags to filter through the available datasets and identify those of interest to us. For example:
214231
215232
```bash
216-
Example command
233+
rucio did list --filter 'TAG==*' 'scope:*'
234+
```
235+
236+
So, as an example, we could all DIDs using the latest software release (v26.03.0) via:
237+
238+
```bash
239+
rucio did list --filter 'software_release==26.03.0*' 'epic:*'
217240
```
218241
219242
> ## `Exercise:`

0 commit comments

Comments
 (0)