I want to create the nested folder .aa/.bb
in the current user root's home directory. So I use the command mkdir -p "~/.aa/.bb/"
. But it doesn't work as I expected and it created a folder ~
, which I don't know how to enter into. Below is my testing.
root@u2004:~# pwd
/root
root@u2004:~# ls -la
total 28
drwx------ 3 root root 4096 Aug 28 14:46 .
drwxr-xr-x 20 root root 4096 Aug 28 01:22 ..
-rw------- 1 root root 3285 Aug 28 21:56 .bash_history
-rw-r--r-- 1 root root 3106 Dec 5 2019 .bashrc
drwx------ 2 root root 4096 Aug 1 00:31 .cache
-rw-r--r-- 1 root root 161 Dec 5 2019 .profile
-rwxr-xr-x 1 root root 89 Aug 28 14:46 setproxy.sh
root@u2004:~# mkdir -p "~/.aa/.bb/"
root@u2004:~# ls -la
total 32
drwx------ 4 root root 4096 Aug 28 21:59 .
drwxr-xr-x 20 root root 4096 Aug 28 01:22 ..
drwxr-xr-x 3 root root 4096 Aug 28 21:59 '~' <--------------------
-rw------- 1 root root 3285 Aug 28 21:56 .bash_history
-rw-r--r-- 1 root root 3106 Dec 5 2019 .bashrc
drwx------ 2 root root 4096 Aug 1 00:31 .cache
-rw-r--r-- 1 root root 161 Dec 5 2019 .profile
-rwxr-xr-x 1 root root 89 Aug 28 14:46 setproxy.sh
root@u2004:~#
root@u2004:~# cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
root@u2004:~#
Any ideas?