Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9253825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:18:58+00:00 2026-06-18T11:18:58+00:00

As I asked in the title, I’m looking for a script/command to find the

  • 0

As I asked in the title, I’m looking for a script/command to find the correct directory (usually /etc/init.d or /etc/rc.d/init.d).
Right now I’m using

    dirname `find / -name acpid 2> /dev/null | grep /etc/`

but sometimes I get more than one result (probably some of the results are link) . Any suggestion?

I’m using acpid because it is a script that should be present in almost every distribution that is not prehistoric. If someone has a suggestion for a better script, let me know, thanks 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:18:59+00:00Added an answer on June 18, 2026 at 11:18 am

    I believe that your approach is quite good as the location of the startup scripts is distro-dependable. Simply add -type f option to exclude links from your results.

    INITDIR=`find / -type f -name acpid 2> /dev/null | grep /etc/`
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question is already been asked in title. Here is a code: (function($){ var filter
I asked a question , title of which might have been misleading so I'm
Please don't confuse with the title as it was already asked by someone but
I asked my friend if he can print from 1 to 1000 without using
I asked a separate question (now deleted) for what I thought the actual problem
Question is simple and asked in the title. C# 4.0 Specification says: (§4.2.2) The
Basically what I've asked in the title. How can I use the Ant symlink
I know that question with same title has been asked almost 6 month ago.
Apologies if this has been asked already, I can't find the answer in the
The question is pretty much what is asked in the title. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.