Ask Dave Taylor
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube
  • Home
  • YouTube Videos
  • Top Categories
  • Subscribe via Email
  • Ask A Question
  • Meet Dave

How do Unix / Linux “hard links” work?

August 23, 2004 / Dave Taylor / Linux Help / 3 Comments

A reader writes:

So, I’m partway through your book, and I want to check on hard links. When you say it creates another door to the same body of data, is that literally true? For example, if all I have in my ./Documents directory is 001.doc (size 512K), and I hard link as hardlink.doc then run ls, do I see A or B?

A) 001.doc 512K
hardlink.doc 512K
total 1024K

B) 001.doc 512K
hardlink.doc 512K
total 512K

If it’s not B, I’m not sure what the point is, other than maybe not changing the timestamp.

View Answer »

Extracting the correct column with “ps” and “awk”

August 16, 2004 / Dave Taylor / Linux Shell Script Programming / 4 Comments

A reader writes:

Every *nix implementation is different. But I’m seeing some some shared behavior between HPUX and Solaris with script #52 Killing Processes by Name. The problem is that the script is trying to kill the “tty” name, instead of the pid.

Wish I understood the following line better so I could make it grab the right columns. :-\

pids=$(ps cu -U $user | awk “/ $1$/ { print \$2 }”)

View Answer »

Extracting Directory Names within a Shell Script

August 11, 2004 / Dave Taylor / Linux Shell Script Programming / 3 Comments

A reader writes:

First, thanks for writing Wicked Cool Shell Scripts. I’ve found them quite useful and I’ve learned many things from those scripts.
I just have a question and I was wondering if you could point me in the right direction.

I’m trying to write a shell script that will pull the top-level directories out of a list of file paths, example:

list of files:
/usr/local/test
/usr/bin/test
/opt/Tivoli/dat
/opt/lib/test
/tmp/files/test
/tmp/local/test

Output after script:
/usr
/opt
/tmp

View Answer »

What’s Acceptable Search Engine “Spam” Technique?

August 10, 2004 / Dave Taylor / SEO & Marketing / 1 Comment

After hearing a lot about it, I went over to SitePoint and read an interesting article by a “search engine optimization expert” wherein he enumerates his list of fifteen of the most egregious techniques by which companies and individuals “spam” the search engines. What’s search engine spam, you ask? It’s using inappropriate and deceitful methods of manipulating the HTML or other elements of a site to generate a higher ranking than the site would otherwise be granted by a typical search engine relevance calculation.

View Answer »

Another approach to working with “awk”

August 6, 2004 / Dave Taylor / Linux Shell Script Programming / No Comments

A reader writes in with the following note:

I’ve just picked up your book Wicked Cool Shell Scripts, and there are a lot of nifty things in
it. I too have accumulated a lot of things generally in small scripts
or more frequently in bourne/bash functions. I was particularly tickled
to see a lot of very similar code, one such that jumped out at me was
your gmk function in one script (I called mine kmg).

Would you be interested in some constructive criticism?

In script #52 Killing Processes by Name, I think that instead of:

  awk “/ $1$/{ print \$2 }”
you might consider using

  awk “$NF==”$1″ { print \$2 }”

That way, you’re not dependent on whitespace.

View Answer »

Where’s this NotePad application?

July 29, 2004 / Dave Taylor / Windows PC Help / 5 Comments

A reader sent me the following question:

“I recently purchased your book Creating Cool Websites with html, xhtml, and css. When I arrived to chapter 2 and you said to go to note pad, I followed your instuctions and I couldn’t find it. So I went to run and typed in notepad and BAM! it pulled up.

You say to save it to your desktop, if I do that will the program always run from there? Should I seek out a tech to move the program to where you said I should of found it. “

View Answer »

How to use Apache htaccess to password protect a directory

July 28, 2004 / Dave Taylor / HTML & Web Page Design / 1 Comment

In a rather lengthy email message, a reader writes to me that:

I am following your book Creating Cool Web Sites with HTML, XHTML and CSS and am trying to protect a subdirectory on my website. The following is the .htaccess code

AuthUserFile /www.bvg.us/uswholesale/uspasswords/passwords.txt
AuthGroupFile /dev/null
AuthName "Please enter your login name and password"
AuthType Basic
<Limit GET>
require user weiyang
require user annawei
</Limit>

The “passwords.txt” reads

user weiyang:wy
user annawei:aw

By doing so, I can get the “log in” box but can not login with the info that I set. Could you help me on this?

View Answer »

Permission to reuse the Wicked Cool scripts

July 15, 2004 / Dave Taylor / Linux Shell Script Programming / No Comments

I have received a number of queries from people in the Unix/Linux community asking for the details of ownership and copyright for the scripts included in my best-selling Wicked Cool Shell Scripts. When I first started programming and distributing my works online (in the early 1980’s) no-one really worried about any of that and if the original author’s name stayed intact, we’d think that was a wonderful thing.

View Answer »

«‹788789790791792›»

Search

Recent Posts

  • How to Use Twitter Reply-to-DM Features and New Reaction Emoji
  • Find and Play Minesweeper, Solitaire and more in Win11
  • How Do I Copy Audiobooks from my Mac to my iPhone?
  • Create a Google Image Search Box for Photos of the Coronation?
  • Does the Android WiFi “Settings” Show Network Speed?

On My YouTube Channel

BlendJet 2 Portable Blender & Orbiter Drinking Lid -- DEMO & REVIEW

EKSATelecom H16 Pro Wireless Bluetooth Headset -- DEMO & REVIEW

Categories

  • AdSense, AdWords, and PPC Help (106)
  • Amazon, eBay, and Online Shopping Help (166)
  • Android Help (234)
  • Apple iPad Help (150)
  • Apple Watch Help (53)
  • Articles, Tutorials, and Reviews (346)
  • Auto Tech Help (19)
  • Business Advice (200)
  • ChromeOS Help (37)
  • Computer & Internet Basics (788)
  • d) None of the Above (166)
  • Facebook Help (384)
  • Google, Chrome & Gmail Help (190)
  • HTML & Web Page Design (248)
  • Instagram Help (49)
  • iPhone & iOS Help (630)
  • iPod & MP3 Player Help (173)
  • Kindle & Nook Help (100)
  • LinkedIn Help (90)
  • Linux Help (178)
  • Linux Shell Script Programming (90)
  • Mac & MacOS Help (918)
  • Most Popular (16)
  • Outlook & Office 365 Help (35)
  • PayPal Help (68)
  • Pinterest Help (54)
  • Reddit Help (20)
  • SEO & Marketing (82)
  • Spam, Scams & Security (98)
  • Trade Show News & Updates (23)
  • Twitter Help (224)
  • Video Game Tips (66)
  • Web Site Traffic Tips (62)
  • Windows PC Help (962)
  • Wordpress Help (206)
  • Writing and Publishing (72)
  • YouTube Help (47)
  • YouTube Video Reviews (159)
  • Zoom, Skype & Video Chat Help (64)

Archives

Social Networks…

Ask Dave Taylor

Follow Me on Pinterest
Follow me on Twitter
Follow me on LinkedIn
Follow me on Instagram


AskDaveTaylor on Facebook

microsoft insider mvp


This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to our terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. Our lawyer says "Thanks for your cooperation."
© 2023 by Dave Taylor. "Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.
Privacy Policy - Terms and Conditions - Accessibility Policy