Solved

Unix command problem

Posted on 2012-03-19
8
488 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
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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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 250 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 250 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

790 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