Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Here I got some UNIX problem..Hope you can help..
1)Write a UNIX command to concatenate the contents of all files in your present directory and to put them
into a new file named 'all.txt'2)Which command is used to remove a link of a file?
3)(i) Write a single command line to search for the files with the name "mymemo" from the current directory
onwards and to print the current pathname of all files found.List down the keystroke for
1) search for the specified pattern in the forward direction.If the end of the file is reached, the search wraps
around.2) search for the specified pattern in the backward direction.If the top of the file is reached, the search wraps
around.

I already go through and try out most of
the question....but the question above
I flip through whole of my book...but still
cannot find out the command the suit for it
...Hope somebody can provide me some idea...
I really eager want to know the answer....
really thanks:)

OK:
I'll do the first one. This command places all the files with a txt extension, places it in a file, and the 'xargs cat' does the content thing. Change as you see fit.
ls *.txt > file
xargs cat < file > all.txtOh, and a hint for 3) man find
Regards,
Nails

I was going to suggest
cat *.* > all.txt
though the more different approaches you try out the better.The last two sound like vi questions.

I go to flip through another book
online....I think this book is really
explaining good in concept and well written and I find the answer...Am I correct?2)rm
3)(i) find . -print1)/
2)?

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |