LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-07-2005, 07:00 AM   #1
zameer_india
Member
 
Registered: Sep 2004
Location: hyderabad
Posts: 210

Rep: Reputation: 30
want full description of "echo num > / path/...."


Hi All......


could any body explain me what happens with the following commands ......

echo 0 > / proc/xxxx
echo 1 > / proc/yyyy
echo 2 > / proc/zzzz
echo 3 > / proc/aaaa


form the above four lines i understood that

"echo" is for " Display Purpose/OP"
0,1,2,3.... is this are IRQ Numbers ?
what is the function of " > "?

I think it is silly one for U ... not for me.... any help would be appreciate....

thnx in Advance...

zameer ahmed syed
 
Old 01-07-2005, 07:09 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Re: want full description of "echo num > / path/...."

Quote:
Originally posted by zameer_india
Hi All......


could any body explain me what happens with the following commands ......

echo 0 > / proc/xxxx
echo 1 > / proc/yyyy
echo 2 > / proc/zzzz
echo 3 > / proc/aaaa


form the above four lines i understood that

"echo" is for " Display Purpose/OP"
0,1,2,3.... is this are IRQ Numbers ?
what is the function of " > "?

I think it is silly one for U ... not for me.... any help would be appreciate....

thnx in Advance...

zameer ahmed syed
echoing can be used for a lot of things, but basically what the above is doing:

echo 1 > /proc/whatever
Is sending the 1 to that file, to replace anything in it. Usually 1's turn things on, 0 turns them off.

The > is the thing to note.
If you were to:
echo 1 /proc/whatever
You'd get a 1 on your screen followed probably by a command not found or something similar, and the 1 would not be sent to /proc/whatever. The > tells echo not to send it to stdout (the terminal in this case) but rather to a file.

HTH

Cool
 
Old 01-07-2005, 07:54 AM   #3
zameer_india
Member
 
Registered: Sep 2004
Location: hyderabad
Posts: 210

Original Poster
Rep: Reputation: 30
Thanx MasterC for Ur kind and Descriptive Reply..
Well and Understandable Explanation... but one thing i am not understand about numbers ....
If I used 1 , 0 , 2 ,l... i got the same result..... i am not able to differentiate between these numbers..... U said that 1 is for turned ON...
0 is for turned OFF...
I used 0,1and even 2 also ..... didn't get any errors...same result for all..... little bit hanging here that what is turn ON and turn OFF... and about these numbers..
i am requesting U some more explantion about this issue.....

thnx ...
zameer ahmed syed
 
Old 01-08-2005, 03:45 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
The numbers are dependant upon whatever process you are applying them to. My suggestion of 1's being 'on' and 0's being 'off' might not always hold true, you'd be best off researching the process you are wanting to apply the numbers to. The number could also be for how many processes to start, or how many subdirectories to recurse...

Cool
 
Old 01-08-2005, 04:04 AM   #5
zameer_india
Member
 
Registered: Sep 2004
Location: hyderabad
Posts: 210

Original Poster
Rep: Reputation: 30
thanx MasterC...... U done a gr8 help for me....
 
Old 01-08-2005, 04:10 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
No problem, glad I could help.

Cool
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[LaTeX] Length of spaces in "Description" Cornholio Linux - Software 1 05-05-2005 03:57 PM
Cedega from Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Software 0 03-30-2005 12:24 PM
Cedega and Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Games 0 03-26-2005 03:48 AM
"Invalid hdlist description" Mandrake 10.1 zeroz52 Mandriva 2 02-26-2005 10:43 AM
"echo $path" acj Linux - Newbie 8 02-04-2005 06:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:39 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