Unix/Linux Go Back    


Programming Post questions about C, C++, Java, SQL, and other programming languages here.

Accessing directories in Linux

Programming


Tags
cp, solved

Reply    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 11-16-2016
pinbot pinbot is offline
Registered User
 
Join Date: Nov 2016
Last Activity: 2 December 2016, 10:59 PM EST
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
If your referring to this
Quote:
By the way, if this is the sort of C++ program that's line after line of system(), it'd probably be more easily "ported" to shell script.
It's a c++ program with roughly 300 lines of code and only
one system() call
Sponsored Links
    #9  
Old Unix and Linux 11-22-2016
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 30 April 2017, 11:10 PM EDT
Location: Saskatchewan
Posts: 22,099
Thanks: 1,075
Thanked 4,159 Times in 3,849 Posts
Okay then.
Sponsored Links
    #10  
Old Unix and Linux 11-22-2016
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is online now Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 1 May 2017, 1:53 AM EDT
Location: San Jose, CA, USA
Posts: 10,225
Thanks: 514
Thanked 3,550 Times in 3,023 Posts
Quote:
Originally Posted by pinbot View Post
... ... ...

seems the best I can do is cp file ../ and move up one directory. I may have to rearrange my directory structure to get this to work in linux. Thanks for all your suggestions
If cp file ../ (or cp file ..) works to move the file up one level, then cp file ../.. will work to move it up two levels (with obvious exceptions for being too high in the filesystem hierarchy and symlinks).
The Following User Says Thank You to Don Cragun For This Useful Post:
pinbot (11-22-2016)
    #11  
Old Unix and Linux 11-22-2016
pinbot pinbot is offline
Registered User
 
Join Date: Nov 2016
Last Activity: 2 December 2016, 10:59 PM EST
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Don Cragun
If cp file ../ (or cp file ..) works to move the file up one level, then cp file ../.. will work to move it up two levels (with obvious exceptions for being too high in the filesystem hierarchy and symlinks).
And you sir have nailed it and the answer was so simple, thank
you very much Don.
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Accessing multiple directories in loop rohit_shinez Shell Programming and Scripting 5 09-08-2014 06:58 AM
Accessing linux via telnet Krrishv IP Networking 4 12-23-2006 01:21 AM
Accessing UNIX Data over LINUX xohaib UNIX for Dummies Questions & Answers 2 03-25-2006 03:21 PM
Accessing FTP on Linux Breen Linux 4 07-01-2004 10:32 AM
Problem accessing network using Linux natter IP Networking 3 04-30-2003 02:18 PM



All times are GMT -4. The time now is 02:13 AM.