Linux text editor temp files search
题
I remember reading where it is bad security practice to edit files directly on the server because it may create hidden temporary files. Is it possible to search for these files? I was thinking of find / -name .*, but that returns "paths must precede expression: .." and do not know if that will include all files possibly created by elvis or nano.
解决方案
Put the name in quotes:
find / -name '.*'
otherwise the shell interprets it and runs something like:
find / -name . ..
其他提示
I've seen several versions of that "backup" file name pattern but the most common one has always contained a ~
. If you're just looking for ~
then something like this would work...
find / -name '*~*'
If you want to find hidden files then...
find / -name '.*'
不隶属于 StackOverflow