Programming :: Moving File Using C++?

Nov 24, 2010

i want to move a file. User will give (file_name,current_path,destination_path)as command

View 2 Replies


ADVERTISEMENT

Programming :: Bash - Recursive Find - Create Parent Folder - Moving File

Dec 5, 2010

I'm starting bash shell script and I'm looping without any solution.

I'm trying to find some files under a folder hierarchy and in case of errors moving these files to a destination folder under the same hierarchy recreating this hierarchy if not exists.

Finding all ._* files under /src and moving them to /dest recreating folder1 or the others which contains ._* files but without moving files which does not correspond to the pattern.

Code:

I tried find command and I'am getting all needed files

Code:

But I don't know how to use the output to get the parent folder of files which are found to

1- create folder with mkdir -p /dest/folder1 or /dest/folder1/folder4

2- move found files from /src/... to /dest/... with rm command

I'm working on a find command as this trying to do all in the same line but ... little lost

Code:

View 8 Replies View Related

Programming :: WM-hints And Moving Window?

Sep 7, 2010

I have a toplevel window that I want to place depending on another toplevel window. I use gtk_window_move(widget, x, y); At startup this function is called several times and y is changed ones from 412 to 413 and x is always 0(checked with gdb in netbeans). The window gets placed at x=10 and y=400 or so. If I do not use variables but pure ints for x and y it gets placed correctly even if its the same values. I suspect that my window manager notice this change of y and place the widget for me. Is this correct and how do I tell the WM not to do so?

This change of y is due to window size is just a local size and not the correct one as in X. Can i force uppdates from X to the local cache?

View 3 Replies View Related

Programming :: Moving Files Up A Directory Layer?

Jan 3, 2011

find . -type f -name "*" -print0 | xargs -0 --replace=% mv % `pwd`

works fine at moving all files anywhere below the current directory to the current directory.

My question is can it be modified so it only moves all the files up one directory layer? Otherwise I shall have to cd 100 or so times and run it in each directory i want to compress...

I imagine the directory below which the file is stored is in the % somewhere it is just a case of extracting it and applying it to the mv command, yes?

View 8 Replies View Related

General :: Moving From One File To Another?

Mar 12, 2011

I'm told to go to /home/jbander/Downloads, so how do I do that, I assume you do it in terminal but what do you do next, I can get to home but thats it. How do I go from one directory or file or whatever they are, to another and once I'm there what do I do to see what is in the download file. One more question if I want to change it from e.g. cow to e.g. duck how would I do that(they are just arbitrary names) how do I get rid of cow and how do I put duck in it's place.

View 4 Replies View Related

General :: Vim: Moving Around In The File?

Apr 3, 2011

In vim, how do I go to a given line? In particular, how do I go to the top of the file or to the bottom? And when searching, how do I unhighlight the found words

View 3 Replies View Related

Security :: Moving A File With No Acl?

Apr 26, 2011

I'd like to know if the mv command is supposed to apply the default acl of the destination directory to the moved file?

I'm on RHEL5, and when moving a file with no acl, to a directory with a default acl, the acl is not being applied.

Note: cp does apply the acl as expected.

View 7 Replies View Related

Programming :: [HTML/CSS/Javascript] Moving Background Image?

Jun 10, 2011

I am trying to set up a webpager that contains a background of the skylouds uperimposedin the center will be an image of an airplane with a transparent background.I want the sky to scroll continuously to the left behind the airplane. I am having problems with the background not being visible, not moving as expected, the airplane not being visible, and just disappointment in general.I think the background of a div will not be visible if there are no internal contents because it will be sized to zero. So I introduced another transparent image to force the size of the main div. Still no joy.Here is my code. Note that I don't have my timers set up yet, just a button to test background movement.

Code:
<!DOCTYPE html>
<html>

[code]...

View 2 Replies View Related

Programming :: Bash Time Comparison Within A Fast Moving Log?

Jun 1, 2010

I have a bash script that is tracking ERROR connections (running in a cron every 15 minutes), sometimes the errors are true and are not connecting. But most of the time, the disconnects/reconnects are between 30 seconds are sending out false positives. I am looking for a time comparison code to pick out the 30 second disconnects and know that this is and "ok" error. Here is a section of the log with timestamps, errors, etc.

Tue 2010-06-01 22:01:30 ERROR [DataBufferSendService] 172.31.0.1:8016 caught exception: [NetworkAPI] Exception: [SocketStream] socket error
Tue 2010-06-01 22:01:32 ERROR [DataBufferSendService] 172.31.0.2:8016 caught exception: [NetworkAPI] Exception: [SocketStream] socket error
Tue 2010-06-01 22:02:00 INFO [Client] 172.31.0.1:8016 connecting to 172.31.0.1 on port 8016
Tue 2010-06-01 22:02:02 INFO [Client] 172.31.0.2:8016 connecting to 172.31.0.2 on port 8016

View 8 Replies View Related

Programming :: Moving Forward In Career (software Developer)?

Jan 5, 2010

Edit: Oops. Sorry if this is in the wrong forum. I meant to post it in the general forums, yet somehow it ended up here. It kind of fits here as well I guess. I am currently trying to move my career forward and am not having much luck. So I've come to see if any of you can offer some fresh advice to help me out.

Let me tell you first where I stand in my career to give you an idea of where I'm starting from. I am currently 26 years old and have recently graduated with a bachelors of computer science from university. I would call myself an average student, nothing special, nor anything horrible. Out of university this landed me an ok job as a PHP developer. However I dont want to stagnate in this position scripting junk all day and not ever challenge myself. not to mention i could certainly rant for a while on the things that fall short at my current position (read: being banned from object oriented programming because the boss cant understand it)

I'd like to find a job that (1) challenges me just the right amount to help me learn and grow but not get overwhelmed in a language I enjoy (hopefully such as C/C++/Java or the like)

(2) is at a company with at least some software design process implemented (agile,xp,etc)and if that is to much to ask, then I'd at least like to move in that direction. So that is what I am looking towards and I would love any advice on how to achieve that. Maybe some of you were in my position 5 or 10 years ago and could shed some light on the subject. I've scoured the internet for job postings that offer what I am looking for, but they are really hard to find. The postings are usually looking for senior or intermediate level programmers with at least 5+ years of experience, or looking for web development script monkeys to make "The next big facebook app" (the job I already have)

I've also considered attending conferences and such, but have never really been, and wouldn't know what to do, or where to even find out about them (I used to see postings every now and then at university, but now I live in a small town.)

View 2 Replies View Related

Fedora :: File Vanished When Moving?

Apr 28, 2011

I had need of putting a file in one of the directories of the $PATH.The echo $PATH is/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/Majara/binI did in the terminal:mv file /home/Majara/binI have learned now that /home/Majara/bin isot a directory, but the file is not anywhere

View 2 Replies View Related

Ubuntu :: Moving A File Between Partitions?

Apr 19, 2011

My temp file is currently located int the root partition which is a a relatively small partition. As it is, if my root partition id more than half full I am unable to make a backup of the whole system. I would like to move that folder into the home partition and maybe even make it a hidden folder. Since a lot of apps depend on the other folders within the temp folder - what I am wondering about is whether I can just move the folder or if I need to be concerned that those apps will not be able to find the folder then. Would I end up needing to go into every app that uses it and change settings? Is there things within the o/s that use it that I would need to reconfigure or something?

Ubuntu 11.04 with the Unity Desktop on a HP ze2000

View 7 Replies View Related

Programming :: Moving Files To Directories Based On Part Of Filename?

Jul 6, 2010

I have a single directory of pairs of files, with the pairs sharing a string as the beginning of the filename:

SF1-27F1492R-clone01_T3_A18_001.ab1
SF1-27F1492R-clone01_T7_A20_002.ab1
SF1-27F1492R-clone02_T3_A19_003.ab1
SF1-27F1492R-clone02_T7_A21_004.ab1
...etc

I need to create a subdirectory for each pair then move the pair into the subdirectory.

I accomplished the first step using:

$find /foo -name '*T3*' -exec mkdir '{}.wrk' ;

I can use a regex to designate the pair and associate the directory, but how do I use regex in a path as the output of a move command?

View 7 Replies View Related

Fedora :: Moving Cursur Its Moving But When Clcking On Touch Pad To Open Anything Its Not Opening?

Sep 13, 2009

