-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfilesListRecursive.sh
More file actions
34 lines (27 loc) · 1016 Bytes
/
filesListRecursive.sh
File metadata and controls
34 lines (27 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
source @includes.sh
echo '###################################################'
echo '# Description: List files in directory'
echo '# Usage: $ ./fileListRecursive.sh /path/to/list'
echo '# Param 1: Path'
echo '###################################################'
echoNewline
################################################################################
################################################################################
# check parameters
if [[ $1 == "" ]] ; then
echoError "1st arg must be a path"
exit 1
fi
################################################################################
################################################################################
# get path
path=$1
echoInfo "Listing files in: $path"
# do listing
cd $path
find "$PWD" -type f
################################################################################
################################################################################
# complete
echoSuccess "File listing done!"