Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Complete Newb Help (quick)
nagstaku
post May 1 2005, 03:40 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 6
Joined: 1-May 05
Member No.: 4,947



ok, so i have very limited time to learn linux and what im considering a very poor book we are forced to use. The book, simply called "The Linux Book" by David Elboth doesn't seem to have a very definite structure, and the worst part is the chapter questions (which is what i have to answer) seem waaaaaay to open ended especially for a first time user/reader.


Now, the question being asked:

1. Use the ls command and wildcards to find out the following about your system:

a. How many filenames have exactly 14 characters?
b. Which filenames have exactly five characters?

thats the exact context. I question why they both start differently (does he actually want me to state all files with 5 characters on my entire system?), and why the second one spells out 5 (five). I have used linux minimally and from what i know the ls command isn't what i'd use to find this out.

anyways, thanks for the help
Go to the top of the page
 
+Quote Post
nagstaku
post May 1 2005, 03:46 PM
Post #2


Whats this Lie-nix Thing?
*

Group: Members
Posts: 6
Joined: 1-May 05
Member No.: 4,947



here are all the questions in case anyones wondering:

1. Use the ls command and wildcards to find out the following about your system:

a. How many filenames have exactly 14 characters?
b. Which filenames have exactly five characters?
c. Which filenames end with "sss"?
d. Which four-character filenames start with "d" and ends with "e"?
e. Which three-character filenames end with a character in the inerval "e-k"?
f. List all filenames ending with "?" (illegal).
g. List all filenames starting with "*" (illegal).

2. Can you make illegal filenames? How can you use these files later?

3. What are your file types?

4. How can you represent the files mentioned below with wildcards?

a. abc abd abe
b. rapp1 rapp2 rapp3
c. x1s xes
d. All files starting with the characters "s" or "d".

5. Print your entire text file to screen with and without control characters.

6. Make backups of all your system files.

7. Rename your backup files.

8. Try and remove a text file with the option -f.

9. Make several names (links) for your backup files.
Go to the top of the page
 
+Quote Post
michaelk
post May 2 2005, 03:03 PM
Post #3


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



I would say that most forums have a policy not to provide answers to tests or homework.

The ls command will display any file that matches a pattern and a pattern can be any specific number of characters including wildcards.
Go to the top of the page
 
+Quote Post
nagstaku
post May 2 2005, 07:50 PM
Post #4


Whats this Lie-nix Thing?
*

Group: Members
Posts: 6
Joined: 1-May 05
Member No.: 4,947



the question is though whether i can get the ls command to do what i would normally use the find command to do. which is one reason i question the book
Go to the top of the page
 
+Quote Post
DS2K3
post May 3 2005, 12:43 PM
Post #5


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,284
Joined: 14-November 04
From: Southampton, Hampshire
Member No.: 4,165



There is doing homework, then tehre is providinh help with ls. This definately comes under help with ls. Afteall, you elarn more from doing homeowrk with help than simply struggling on to no avail.

ls -R does a recursive list, so

cd /
ls -R

will list all the files on your system (providing you are root, otherwise you will only get files from directories you have permission to enter).

Combining that with wildacards etc. should do what you want.

D


--------------------
Fixed your problem? Let us know!
richard@linuxhelp.net

www.Gathr.co.uk Online Event Management
Go to the top of the page
 
+Quote Post
michaelk
post May 3 2005, 04:12 PM
Post #6


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



This will provide the answers to most of the ls questions.
http://www.geocities.com/tipsforlinux/arti...icles/26-1.html

I thought I knew the answer to the first 2 questions but after trying it in different directories I would agree that ls alone can not.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th October 2017 - 10:30 PM