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: 22 February 2017, 5:48 PM EST
Location: Saskatchewan
Posts: 21,928
Thanks: 1,050
Thanked 4,095 Times in 3,794 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 offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 23 February 2017, 3:22 AM EST
Location: San Jose, CA, USA
Posts: 10,010
Thanks: 484
Thanked 3,448 Times in 2,945 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-23-2016)
    #11  
Old Unix and Linux 11-23-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 07:58 AM
Accessing linux via telnet Krrishv IP Networking 4 12-23-2006 02:21 AM
Accessing UNIX Data over LINUX xohaib UNIX for Dummies Questions & Answers 2 03-25-2006 04:21 PM
Accessing FTP on Linux Breen Linux 4 07-01-2004 11:32 AM
Problem accessing network using Linux natter IP Networking 3 04-30-2003 03:18 PM



All times are GMT -4. The time now is 05:38 AM.