-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmv_files.sh
36 lines (32 loc) · 1.19 KB
/
mv_files.sh
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
35
36
# #############################################################################
# mv_files.sh BEGIN #
# #############################################################################
# --------------------------------------------------------------------------- #
# #############################################################################
# Alias for mvfiles
alias move-files="mvfiles"
alias move_files="mvfiles"
alias mv-files="mvfiles"
# Move all files (not folders) in current directory to path
mvfiles() {
if [[ -z "$1" ]]; then
echo "Usage: movefiles <destination_folder>"
return 1
fi
find . -maxdepth 1 -type f -exec mv {} "$1" \;
}
# Alias for mvall
alias move-all="mvall"
alias mv-all="mvall"
alias move_all="mvall"
# Move all files and folders in current directory to path
mvall() {
if [[ -z "$1" ]]; then
echo "Usage: moveall <destination_folder>"
return 1
fi
mv -- * "$1"
}
# #############################################################################
# mv_files.sh END #
# #############################################################################