Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Copying all the normal files from 1 folder to another on a unix platform. I pass in 1 or 2 arguments, the folder to be copied and folder copied to.
I don't know why my code is not working. I open up a directory, and copying file by file. I don't know why it won't work.
2. Relevant commands, code, scripts, algorithms:
some cp files you can find easily all over the internet, and part of a ls file.
3. The attempts at a solution (include all code and scripts):
//here is my code
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
CSUEB, Hayward, CA, USA, Prof. Lee, CS3640
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
---------- Post updated at 03:41 PM ---------- Previous update was at 01:51 AM ----------
I've found out that I have to use malloc() to put it in another directory, but I'm very confused to how to use it for this program.
Last edited by MW99; 02-04-2010 at 05:26 AM..
Reason: code tags, please...
Hi all,
I have a folder '/samplefolder' in which i have some files like data0.txt, data1.txt and data2.txt.
I have to search the folder for existence of the file data0.txt first and if found have to copy it to some other file; next i have to search the folder for existence of file... (5 Replies)
Hello all, this is my first post while i am trying to understand unix.
I would basically like to know if i can do this:
Lets say i have a folderA and folderB
And i save something in folderA
Can i make a script that checks folderA latest file, then compares it with the date of latest file in... (16 Replies)
Hi,
I wanted to know how to create a folder using mkdir and then have it copy the permissions from another specified folder on the system.
For example if I did this:
mkdir /Volumes/USBSTICK/System
How can I make it copy the permissions from the /System folder ?
Thanks (4 Replies)
Bash/scripting newbie here - I feel this might be a trivial problem, but I'm not sure how to tackle it. I've got a folder of a year's worth of files, with some random number of files generated every day of the year (but at least one per day). I'm writing a script to automatically grab the file with... (6 Replies)
Hi all,
I have a requirement in which i have to check the latest folder in server A and move the same to Server B with all the subdirectories and files. This has to be done automatically without providing password at each execution. Help me in the same.
Thanks in Advance!!! (2 Replies)
Hi,
I have 200 pictures in a folder and I would like move 10 random pictures every week to given folder automatically.
I have this server on 1and1.com.
So I tried the following using Bash script for manual copy and paste for testing
#!/bin/bash
mapfile -t -n 3 files < <(find... (13 Replies)
Hi,
I need to write a script the has to copy the files from folders and subfolders to the same folder structure located in another location.
Ex:
mainfolder1
file1,file2,file3 subfolder1(file1,etc) subfolder2(file1,etc) to another folder location of same folder structure.
rsync is not... (7 Replies)
I need to routinely cp a file out of the highest incremented folder named PROD_2_6.1_xxx where xxx (3 numerical values) is incremented only once a night starting at 100 and ending 999 over a period of time. I am not worried about copying a subset of a complete file while it is being created by some... (5 Replies)
Hi,
Here is this weird thing happening here. I mounted RHEL 6.6 DVD on a directoy /a, I am trying to copy it's content to another folder by using command:
cp -pr /a/* /new/folder
But while I run ls -lrt on both locations it show me difference in number of files. Any specific reason for that.... (5 Replies)