Linux API to get info about filesystem [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am looking for a linux api that returns me information about root filesystem.
I can use command stat -f / to get information about root filesystem. Is there any API that returns exactly same information as returned by "stat -f" command ?

statvfs, link goes to a manpage.

Next time when you need to know API than does the same thing like a shell command you can use strace. Like this: strace stat -f / and see what calls do command. On my system it calls statfs64.

Related

How to add android studio into rofi menu in i3wm? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have searched everywhere, from the documentation of the rofi to add the menu item. But I cant do that. Please help me.
One of the easiest method is to create a shell script and add it to /bin.
For example create a file named android.sh with these couple of lines.
#!/bin/bash
sh ~/android-studio/bin/studio.sh
Then search using rofi you should be able to see the listing. Don't forget to make it executible by typing chmod +x android.sh.

Where can I find a simple MON .monitor script to monitor if a process is running on Debian? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I installed MON on my Debian box and I am trying to find additional .monitor script examples on the web without success so far.
What I'd like to achieve is a monitor script that will simply check if a process is still active.
Can anyone guide me into the right direction?
Thanks
You can write your own in this direction
ps -ef | grep <processName>

Shell time command source code? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Where can I find the time bash utility source code? Is there a website that allows to search for this code?
The time command is from the GNU project, so all of the source code is available there.
Specifically, you are probably looking for this: http://ftpmirror.gnu.org/time/
The time command in Bash is built-in, so it should be found in the GNU Bash source code.

Log Parser for linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Log Parser is great tool for parsing log files. I can parse not just IIS log files but also custom log files with it.
For example I can use SQL syntax to parse logs:
C:\>LogParser "SELECT TimeGenerated, SourceName,
EventCategoryName, Message INTO report.txt FROM Security WHERE
EventID = 528 AND SID LIKE '%TESTUSER%'" -resolveSIDs:ON
Is there any tool like that for linux?
Thanks.
lnav supports SQL queries and supports most of the common Linux log formats. Look at the project's website and documentation page for more details and screenshots.
Maybe you'll take a look at multitail?
When it comes to text based logs grep is your friend—it can do pretty much the same what SQL-like syntax in your example.
have you tired tail command ?
tail -f /path/to/log/file/log
if you prefer a log viewer with GUI, Have a look at
Gnome Log Viewer

monitoring file and directory access on linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
Do you know of any linux program, that would monitor accesses to directories and files in the filesystem? I would like to able to produce some report of how many times certain files were accessed in some period?
You probably want inotify-tools. Inotify is part of the linux kernal that triggers events on watched files, directories, or even the contents of entire directories. These tools are command line utilities that tap into the capabilities of inotify and allow you to use them, for example, in your shell scripts.
Specifically, you will probably want to look at inotifywatch

Resources