Run following bash script:
#!/bin/bash
# Source and destination directories
SRC_DIR="/usr/bin"
DEST_DIR="$HOME/.local/uubin"
# Ensure destination directory exists
mkdir -p "$DEST_DIR"
# Find files starting with 'uu_' in /usr/bin
find "$SRC_DIR" -type f -name 'uu_*' | while read -r src_file; do
# Get the base filename
filename=$(basename "$src_file")
# Strip the 'uu_' prefix
stripped_name="${filename#uu_}"
# Copy to destination with new name, preserving attributes
cp -u --preserve=mode,timestamps "$src_file" "$DEST_DIR/$stripped_name"
# Make sure it's executable
chmod +x "$DEST_DIR/$stripped_name"
done
echo "All uu_ files copied to $DEST_DIR with prefix stripped."then appending the PATH in your rc profile, if you are using bash, it would be ~/.bashrc or ~/.bash_profile:
export PATH="$HOME/.local/uubin:$PATH"
then reload your shell