Linux command for finding the system call [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I just start to learn Linux command, here comes a question: how do I find information about the system call 'open', rather than the executable program while using "man" command.

System calls are on normally found in man section 2
man -s 2 open

you can specify the section of the manual where you want the manpage to come from. By default system commands (section 1) come first, before system calls (section 2) or library routines (section 3), so
man 2 open
will do the work. Normally, when you see a reference to a man page you'll see a number in parenthesis attached to it (like open(2)) That number indicates the manual section you will find that thing in.
You can even test
man man
and you'll get a very good reference to how the online manual works.

Related

IS there any way to find what commands we have run in linux apart from history [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
IS there any way to find what commands we have run in linux server apart from history command
is there any log file where i can see what are commands i have run
unfortunately my ~/.bash_history is clear
On linux distributions and installations I encountered: no, it's not possible. Even .bash_history is storing only bash history (and some administrators can (and will) use other shell(s)) and has usually set a limit so sometimes gets truncated. You would have to write and configure such utility yourself.

Why do different environtments contain different command line options when calling man -ls? (environments: codecademy, cb.vu) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Why do different environments contain different command line options when calling man ls?
codecademy
cb.vu
Does it mean that I should just use man command with options before using the bash options for each new environment which I use?
There's nothing magical about ls - it's a program just like any other program. Specifically, one that' been around for a long time. as such, different environments may have slightly different versions or even different forks of it. It's usually safe to assume the common options (such as -l) would be available anywhere, but when in doubt - you should double check.

Linux commands, what do they mean? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am just getting started with Linux, could someone please explain these commands? (ls), (ls -l), (whoami), (pwd), (cal 2013) and (man cal). Thanks.
The only command you have to know, is "man". Type "man ls", and you'll get an answer about what "ls" does, and so on.
man is the very first command a Unix/Linux beginner needs to know. It means manual and gives access to the reference manual (or online help) of the command specified on the same line:
man cal
displays the manual of the cal command.
From there, you can type
man intro
to get a list with a short summary of all available commands.
Sometimes, instead of the manual of the command you requested, you'll get the manual of bash, which is the program that interprets all the commands you type. This means that your requested command is not a simple command like cal but a special command directly implemented in the bash itself. In that case, the description of your requested command is buried in the huge manual of bash.

Linux How to execute a command when a certain type of file is modified? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I would like to execute "lessc ~/less/app.less > ~/stylesheets/styles.css" everytime I modify a .less file on my machine. Is it possible ?
If you are looking for a generic approach, Linux kernel has a feature called inotify that monitors file system changes.
You will have to write a small program to make use of the interface. inotify has bindings for all major languages, including perl and python .
Take a look at incron, a crontab-like system for inotify. You can set up rules to trigger any commands you want, based on events in the filesystem.

How to detect which program will be run? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
Your system has 2 versions of the same utility installed, both which have the same filename.
How would you find out where the utility you would run by default is located?
If the utility's file name is "foo", type which foo
You'are looking for which command
which - shows the full path of (shell) commands.
Let's say you have perl installed in /usr/bin/perl and /usr/local/bin/perl and if the default path is the second one then
$ which perl
/usr/bin/local/perl
Check the $PATH.
echo $PATH
The first is started default.
or
which
Similar to which , whence gives you whence command from Korn Shell tells how a name would be interpreted by the shell: it detects commands and aliases, and searches your path.
whence {executable-you-are-looking-for}
and also in linux, just typing name & hitting tab will show list of available versions with which you can run.

Resources