Skip to content

Commit b7a57fe

Browse files
author
adrianbartyczak
committed
Merge file finding aliases files
1 parent 1f303db commit b7a57fe

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

aliases/file_management-output_only/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77

88
## File finding
99

10-
* [Basic file finding aliases](file_finding/basic-file-finding.aliases)
11-
* [Match limitied file finding aliases](file_finding/match-limited-file-finding.aliases)
10+
* [Name matching file finding aliases](file_finding/name-matching-file-finding.aliases)
1211
* [Text matching file finding aliases](file_finding/text-matching-file-finding.aliases)
1312

1413
## File permission information

aliases/file_management-output_only/file_finding/basic-file-finding.aliases

-11
This file was deleted.

aliases/file_management-output_only/file_finding/match-limited-file-finding.aliases aliases/file_management-output_only/file_finding/name-matching-file-finding.aliases

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
#
22
# File:
3-
# match-limited-file-finding.aliases
3+
# name-matching-file-finding.aliases
44
#
55
# Description:
6-
# Match limited file finding aliases
6+
# Name matching file finding aliases
77
#
88

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+
916
fff() { find . -type f -name "*${1}*" -print -quit; } # fff: Recursively find the first file matching a name; $1: file name.
1017
fdf() { find . -type d -name "*${1}*" -print -quit; } # fdf: Recursively find the first directory matching a name; $1: directory name.
1118
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

Comments
 (0)