You are here:

Computer Science/Some Linux/CPP stuff

Advertisement


Question
when i go to ssh secure shell client and login with my pass and type these commands
$cp /pub/cis/wbeaver/availcredit01.cpp
and i press enter
then
$ ls enter
$ script avilcredit01.lst enter
$ cat availcredit01.cpp enter
$ aCC -AA availcredit01/cpp -o availcredit01 enter
$ availcredit01 enter
$ exit
$lp -diclpr2 availcredit01.lst enter
$ exit enter
when i type the cat command it says it cant open availcreditcredit01.cpp no such file or directory
what is the problem? did i type something wrong? what do i need to do?

Answer
Raymond:

It is because of two possible reasons:

1. YOur current working directory is not the same when you did the CP command.

When you typed the "ls -al" command (Assuming you are in Unix/Linux) you should see the "availcredit01.cpp file.  If not then it did not copy over.

You also have some other typo errors:

$ script avilcredit01.lst enter

then you $lp -diclpr2 availcredit01.lst enter

I think it should be avilcredit01.lst, right?

Here is what I recommend:

1. $ pwd
(find out where current working directory is)

2. $ cp /pub/cis/wbeaver/availcredit01.cpp   /xxx/xxx/xxx/xxxx  where x is the absolute pathname to your current working directory. This way you are sure to copy it to the right spot.

3. (in current working directory): $ ls -al availcredit01.cpp
YOu should see the file and the permissions on file.
4. $ chmod 777 availcredit01.cpp (Opens up permissions on file).
5. $ cat availcredit01.cpp|more
Will show you file, but in page format to make it readable.

Then try your other commands ALWAYS check your working directory and permissions!
> pwd  and use of ls -al command.

Kind Regards,
Jeff

Computer Science

All Answers


Answers by Expert:


Ask Experts

Volunteer


Jeff Laatsch

Expertise

I can answer programming questions related to: C, C++, PHP, PERL, VB, SQL, ASP, JAVA, JS, XHTML, XML, CSS, PL/SQL, AWK, SED, VI Editor and if I don`t know the answer I have 20+ years systems experience as my resource. I can handle general questions in most areas of computer science including systems integration, API, networking related issues.

Experience

An accomplished WEB Master/Developer, Programmer Analyst, Systems Administrator with 12+ years of industry background in full system management and technical hardware/software support expertise including SUN, HP-UX, AIX, LINUX, and Windows NT,Win2000, 2003 with Active Directory: Well rounded in software engineering principles, requirements gathering, analyst, definition, system architectural design, OOA, OOD, UML, SEI-CMM and SDLC: Knowledgeable in Data Warehouse, Data Mart technologies, and experienced working with ORACLE databases utilizing ERP, SQL, PHP, PERL, C, C++, PL/SQL,SQL, JAVA, VB.NET, SOAP and other Dynamic WEB technologies: Analytical thinker and problem solver: Goal oriented professional who has a Masters in Computer Systems with emphasis in computer programming (C++ and Application Development).

Education/Credentials
City University, WA 12/03
Master of Science in Computer Systems
with Emphasis in Computer programming (C++/App Development)
Chapman University, WA 6/01
Bachelor of Science in Computer Information Systems
Emphasis in Computer networks and security

20+ years of experience in the Computer Science Industry

Awards and Honors
7/96,9/96,10/96,1/97,2/98,6/99,10/01,7/02,01/03,
Outstanding Achievement & Special Recognition

©2012 About.com, a part of The New York Times Company. All rights reserved.