LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 05-16-2006, 12:11 PM   #1
sancho1980
Member
 
Registered: May 2006
Location: Leipzig, Germany
Distribution: Kanotix 64
Posts: 45

Rep: Reputation: 15
Question grepping the script that starts the font server


hi

i'm trying to learn about linux with this book "hands on approach" and it comes with exercises one of which is "use grep to find out which script starts the font server in the graphical run level"

my idea was to do

grep -i /etc/rc5.d "font server" S*

as all these files are normally commented but that doesn't find anything

can any one help me?

thanx

martin
 
Old 05-16-2006, 12:37 PM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,745

Rep: Reputation: 71
You can try something like:
cat /etc/rc5.d/* | grep -i "font server"

Since /etc/rc5.d is a directory you need to include all files with *. cat will print all the files. | will pipe the output to grep. grep will display what it finds.

You can use the | with other commands too. Like ls /etc | grep fs.

Last edited by tangle; 05-16-2006 at 12:38 PM.
 
Old 05-16-2006, 12:46 PM   #3
sancho1980
Member
 
Registered: May 2006
Location: Leipzig, Germany
Distribution: Kanotix 64
Posts: 45

Original Poster
Rep: Reputation: 15
and if that still doesn't give me the result? does that mean the font server is not running? what's that font server, anyway?

i've read about pipes before but i'm still not very familiar with them; i find it a bit hard to understand the difference between arguments and standard input; maybe you can provide some clarity here...

thanx,

martin
 
Old 05-16-2006, 01:01 PM   #4
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,745

Rep: Reputation: 71
If you want to know if the font server is running type ps aux | grep font.
When I run that command I get this:
# xfs: Starts the X Font Server
# description: Starts and stops the X Font Server at boot time and shutdown. \

I do not have X installed on this machine. So the font server is not installed.

A pipe just pipes (sends) the output of a command to another command. Pretty much that simple. So the output of the cat command is sent to the grep command to check for and thing that says "font server".
 
Old 05-16-2006, 01:03 PM   #5
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,745

Rep: Reputation: 71
Forgot, I mostly use Slackware, but I believe all the startup commands are in the /etc/init.d directory. So try cat /etc/init.d/* | grep -i "font server".
 
  


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
wpasupplicant boot script starts to late cccc Linux - Networking 4 03-12-2006 07:08 PM
syslog starts script kirmet Linux - Security 1 11-02-2005 08:07 PM
question about grepping something Grafbak Programming 6 03-01-2005 02:28 PM
How to install Font Server in FedoraCore2--my font server failed covaigold Fedora 0 02-21-2005 01:42 AM
Fluxbox starts with no font ivanatora Linux - Software 1 12-08-2004 03:28 AM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration