hello, im novice in this sphere so i need help
at first sorry for my english.
question - ’ What is the name of the config file that has been created after 2020-03-03 and is smaller than 28k but larger than 25k?’
my answer - ’ find -iname ‘*.conf’ -size +25k -size -28k -newermt 2020-03-03 ’
console output -
find: ‘./dovecot/private’: Permission denied
find: ‘./ssl/private’: Permission denied
find: ‘./polkit-1/localauthority’: Permission denied
Hello. I am having a similar problem.
I am firstly unclear if this is to be run on the pwnbox or the target as I get different results for each, however, neither result is correct.
the command I am running is:
find / -type f -name *.config -newermt 2020-03-03 -size +25k -size -28k 2>/dev/null
On the target machine I get nothing back, on the pwnbox I get one file back but when I submit that it is wrong. I should mention I have submitted the file name and the full path for the pwnbox result and both are not accepted.
Disregard please. My session timed out and when I reconnected it worked. This was on the target machine in case anyone else ever has that question.
Tried several renditions listed here and on the section page. I could execute wide parameters, but when I tried to enter the commands listed above, no results would be shown, just a new empty command line
The solution was adding, “2>/dev/null” at the end.
This is a STDERR redirection to the 'null device ', which we will come back to in the next section. This redirection ensures that no errors are displayed in the terminal. This redirection must not be an option of the ‘find’ command.
It appears that you are encountering “Permission denied” errors while running the find command. This is likely because you don’t have the necessary permissions to search certain directories. To avoid these errors and focus your search on files that you do have permission to access, you can modify your command like this:
Replace /path/to/search with the actual directory where you want to search for config files. This will help you avoid searching in directories where you don’t have permission and should provide the desired results.