LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-27-2013, 02:49 PM   #1
djdjdjole
LQ Newbie
 
Registered: Oct 2012
Posts: 15

Rep: Reputation: Disabled
strange bash command


Hello

Those are three lines, that I saw at site related to RPi. Still, I consider this forum to be the right one for placing my question.

root@raspberrypi:~# modprobe i2c-dev
root@raspberrypi:~# modprobe rtc-pcf8563
root@raspberrypi:~# echo pcf8563 0x51 > /sys/class/i2c-adapter/i2c-0/new_device

I want to ask someone to explain me the meaning of third line ie. what does it do ?
The matter is related to RTC chip (pcf8563), which has I2C bus and the (software) way of accessing it.

Regards
 
Old 01-27-2013, 03:14 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Philly, PA
Distribution: Kubuntu x64, RHEL, Fedora Core, FreeBSD, Windows x64
Posts: 1,457
Blog Entries: 35

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
/sys/class/i2c-adapter/i2c-0/new_device will Instantiate a new device from user-space. File new_device takes 2 parameters: the name of the I2C device (a string) and the address of the I2C device (a number, typically expressed in hexadecimal starting with 0x, but can also be expressed in decimal.) Read more (docs)

Source 1
pcf8563 likely refers to "Real-time clock/calendar".

Hope that helps. I found it by downloading the kernel source code and then finding keywords using "grep -irl".

SAM
 
1 members found this post helpful.
Old 01-28-2013, 01:29 AM   #3
djdjdjole
LQ Newbie
 
Registered: Oct 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Thank you Sag47 for your effort and quick unswer - I'm going to read docs you proposed. Hope I'll comprehend.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does this work from the bash command line and then fails in a bash script? Rupadhya Linux - Newbie 5 09-26-2012 12:05 AM
bash strange subshell command result fenor Programming 12 11-26-2009 07:35 AM
[SOLVED] Using a long Bash command including single quotes and pipes in a Bash script antcore Linux - General 9 07-22-2009 11:10 AM
Strange output when ssh - bash: ... command not found Azazwa Linux - Newbie 3 05-11-2009 09:23 AM
Strange if statement behaviour when using bash/bash script freeindy Programming 7 08-04-2008 06:00 AM


All times are GMT -5. The time now is 02:59 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration