You are not logged in.
this command
find . -name "*.log"
Can help me find all log files in linux?
any ideas?
Last edited by Gugi (2019-02-09 15:48:33)
- I am using Arch BTW
Offline
find / -name "*.log"
This will find them, but you will get many error messages about directories' permissions.
Your command will only find the ones in your current directory and its subdirectories.
Last edited by ratcheer (2019-02-09 14:54:06)
Offline
find / -name "*.log"
This will find them, but you will get many error messages about directories' permissions.
Your command will only find the ones in your current directory and its subdirectories.
If i will login to root account, and use cd / to move to root directory
Its enough to find all files with "*.log" ?
#Next Question
So if i will find them all, i can find them and clear it all via root account ? If i delete them, it will automatically create new one log file?
Last edited by Gugi (2019-02-09 14:59:00)
- I am using Arch BTW
Offline
What exactly are you trying to do, and what is your ultimate goal? This sounds like an XY problem.
Offline
As you ask, my ultimate goal is to find them all and with @ratcher i did it, now i can clear them or delete, and see what will happen after few days with using computer, if linux create new one, or if when i delete them, it will not exist anymore
@2ManyDogs
You are wrong, propably you dont understand my topic question, and last post after @ratcher answer, because i said all what you need to answer "#Next Question, but dont worry, now its all clearly to see.
And now i get my "Ultimate Goal"
Its ready to close thread
Last edited by Gugi (2019-02-09 15:23:19)
- I am using Arch BTW
Offline
You are wrong, propably you dont understand my topic question
You are likely correct on both counts. But only so because your question was extremely vague.
Do you really want just files with the .log extension? If so, then you are all set, and you can mark the thread as [SOLVED]. If you actually want all files with potentially relevant logged data, the commands in this thread will not do that.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Gugi wrote:You are wrong, propably you dont understand my topic question
You are likely correct on both counts. But only so because your question was extremely vague.
Do you really want just files with the .log extension? If so, then you are all set, and you can mark the thread as [SOLVED]. If you actually want all files with potentially relevant logged data, the commands in this thread will not do that.
So would you like to help me out?
You mean about that not all Data is in .log files ? Or?
Last edited by Gugi (2019-02-09 15:44:19)
- I am using Arch BTW
Offline
With what??
I already noted I thought your question was vague. If you really do want just files with a name literally ending in '.log' then you don't need any more help - mark the thread as solved.
If this is not what you actually want, then 2ManyDogs was correct that this is an X-Y problem.
No, not all data is in .log files.
Last edited by Trilby (2019-02-09 15:45:03)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
@Gugi, logs exist so you can later inspect what happened. They will at last get rewritten when the logging process restarts, should not take lots of space on your HDD (compared to eg. a set of wallpapers) and there's also https://www.archlinux.org/packages/core … logrotate/
If you intend to clutter the systems history w/ "alternative facts", *.log won't cut it…
Online
thanks
- I am using Arch BTW
Offline