# cd /home/esofthub
# ls -la
Bonus: Copy hidden files or directories to a directory or delete hidden files and directories from a directory (per reader's request).
# cp -p .hiddenfile my_destination_directory
# cp -p .login my_destination_directory
# cp -pr .hiddendirectory my_destination_directory
# cp -pr .* my_destination_directory (copies all hidden files and hidden directories recursively)
To delete a hidden file or directory, make sure you know where you are at before performing the activities below.
# pwd
# rm .hiddenfile
# rm -r .hiddendirectory
To delete hidden files and directories as a wildcard (deletes all hidden files in the current directory and directories recursively)
# rm -r .*
Even though I was referring to $HOME, this reader makes a good point...watch where you are at on the system - pwd
Be CARFEUL!!! If you do rm -rf .* you will delete the entire disk (because .* applies to .. as well)
1 comment:
Be CARFEUL!!! If you do rm -rf .* you will delete the entire disk (because .* applies to .. as well)
Post a Comment