Have a look at the manual page for chmod: man chmod
cd <your hard drive device-name>; chmod -R 777 *
will recursively descend the directory tree.
toggle quoted message
Show quoted text
On Fri, 23 Sep 2022 16:29:34 -0400, "raclausi" <raclausi@...> wrote:
Thank you¡ I was able ,as super user, to see and change the permissions on the directories and make all readable and writable. ls -l takes a very long time to list a zillion files. I may just delete all files and use as is.
Thank you to all for valuable ideas.
Sent from my iPad rich clausi RC Software and Data
On Sep 23, 2022, at 10:32 AM, Larry Dighera <LDighera@...> wrote:
?
Hello Rich,
I have written a little script that you may find useful. You can see it
below, and I've attached a copy of it that can be run from a terminal.
Best regards,
Larry
Wb6BBB
=============================================================================
# show_drives.sh Display Labels and UUIDs of media
# LGD: Wed May 24 06:35:20 PDT 2017
# Re-write Fri Jun 9 04:31:03 PDT 2017
# Written as an exercise in shell script programming. LDighera@...
#
trap "setterm -foreground white;echo;exit 1" HUP 1 ERR INT QUIT TERM 15 #
trap -l will display signals (bash only)
# Put commands in the environment as positional parameters to execute
set "lsblk -f" "lsblk -a" "fdisk -l" "findmnt -A" "findmnt -D" "findmnt -D
-A" "df -Th"
# Prompt user for input
PRMPT="Enter to continue [Q]: "
WAIT(){
### ksh 'read' syntax: ksh man page line 2227 (vname?prompt) ####
[[ $(echo $SHELL |grep ksh) ]] && READ="read -n 1 REPLY?\"${PRMPT}\"" #
ksh read syntax
#### bash 'read' syntax: bash man page line 4335 (-p prompt) ####
[[ -n $BASH ]] && READ="read -n 1 -r -p \"${PRMPT}\"" #
bash read syntax (-r, no varname)
eval ${READ} #
Issue prompt for next page
[[ $REPLY != [Qq]* ]] && setterm -foreground white && return #
Return to caller
[[ $REPLY == [Qq]* ]] && setterm -foreground white #
User request to quit received
echo -e "\033[0m";exit #
Set the Xterminal foreground=black; background=white
}
# Dynamically generate header and footer lines equal to the length of the
longest line of the output of the current command with the command-name
centered in the middle of the header line
GENLIN(){
CMDLEN=$(echo "$1"|wc -m) #
The length of the current command
LEN=$(eval "$1"|wc -L) #
The length of the longest line generated by the current command passed as an
argument to this function
MIDLIN=$((( ($LEN / 2) - $(echo $1|wc -m)+2 ))) #
The mid-point of the line at which to place the current command in the
header
[[ $2 != "end" ]] && LEN=$((( $LEN - $CMDLEN ))) #
Deduct the length of the command line from the header length for footer
for i in $(seq $LEN) ;do #
Loop through the commands
echo -e "=\c" #
Print each line characters
[[ $i == $MIDLIN && $2 != "end" ]] && echo -e " $1 \c" #
Center the command-name in the header line
done
echo
}
CURROW=$(stty -a |grep rows|awk -F \; '/rows/ {print $2}'|tr -d '[a-z A-Z]')
# Get the number of terminal rows/lines (cursor row position at bottom of
screen)
[[ -n $BASH ]] && CURROW=$((( $CURROW - 1 ))) #
fucking bash :-)
while : ;do
GENLIN "$1" #
Print output header line
eval "$1" #
Print command output
GENLIN "$1" "end" #
Print output footer line
echo
shift #
Get the next command to run
[[ -z $1 ]] && { echo;exit ;} #
Exit when command list is exhausted
setterm -foreground green;WAIT;setterm -foreground white #
Color prompt for user input
echo -e "\033[0m\c" #
Set Xterminal foreground=black; background=white
tput cup $((($CURROW - 1))) 0 #
Over-write the prompt line
done
exit 0
=============================================================================
On Tue, 20 Sep 2022 12:07:02 -0400, "raclausi" <raclausi@...> wrote:
Hi, I have acquired a ¡°purple¡± (Surveillance hard drive) western digital 2 T hard drive .
I want to format it using my raspi but I do not have the permission to get beyond the cache. I would like to drop to sudo su command line but I am unsure what utilities I can call to wipe and format.
This drive was from a broken Lorex surveillance system owned by my friend who owns a hardware store. I want to repurpose it to the rasp. I am using my universal adapter kit to fire it up and read the directories but the 2020 video library is basically the whole disk. Gotta get rid of it.
Any insight is appreciated.
Rich, ve3DCC
<show_drives.sh>