I have installed fedora 11, now i want to install touch driver for my dell 15 laptop. when i m moving cursur its moving but when i m clcking on touch pad to open anything its not opening, to open i have 2 select any file then i have to click touchpad keys.

View 2 Replies View Related

General :: Changelog For File When Moving To A Different Repository?

Jul 16, 2010

I am versioning my config files with git. Now I need to move some of my config files to a different repository, to achieve a clean structure. Is there a way I can keep the change log for a file if I move it to a different repository? I would like to have all commits of repo A in repo B that touched file A/a if I move it to B/a. Ideally, if I afterwards move A/x to B/x, I would want to see B/a and B/x appear together in commits that touched both files in repository A. I would not expect to have any development step of A/a merged into any of the commits of B, I just want them to appear there afterwards.

View 2 Replies View Related

Ubuntu :: File Moving Permissions In 7.04 Live?

Jan 4, 2010

I'm using Ubuntu 7.04 on a live boot right now so I can move from files from a hard drive on a computer that won't boot. This is my work computer, which contains about three years worth of accounting and inventory information that I absolutely must recover from the drive. The computer runs one SATA drive, and has no ports for additional drives. Otherwise I have two USB drives connected and an IDE connected through a USB adapter. (The SATA drive will not work through the adapter for some reason). I have absolutely no access to another computer with SATA support.

All the drives mount on 7.04, and I can view the files on the SATA drive - which leads me to believe the drive isn't completely dead. So i'm hoping to move the files I need over to one of the USB drives.

However, i'm getting flags when I move files. -Without- installing Linux, is there a way for me to grant myself permissions to move/copy/delete files on my hard drives? Otherwise, is there a simple way (that won't compromise the data on the drive) for me to re-do the partitions the SATA drive so I can install linux?

View 9 Replies View Related

Programming :: Bash Script For Moving X Number Files From / Direct1 To / Direct2?

Jan 29, 2010

I have no Bash skills but Im badly in need of a script to move the first 20,000 or whatever number of files from a directory containing over 200,000 files to a new directory. The problem is that I cant access the directory because its so large so I want to break it into chunks, but keep the files in order if possible. If you know of a script to meet my needs, please post it. Otherwise Ill post my fumblings with Bash until I find the right way to fix my problem.

View 14 Replies View Related

Ubuntu :: Moving Buttons To Left - Keep Moving Back

Mar 27, 2011

I like the buttons on the left. I'm running 10.04 & I know how to move them. The problem is that changing themes will move them back right. OK, if the new theme has them on the right that's OK. But going back to the other theme doesn't change them back. They don't seem to be controlled by the theme, or I'm just not doing it right.

View 2 Replies View Related

Ubuntu :: Moving Files Listed In Text File?

Jun 14, 2010

I've got a text file listing 1823 files that need to be copied from their current locations, i.e.To another folder, any idea how I should do this?

View 4 Replies View Related

Ubuntu :: Error Moving File: Permission Denied

Dec 4, 2010

Im trying to move some files from my desktop to /usr/share/ProjectM Project M is a visualization program, and Im trying to move some presets I downloaded there. The error I get is

Code:

There was an error moving the file into /usr/share/projectM/presets.
Error moving file: Permission denied

I am logged in as administrator, why can't I move these files?

View 7 Replies View Related

Installation :: Which File Stops A Red Hat (or Fedora) From Moving To Another Partition

May 1, 2010

I have an obsession of packing a large number of distros into one hard disk. Many distro installers do not like it even though their kernels can support higher number partitions. Typically an installer, say from a Debian family, would freeze when checking a hard disk that has more than 15 partitions. However if I put the same distro on a hard disk with less than 16 partition the installer will be very happy to install. I then copy the distro back to the original disk to a different partition, change the boot loader setting and fstab and the new distro will be happily working in the next hard disk that has 57 partitions.

This scheme works for any distro until recently Fedora refuses the move. I didn't investigate the cause then but I have just come up against a brick wall with the Red Hat Enterrise Linux 6. It was one out of the 4 I just moved. The others are operating happily. The RHEL will boot to a Grub screen. When I select the user account and type in the password it just refreshes the screen as though the password could not be accepted. I can boot up another Linux, mount the RHEL partition, change root to it and change my normal user password. Better still why don't I create a new user and another password.

Same result. I could not pass the log in screen with revised password or from a new account which got displayed. How about a little trick told by Justlinux library file --> to alter the run level. So I mounted the RHEL partition, changed root to it, edited the /etc/inittab and amended the run level from 5 (for X desktop) to 1 (single user - terminal mode). RHEL now boots to a root terminal! Success in a sense that my RHEL boots as expected and there was never a problem with booting. However newer Linux do not permit root log on to the desktop so I cannot check the log in with the ordinary user account to X. After I fiddled with the various files/parameters related to the gdm and X still no joy so I cut my loss and post the question here.

View 10 Replies View Related

General :: MV - Missing File Argument (Moving Files Within LAN)

Feb 1, 2010

Objective: To move or backup all the 30 days old files to the other server within LAN. I have tried testing it first within the server by performing below commands:
find /usr/test1/* -mtime +30 -exec mv {} /usr/test2/ ;
But I'm getting "mv: missing file argument" error when I try this.

View 1 Replies View Related

Ubuntu / Apple :: Best File System For Moving Between It / MacOS / Windows

Jan 7, 2010

I have an external hard drive that needs to be readable and writable between MacOSX, Ubuntu, and Windows. I also need to work with files over 4gb in size (which can't be done with Fat32, which happens to work with all 3 OS's) I tried MacOS journaled, that didnt work. Before I start reformatting and doing a bunch of guess and check, I wanted to know if the answer was known.

View 7 Replies View Related

General :: Moving A File To The Root Of The Drive Via Command Line

Oct 17, 2010

How can I move a directory to the root of a drive via command line?

In MS-DOS it would be 'move C:/GAMES/QUAKE C:/'

What is the equivilent in Linux?

View 8 Replies View Related

General :: Rename Multiple File By Moving Part Of The Name To End Of Extension?

Aug 26, 2009

How do you rename:

abc123.txt
abc124.txt
abc125.txt

to

abc.txt.123
abc.txt.124
abc.txt.125

Basically, I want to move the digits from the filename to after the extension.

It works for one file if I type:
rename 123.txt .txt.123 abc.txt.123

but I have thousands of files like these.

View 1 Replies View Related

Ubuntu :: Automate Creating Directories Based On File Names And Moving Files Into Them

Apr 30, 2011

I have a bunch of .7z files in a directory, and I need to put each one of them into a separate directory, named after the file (without extention). The command line I use:

Code:
find . -type f | mkdir `sed -e "s:..(.*)...:1:"` ; ls | grep .7z | cp * `sed -e "s:(.*)...:./1/:"`
Copying fails though:

[Code]....

PS. I don't want to use scripts, I want to do it using simple commands and piping.

View 5 Replies View Related

Ubuntu :: Moving Files In Terminal \ Moving Files That Have Root Permissions?

Mar 4, 2010

I have limited experience in terminal, but let me first explain what I am trying to do to see if there is some easier way to do it. Basically I want to change the skin in aMSN. I downloaded the new skin but am unable to unzip or move it without /root permissions. I don't know how to acquire this without being in terminal. So I figured there had to be some way to go into the terminal and use it to move the unzipped folder from the desktop to the aMSN skins folder.

View 3 Replies View Related

Red Hat / Fedora :: Moving A File From One Server To Another Server?

Jul 23, 2010

way to move one file or directory from one linux server to another linux server using RSYNC command wihout password.?

View 4 Replies View Related

Programming :: Socket Programming While Displaying Received Message In File

May 11, 2011

i have problem in socket programming, while displaying received message in file,i got a problem... i cant able to write it in the file.... this is the code....

Code:
/* tcpserver.c */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
[Code]....

now my problem is run time error i can able to create file but i cant able to write file....log.txt contain nothing.... as here i have give sample code... dont say not initialising function and all.... i have initialised , please only see func1() - my problem is only not able to write msg which i got received from the client..

View 2 Replies View Related

Programming :: OpenCV Programming - Highgui.h: No Such File Or Directory?

Jul 1, 2010

I installed OpenCV and am trying the example programs. When I try to compile like in the tutorial it is not finding highgui.h.I have 64 bit Mint if that helps at all

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved