How to enter the directory with "-" in linux

File upload is used in today's project, and attachments are saved by user. The initial user ID is -1, and a directory named "-1" is automatically created, but under linux, "cd -1" cannot be used to enter the directory;

 

After working for a long time, a colleague Daniel helped me solve "cd -- -1" and successfully entered the directory;

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327100159&siteId=291194637