Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Unix command problem

Posted on 2012-03-19
8
Medium Priority
?
496 Views
Last Modified: 2012-03-25
following in UNIX operating system using the UNIX commands
Create three files with at least a paragraph of text. Print these three files using minimum number of UNIX commands.

Create a directory. Change its permission to Read only. Now try to copy a file in this directory. Record the outcome of the operation and explain it.(in unix)
0
Comment
Question by:xeroxzerox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 40

Expert Comment

by:omarfarid
ID: 37738752
Is this a homework?
0
 
LVL 6

Author Comment

by:xeroxzerox
ID: 37738785
if this is homework i'm not asking this question in here.
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 37738793
What commands you tried?
0
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 
LVL 6

Author Comment

by:xeroxzerox
ID: 37738813
If i know why i'm asking...
0
 
LVL 38

Assisted Solution

by:Gerwin Jansen, EE MVE
Gerwin Jansen, EE MVE earned 750 total points
ID: 37739422
Depending a bit on which UNIX version you have, printing through cups for example is just as simple as this:

lp <filename>

When printing more that one file, just create a basic loop like this:

for file in file1 file2 file3; do lp ${file}; done;

And for your directory question, create it using mkdir <directory>, set to read only by removing the write permissions using chmod -w <directory>, try copying a file to it using cp <file> <directory>/ - use your terminal output as a starter for explaining what is happening.

Pls. try and post your experiences and feedback :)
0
 
LVL 62

Assisted Solution

by:gheist
gheist earned 750 total points
ID: 37741481
echo * | xargs -n1 lp
0
 
LVL 6

Accepted Solution

by:
xeroxzerox earned 0 total points
ID: 37745810
Thanks for your support,
ans1: quep-c name' name project.txt
ans2: create directory
MK DIR
Syntax mkdir[options] directory name
0
 
LVL 6

Author Closing Comment

by:xeroxzerox
ID: 37762430
I have find right solution for this question.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question