Posted in Linux commands

“find” with Style, Part 3: Displaying File Attributes

If you search files with the find command, you get a list of filenames:

$ find . -name '*.py'
./projekte/sensornet/bmp280/fill_bmp280.py
./projekte/sensornet/bmp280/baro.py
./github/pi_stuff/unsorted/cheerlights.py
./github/pi_stuff/sensornet/bmp280/baro.py
./progs/python/mqtt/mqtttest.py
./progs/python/database/get_last_bmp280.py

If you need the file attributes (like size, file permissions, …) you can do some tricks to let ls do the job. Or do you?

find has the parameter -ls which does this:

$ find . -name '*.py' -ls