LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-03-2016, 05:45 AM   #1
sanjayagnani
LQ Newbie
 
Registered: Apr 2016
Posts: 2

Rep: Reputation: Disabled
Run history command under strace


Need to know which sytem call being made for history command .

need to do (strace history)
 
Old 04-03-2016, 06:01 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
And ???.
 
Old 04-03-2016, 06:10 AM   #3
sanjayagnani
LQ Newbie
 
Registered: Apr 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hey Basically i need to know which system calls are used when an history command is executed


Example : If i use "strace ping" in terminal i get the system calls used in ping command , similarly need to run "strace history"
 
Old 04-03-2016, 06:50 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Sounds like the wrong tool for the job.
I smell an XYZ Problem.
 
Old 04-03-2016, 08:22 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
history is built into the shell.

And it uses the read system call (and seek). For details look at the bash shell source.

Much easier than trying to reverse engineer what is going on.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How do you strace the GSSAPI module when run through LDAP? peridian Linux - Software 1 03-02-2015 08:34 AM
Why does BASH history command have no history when run in script ? lump_of_lard Programming 4 01-30-2015 09:45 AM
how to run strace on SuSE 10 sunilvadranapu SUSE / openSUSE 3 11-03-2008 03:44 PM
Where does KDE's run command save history? ljubak Linux - Desktop 1 08-28-2006 04:21 PM
KDE : Run Command -history denzo74 Linux - General 1 10-19-2005 12:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 02:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration