nautilus open random file 1

nautilus open random file

find . -type f | shuf -n 1 | xargs -d "\n" xdg-open

Here is what the above code is Doing:
1. find . -type f: Find all files in the current directory.
2. shuf -n 1: Shuffle the list of files and pick one.
3. xargs -d “\n” xdg-open: Open the file with the default application.

Similar Posts