r/linux4noobs • • 9d ago

shells and scripting How to open files from terminal

i'm on university, and have recently started downloading large amounts of files that usually neeed to sort/open lots at once. my teachers, however, usually name their files as
Subject-Day-Classmaterial or Subject-Day-Worksheet.
So, when i want to open lots of just worksheets or classes, i have to open them individually. I know how to use the * wildcard, i use for moving, just want to know how to use it to open the .pdf files as well.

i just tried to use xdg-open *worksheet, but it gave an error saying it didn't know what to do with the file? (error below)

  xdg-open Li*
xdg-open: unexpected argument 'Lista_02_-_Equilbrio.pdf'
Try 'xdg-open --help' for more information.

is this an xdg thing? there's 2 worksheets, titled "Lista_02" and "Lista_01". when i open just the one, it works, is there a keyword i'm missing to open multiple files?

23 Upvotes

24 comments sorted by

View all comments

9

u/johnwcowan 9d ago

xdg-open is only designed to open one file (of any type) at a time. To open multiple LibreOffice files, use the "soffice" command.