You do not want to delete the . or ..
You can use the
find utility to get a list:
Code:
find ~/ -type f -name '.*'
For example, here's the list from my home directory:
Code:
find ~/ -type f -name '.*'
/home/trona/.xscreensaver
/home/trona/.viminfo
/home/trona/.gnuplot-wxt
/home/trona/tutorial/.gmtcommands4
/home/trona/.ICEauthority
/home/trona/.bash_history
/home/trona/public_html/phpcb-examples/ch12/.DS_Store
/home/trona/public_html/phpcb-examples/.DS_Store
/home/trona/.esd_auth
/home/trona/.config/libreoffice/3/user/store/.templdir.cache
/home/trona/.config/chromium/Default/File System/000/p/.usage
/home/trona/.thunderbird/kadbhve8.default/.parentlock
/home/trona/.cvspass
/home/trona/.serverauth.2627
/home/trona/.screenrc
/home/trona/.install4j
/home/trona/.mozilla/firefox/lh09h7sl.default/.parentlock
/home/trona/.mozilla/seamonkey/i8p0jf67.default/.parentlock
/home/trona/Ikin/_rels/.rels
/home/trona/maps/.gmtcommands4
/home/trona/maps/.gmtdefaults4
/home/trona/.exrc
/home/trona/.sh_history
/home/trona/.Xauthority
/home/trona/.lesshst
/home/trona/.profile
/home/trona/Notes/.gmtcommands4
/home/trona/Desktop/.directory
/home/trona/.gtk-bookmarks
/home/trona/.kshrc
/home/trona/src/distance/.gmtcommands4
/home/trona/tmp/.xscreensaver-getimage.cache
You can modify the
find command to remove those files and directories:
Code:
find ~/ -type f -name '.*' -exec rm -r {} \;
That'll do it.
Before you do anything, however,
back up your entire home directory somewhere.
Also,
look at the list -- there may be files you do not want deleted; e.g.,
.bashr,
.profile, maybe a few others. In this case, simply
Code:
find ~/ -type f -name '.*' > dot_list
Edit that file, removing anything you don't want deleted then
Code:
for file in $(cat dot_list)
do
rm -r ${file}
done
Again, make a back up before you screw it up (so you can unscrew it).