Get a filename only list of files in a folder

To get a list of all files in a folder without path, you can use the following snippet:

$> find ../PATH/TO/FOLDER/TO/LIST/FILES/FROM -type f -printf "%f\n"

Example result:

5ed8d879-9203-4c26-afe4-4eee702ffcc7.ttf
25h-icons.woff
6ab1eb08-75f2-4c1a-9911-2752e3fd6ec9.woff
ada6576a-cbce-4da0-994b-b4719f95ac06.eot
dc80306d-6b3e-422b-85c3-bad65f5446d4.woff
1791f364-9061-4459-a14d-0b188cfd7193.woff2
fb754dec-aa8f-444c-be48-868464c47ab0.woff
20988062-bfc8-4c30-9306-8053b179b381.eot
79de9df8-0826-46b9-beea-eb39122d4762.woff2
087e5c21-3358-4cf3-9d2c-289a03a48292.eot
7869ff0a-c18f-4ce1-bf07-fbf5b7172b66.ttf
c932b9cc-bd91-4ee0-889b-302d53093448.woff2
c9fa0fce-5615-4509-af40-370a4032df9a.woff2
08bae5d9-f7bd-4e7f-8446-be05a16cc9e6.ttf
56ce7ab2-c49f-4aa1-85ce-f1823fc02355.woff
bedf9150-5659-4119-9640-0f16e67d82b9.woff2
9131f395-46ef-4940-8480-8ff008c42e59.woff
77fac51a-d062-438a-a493-6b67508aa97f.woff
bb8422a9-7303-4111-8be4-7de2f583aaf3.woff2
746ffa4d-bd68-4487-bb7a-0c90d07c6533.woff2
5fdc935e-9e30-442a-bbe9-8d887b858471.woff
616c4c87-a077-43f4-a9f4-f01267c13818.ttf
084ad33e-9248-40f7-b5ce-1d9dee2809c4.eot
d399cbfa-b9be-47ac-983c-3600c2684bb2.ttf
295ff20c-2b48-4fa6-be92-a53bbf9bbbb4.ttf
25h-icons.ttf
2f8b7d6e-428d-4cc1-a456-712fc6aa2123.woff2
9322b01d-540d-464b-8990-dcbfa6a03ce8.eot
2d3fc601-c309-4996-bc30-1426bc33ac56.eot
cf9c8c0b-5324-4c4a-b72c-48ba07888cbf.woff
9e2a0c3f-4726-43ae-ab94-5f56228d5f80.woff
25h-icons.eot
a842cfef-4388-46ae-854c-d7b0cfc07428.ttf
e602f52e-f8a6-4044-b74c-2abe7c262cda.woff
25h-icons.svg
30ebcbfa-d651-4ecd-a0a2-2bb110def1d4.woff2
f1f853cb-6239-4c68-b259-70b41671b488.ttf
14f9135a-8687-4aef-81e4-1a669f3b9152.ttf
e37f70a1-ddc7-4b8f-87e8-85bc6815d7c8.ttf
a307adfc-df9f-49b2-bb48-48f37c79613e.eot
222b92ed-c250-48fd-98a2-2e16e74d3d09.eot
929b9ace-4dd7-4335-9db8-fa559edb2b47.woff
154624aa-7710-4639-ad8d-aae7dd96dd63.woff2
257c802f-349c-4b4d-aefa-546d5de15ec6.eot
d8bd40fc-2c9a-4086-8784-aa10c7143886.eot
52d7fb45-8542-44d7-be95-e9ab57d25d41.ttf
bc32e3e8-56b5-4ff4-b1db-af04a9f26acb.eot
1ba28851-f34b-4cb8-bf58-6a4b160ba249.woff2

Prefix files:

If you want to prefix files, you can use the same command too:

$> find ../PATH/AND/SO/ON -type f -printf "/pub/fonts/%f\n"

Example result:

/pub/fonts/5ed8d879-9203-4c26-afe4-4eee702ffcc7.ttf
/pub/fonts/25h-icons.woff
/pub/fonts/6ab1eb08-75f2-4c1a-9911-2752e3fd6ec9.woff
/pub/fonts/ada6576a-cbce-4da0-994b-b4719f95ac06.eot
/pub/fonts/dc80306d-6b3e-422b-85c3-bad65f5446d4.woff
/pub/fonts/1791f364-9061-4459-a14d-0b188cfd7193.woff2
/pub/fonts/fb754dec-aa8f-444c-be48-868464c47ab0.woff
/pub/fonts/20988062-bfc8-4c30-9306-8053b179b381.eot
/pub/fonts/79de9df8-0826-46b9-beea-eb39122d4762.woff2
/pub/fonts/087e5c21-3358-4cf3-9d2c-289a03a48292.eot
/pub/fonts/7869ff0a-c18f-4ce1-bf07-fbf5b7172b66.ttf
/pub/fonts/c932b9cc-bd91-4ee0-889b-302d53093448.woff2
/pub/fonts/c9fa0fce-5615-4509-af40-370a4032df9a.woff2
/pub/fonts/08bae5d9-f7bd-4e7f-8446-be05a16cc9e6.ttf
/pub/fonts/56ce7ab2-c49f-4aa1-85ce-f1823fc02355.woff
/pub/fonts/bedf9150-5659-4119-9640-0f16e67d82b9.woff2
/pub/fonts/9131f395-46ef-4940-8480-8ff008c42e59.woff
/pub/fonts/77fac51a-d062-438a-a493-6b67508aa97f.woff
/pub/fonts/bb8422a9-7303-4111-8be4-7de2f583aaf3.woff2
/pub/fonts/746ffa4d-bd68-4487-bb7a-0c90d07c6533.woff2
/pub/fonts/5fdc935e-9e30-442a-bbe9-8d887b858471.woff
/pub/fonts/616c4c87-a077-43f4-a9f4-f01267c13818.ttf
/pub/fonts/084ad33e-9248-40f7-b5ce-1d9dee2809c4.eot
/pub/fonts/d399cbfa-b9be-47ac-983c-3600c2684bb2.ttf
/pub/fonts/295ff20c-2b48-4fa6-be92-a53bbf9bbbb4.ttf
/pub/fonts/25h-icons.ttf
/pub/fonts/2f8b7d6e-428d-4cc1-a456-712fc6aa2123.woff2
/pub/fonts/9322b01d-540d-464b-8990-dcbfa6a03ce8.eot
/pub/fonts/2d3fc601-c309-4996-bc30-1426bc33ac56.eot
/pub/fonts/cf9c8c0b-5324-4c4a-b72c-48ba07888cbf.woff
/pub/fonts/9e2a0c3f-4726-43ae-ab94-5f56228d5f80.woff
/pub/fonts/25h-icons.eot
/pub/fonts/a842cfef-4388-46ae-854c-d7b0cfc07428.ttf
/pub/fonts/e602f52e-f8a6-4044-b74c-2abe7c262cda.woff
/pub/fonts/25h-icons.svg
/pub/fonts/30ebcbfa-d651-4ecd-a0a2-2bb110def1d4.woff2
/pub/fonts/f1f853cb-6239-4c68-b259-70b41671b488.ttf
/pub/fonts/14f9135a-8687-4aef-81e4-1a669f3b9152.ttf
/pub/fonts/e37f70a1-ddc7-4b8f-87e8-85bc6815d7c8.ttf
/pub/fonts/a307adfc-df9f-49b2-bb48-48f37c79613e.eot
/pub/fonts/222b92ed-c250-48fd-98a2-2e16e74d3d09.eot
/pub/fonts/929b9ace-4dd7-4335-9db8-fa559edb2b47.woff
/pub/fonts/154624aa-7710-4639-ad8d-aae7dd96dd63.woff2
/pub/fonts/257c802f-349c-4b4d-aefa-546d5de15ec6.eot
/pub/fonts/d8bd40fc-2c9a-4086-8784-aa10c7143886.eot
/pub/fonts/52d7fb45-8542-44d7-be95-e9ab57d25d41.ttf
/pub/fonts/bc32e3e8-56b5-4ff4-b1db-af04a9f26acb.eot
/pub/fonts/1ba28851-f34b-4cb8-bf58-6a4b160ba249.woff2

 

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.