List all accessed configuration files while executing a program in linux terminal (improved version)

strace 2>&1 <any_executable> |egrep -o "\".*\.conf\""
Last listed files presumably have higher precedency then files listed first, i.e. configuration files in the personal .config directory will be listed last and their config parameters will be more authoritative then default config parameters defined in /etc directory which are usually listed above them. If you replace ".conf" with ".ini" in the command, initial files will be listed instead of config files. If you do not like to list multiple access to the same config file, pipe to "uniq" or "uniq -c" to prefix lines by the number of occurrences
Sample Output
$ # (grep -v fonts = suppressing listing immense number of font configs)

$ strace 2>&1 geany |egrep -o "\".*\.conf\"" | grep -v fonts 


By: knoppix5
2020-07-31 10:57:29

What Others Think

Good to know about it. I know you have put a lot of effort into making this article this much informational. CBD facts Thanks a lot for your efforts. I never find such an article like this. I hope you will share more such works.
zaiyamariya · 15 weeks and 5 days ago
Linux terminal is a way of communicating with the most adaptable part of the operating system. Uncontested Divorce Mississauga
jonathantrott · 15 weeks ago
I think that keeping yourself in shape is very important. So, I have a website, where you can find a lot of information about that. For example, cbd oil dosage for anxiety
MarkMiller · 13 weeks and 4 days ago
It was specially made and understood. Not at all like extra web journals, I have inspected which are truly not outrageously unprecedented. I in like way discovered your Mumbai Escorts posts particularly fascinating sureness coming about to analyze. I expected to go show it to my mate and he relished its experience also!
poojasharma69 · 12 weeks and 1 day ago
Note that many programs spawn child processes, and by default strace does not follow those when you are tracing the parent. To cover that, you need to use '-f' to follow child processes also.
dmmst19 · 11 weeks and 5 days ago
great content! will recommend this site to my friends
looneyhans · 6 weeks and 1 day ago
Happy to see this post here. In this post, the author shares some details about the Linux terminal. You gave a detailed study of this topic, and easy to understand it. Keep sharing more information, and I am eagerly waiting for more updates. DC Law group contracts
ryanbabraham · 3 weeks and 3 days ago
doula san francisco How can I get more infos about apple products
yeoyeo · 3 weeks ago
great help! learned so much
looneyhans · 1 week and 4 days ago
wonderful article very helpful!
Killersmile · 1 week and 1 day ago
jennylee · 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: