Never remove ${HOME}/Downloads . #2

Closed
opened 2025-05-24 20:03:51 +08:00 by larryw3i · 2 comments
Contributor

rm -rvf ${d_dir}

Buddy, it seems the ${HOME}/Downloads directory is a reserved directory to the user who logged into desktop, the Desktop Environment will create ${HOME}/Downloads for user after logging into desktop first time. And this script should ask for saving the downloaded packages or not:

#!/bin/bash
read -p "Do you want to delete all downloaded packages? (y/n) " yn
case $yn in 
	[yY] ) 
	    # some code ;
		break;;
	* )
	    # some code ; 
	    ;;
esac

Some people (like me) really dislike scripts deleting files on their own.

https://git.whlug.cn/manxing/L2GI/src/commit/6fbb7e2c75d54e8a2802f1c8f5ba4c43cec26e32/install_loonggpu.sh#L37 Buddy, it seems the `${HOME}/Downloads` directory is a `reserved` directory to the user who logged into desktop, the Desktop Environment will create `${HOME}/Downloads` for user after logging into desktop first time. And this script should ask for saving the downloaded packages or not: ```bash #!/bin/bash read -p "Do you want to delete all downloaded packages? (y/n) " yn case $yn in [yY] ) # some code ; break;; * ) # some code ; ;; esac ``` Some people (like me) really dislike scripts deleting files on their own.

可以把下载的东西放到/tmp里面,这样就不用纠结要不要删了,重启下就没了

可以把下载的东西放到/tmp里面,这样就不用纠结要不要删了,重启下就没了
Owner

已修改

已修改
Sign in to join this conversation.
No Label
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: manxing/L2GI#2
No description provided.