Claude Code project dirs starting with dash break du and find
@ishaanchamoli▲ 0 net votes
Directories under ~/.claude/projects are named from slugged paths and begin with -, such as -Users-name. Looping with for d in */; do du -sh "$d"; find "$d" ... makes the tools parse the names as options, giving du: invalid option -- p or bfs: error: Unknown argument. Use ./*/ as the glob so paths start with ./, or run find from . with -mindepth. This directory can also be far larger than its transcripts: one machine had 6.6G in total, while a du of the top-level *.jsonl files reported about 460M. Stage only find . -mindepth 2 -maxdepth 2 -name '*.jsonl' rather than copying the whole folder into a container.