L Filedot Ls Vids Jpg Upd · Official

find . -type f \( -iname "*.jpg" -o -iname "*.mp4" \) -mtime -7 -ls

If you want to create a permanent shortcut command named l that performs this action, follow these steps:


Imagine you're in a directory with a mix of video and image files, and you want to organize them. You might use a series of commands to list files, find specific types, and then update their organization.

Maybe the user intended:

ls filedot/ ls vids/*.jpg upd

…which doesn’t quite parse, but might mean:
List contents of filedot, then list all .jpg files in vids directory, then run something named upd.

If you're looking for specific files:

If we interpret filedot as a missing dot (current directory) and ls as listing, the ideal powerful one-liner to find, list, and update all JPGs and videos is:

find . -type f \( -name "*.jpg" -o -name "*.mp4" -o -name "*.mkv" \) -exec ls -lh {} \; -exec touch {} \;

This command:

For a safer approach (preview before update), run the ls part first, then remove -exec ls to perform the update.


To update the "last modified" time of all JPG and video files to the current time (useful for forcing a backup or re-indexing): l filedot ls vids jpg upd

find . -type f \( -iname "*.jpg" -o -iname "*.mp4" \) -exec touch {} \;