You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aliases/file_management-output_only/file_finding/name-matching-file-finding.aliases
+9-2
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,18 @@
1
1
#
2
2
# File:
3
-
# match-limited-file-finding.aliases
3
+
# name-matching-file-finding.aliases
4
4
#
5
5
# Description:
6
-
# Match limited file finding aliases
6
+
# Name matching file finding aliases
7
7
#
8
8
9
+
# [MULTI-FILE OUTPUT]
10
+
11
+
ff() { find . -type f -name "*${1}*"; } # ff: Recursively find all files matching a name name; $1: file name.
12
+
fd() { find . -type d -name "*${1}*"; } # fd: Recursively find all directories matching a name name; $1: directory name.
13
+
14
+
# [SINGLE-FILE OUTPUT]
15
+
9
16
fff() { find . -type f -name "*${1}*" -print -quit; } # fff: Recursively find the first file matching a name; $1: file name.
10
17
fdf() { find . -type d -name "*${1}*" -print -quit; } # fdf: Recursively find the first directory matching a name; $1: directory name.
11
18
fffa() { find "$PWD" -type f -name "*${1}*" -print -quit; } # fffa: Recursively find the first file matching a name and return its absolute path; $1: file name.
0 commit comments