From 3b981b298720e879c1136443e1fd55975c93626d Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sun, 2 Nov 2025 00:21:54 +0000 Subject: [PATCH] Update cheatsheets --- tldr/linux/locate | 8 ++++++-- tldr/osx/locate | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tldr/linux/locate b/tldr/linux/locate index 1ba8325e..1483470f 100644 --- a/tldr/linux/locate +++ b/tldr/linux/locate @@ -10,11 +10,15 @@ source: https://github.com/tldr-pages/tldr.git - Look for pattern in the database. Note: The database is recomputed periodically (usually weekly or daily): -`locate {{pattern}}` +`locate "{{pattern}}"` + +- Look for a pattern case-insensitively: + +`locate {{[-i|--ignore-case]}} "{{pattern}}"` - Look for a file by its exact filename (a pattern containing no globbing characters is interpreted as `*pattern*`): -`locate '*/{{filename}}'` +`locate "*/{{filename}}"` - Recompute the database. You need to do it if you want to find recently added files: diff --git a/tldr/osx/locate b/tldr/osx/locate index 62e8abd0..19e78b4e 100644 --- a/tldr/osx/locate +++ b/tldr/osx/locate @@ -12,9 +12,13 @@ source: https://github.com/tldr-pages/tldr.git `locate "{{pattern}}"` +- Look for a pattern case-insensitively: + +`locate -i "{{pattern}}"` + - Look for a file by its exact filename (a pattern containing no globbing characters is interpreted as `*pattern*`): -`locate */{{filename}}` +`locate "*/{{filename}}"` - Recompute the database. You need to do it if you want to find recently added files: