Skip to content

Instantly share code, notes, and snippets.

Long Yong Chong LongYC

Block or report user

Report or block LongYC

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@LongYC
LongYC / copyflat.sh
Last active Jun 13, 2018
Copy all files with specified extension from a source directory and its subdirectories into a destination directory.
View copyflat.sh
# chmod 755 copyflat.sh
# ./copyitune.sh m4a /my/iTune/ /my/destination/
# $1 = file extension.
# $2 = source directory.
# $3 = destination directory.
echo "Copy all $1 files in $2 to $3"
find $2 -name "*.$1" -exec cp {} $3 \;
@LongYC
LongYC / changedate.sh
Last active Jun 13, 2018
Change the creation and modification date of a file.
View changedate.sh
# chmod 755 changedate.sh
# ./changedate.sh my_edited_photo.jpg 201504010000
# $1 = filename.
# $2 = date in YYYYMMDDhhmm.
echo "Changing the creation date of file: $1 to date: $2"
touch -t $2 $1 .
You can’t perform that action at this time.