General :: Making Script To Copy Files To Another Folder?
Jun 5, 2011
make a simple script to copy files from my "hfiles " directory to a "www" folder at leats I think its a directory, it has the permissions as "lrwxrwxrwx " but its like a public branch So I proceeded to make a file entittled MkPublic to copy the "hfiles" directory to the "www" branch
here is the code i used:
#!/bin/sh
# COPIES FILES
echo "copying files"
[code]....
when i try to run the script it tells me that there is a syntax error and an unexpected end of file and nothing seems to get copied anywhere so clearly there is something wrong with one im doing, i tried multiple ways : using the quotes, spacing the equal signs, but I seem to still get the same results.
View 8 Replies
ADVERTISEMENT
Mar 4, 2010
i need to copy files from a folder called output files to another folder called running but im not able to do it i always get a stat error
View 14 Replies
View Related
Jul 14, 2011
Quick question. I need to ensure that all my files within specific folders are marked as being read only if the folders name is 'Forms' for example. There may be many 'forms' folders on the server within many different directories.It is a requirement that everything within these folders are marked as being read only but people are not doing so for whatever reason, and would therefore like for it to be done automatically i.e. a script executed by a cron job every eve to esnure that all files within the forms directories are marked read only.
View 1 Replies
View Related
Jun 8, 2010
I have many files and folders in my source folder. I want to copy some files and folders from that source folder to destination folder. What should be require to given with the "cp" command?
View 1 Replies
View Related
Jun 10, 2009
I'm trying to copy a list of files except the files which has ".log" in the filename to another folder.I can run it correctly when I am located in the Source folder, but not when I am in any other location.cd /home/me/Sourcels /home/me/Source -1|grep -v "^.*log$" |xargs -n 1 -iHERE cp -r HERE /home/me/DestinationHow can I indicate both Source and Destination Folder?
View 2 Replies
View Related
Jul 20, 2011
sudo cp ../../../rootfs_maker_ramdisk drivers/filesystem/ -rf
give below errorCode:cp: cannot create special file ...._rootfs/dev/hda4': No such device or addressi get this error only in some specific locationsif i dont use sudo then i get permission denied msg
View 4 Replies
View Related
Oct 22, 2010
i want make a bash panel and i want he will copy files from orginal folder to $user folder i mean when for explame i type i want install some server he say cp: cannot stat 'root/Desktop/2/files/beckup/sa-mp-steam': No such file or directory.
View 6 Replies
View Related
Jul 2, 2010
Is there a way to recreate all the folders from one directory to another without copying over the contents of the folder? I've been trying to do something like this,
Code:for i in `ls $X`; do mkdir $PATH/$i; doneUnfortunately $i is deliminated by whitespaces in the filenames and not the actual folders.
$X contains only other folders so I dont have to worry about regular files but any kind of more "advanced" solution would work.
View 1 Replies
View Related
May 30, 2010
i have a folder with 250 subfolders and each one of them has (at least) one image in it (along with other stuff)how can i 1)copy all the images from those subfolders and paste them into one folder together (other than by hand, obviously)?2)optional : copy only the images of a certain size and above?
View 2 Replies
View Related
Apr 24, 2011
I had Fedora 7 and Windows-XP dual operating system. Few weeks ago, there was GRUB error. Now I want to install Fedora 14, but before it I want to back up all data in one external hard drive. I used Fedora 13 live-CD I could access all the drive formatted as NTFS, but I couldn't access /home and the drive formatted (ext2) and owned by the user-name.
Please, inform if there is any idea to copy my files that remains in the home folder. (I can see them but copying is prevented)
View 4 Replies
View Related
Nov 24, 2010
i'm confronting atm. I need to create a folder where ppl can copy files and i need to be sure that those files cannot be deleted after they are copied there. The folder will be accessed over network, and i need to be sure no one will delete somebody else's files.Also i need to tell you that i'm working with regular users, so creating a folder for each user and chown/chmod-ing it won't do the trick(allready tried and ended up with a whole lot of files in the parent directory).I also tried chattr +a but that doesn't allow them to write new files in the folder.
View 2 Replies
View Related
Jun 24, 2011
What would be the best way to automatically copy all of the data off of a library of cds to a specific folder on the computer? I was thinking of running a bash script but I've run into a few snags figuring out the correct way to do it. Mainly due to the fact that the cd drive is mounted in a different folder in /media each time I insert a new diskAlso, the mounting and unmounting process causes it's own problems, but I think that could be covered by a for loop that checks /mtab every few seconds or so.
View 2 Replies
View Related
Aug 6, 2010
I am trying to make my first tar file in linux. I am trying to make a tar file from a folder (with all subfolders and files) and using several commands I got several errors!
This is the tar usage:
tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile] [blocksize] [[-C directory] file] ...
Some of my attempts and responses:
tar -czf itic_glb_cognity-06082010.tar.gz itic-glb-cognity/
response: tar: z: unknown option (not using 'z' again!)
tar -cf itic-glb-cognity-06082010.tar.gz itic-glb-cognity/
response: tar: cannot stat itic-glb-cognity. Not dumped.
The last ones repeats for all the next attempts:
tar -cf itic-glb-cognity-06082010.tar.gz itic-glb-cognity
tar -cf iticglbcognity06082010.tar.gz itic-glb-cognity/
(full path + name without spaces) tar -cf iticglbcognity06082010.tar.gz /epos/webbus/bea/user_projects/domains/itic-glb-cognity
For some of the above a 10kb file was created, where the expected file would be about 250MB. I dont think it has anything to do with the user's rights, because I think I have them all.
View 6 Replies
View Related
Apr 6, 2010
I installed Kubuntu 9.1 and then I downloaded Xampp of Linux to the desktop, however I have to extract it to /Opt/lampp. And that's the problem. I don't seem to have access or permissions to ?? I tried right-click | properties | permissions but the fields are greyed-out to make any changes.I am logged-in using the same user id/password I created when installing K9.1.
View 14 Replies
View Related
Jul 9, 2010
i want to copy one folder to server using terminal. iwant to copy datatable folder to server. it like this:
copy from
user: /home/qa/html/datatable
to
server: www/html
how to do that...i'm new about this..i try like this:
1> qa@qadesktop2:~$ ftp 10230.35.211
2> fill password
3> ftp>cd www/html
4> ftp>mput
(local-files)/home/qa/html/dataTable-1.6/*
View 3 Replies
View Related
Jul 10, 2011
I downloaded the bin file, and installed it but I haven't realized that I made the folder in the current directory. I would like to install in /usr/java.
Can I now just copy paste it there. Or I need to re-install to desired location I installed JRE , is that ok or I need to install sdk
View 1 Replies
View Related
Nov 23, 2010
In Linux bash shell, for a given directory, how can I list:The create date for that directory The number of files in that directory The number of subdirectories in that directory.
View 3 Replies
View Related
Sep 10, 2009
How would i go about copying all .jpg or .JPG files from a folder and all its subfolders to my /usr/name/pictures folder? I'm guessing I'd have to use some sort of .[jJ][pP][gG] to get all the pictures from other examples i've seen, but really not sure how to use that in a recursive cp.
View 14 Replies
View Related
Sep 27, 2010
I am trying to use the cp command to copy some files around but want to preserve the entire folder structure. Example:
Then within the /backup location I want to see /backup/folder1/folder2/file.
I have tried cp -a and cp -p but neither give me the above.
View 3 Replies
View Related
Apr 20, 2011
I have 500 folders of templates in one folder. Now each folder has file called template_thumbnail.png . now i want something so that all those files get copied to one folder with name same as the home folder name
I have cygwin installed and i can copy that folder in there so basically it will linux shell script
View 1 Replies
View Related
May 2, 2011
How to Copy the entire folder contents (including sub-folders and their contents) to another folder using PUTTY? Is there any command for that?
View 3 Replies
View Related
Feb 13, 2011
The reason I ask is, we have a home server running Fedora 12. I would like to be able to let anyone just plug in a flashdrive, and have Fedora automatically grab and copy all the files on that flashdrive to a specific share.
View 1 Replies
View Related
Jun 9, 2010
I own a web server (centos 64bit with cpanel on it) and my datacenter add me a second hard disk and i want first to locate from ssh where is it (the path) and then to copy my mysql folder /var/lib/mysql to the new disk and have it like this /new/mysql on the second disk.
View 8 Replies
View Related
Aug 25, 2009
How can you create a script to move or copy files from a main directory into multiple directories below the main directory.
View 7 Replies
View Related
Dec 1, 2010
When i want copy a file or folder in some system folder like sbin,Etc.show me error about privilage but when I'm in console i use su command for become admin and i can copy my file or folder.in other operation system like windows user can copy anything,i want know for direct copy my folder in linux without console what should i do? i must join my user name in root group?
View 4 Replies
View Related
Nov 3, 2010
I got a folder that I transfer stuff to all the time. the folder is in chmod 775 but when i upload folders and files, they are given chmod 700, but i want it chmod 775 everytime i upload something. so far i have logged in to my linux computer and did a chmod -R 775 to the folder every time i uploaded something to it. is there a function somewhere to make it 775 everytime i upload or can i have something run a script, so i don't have to go in and write it everytime i upload something?
View 2 Replies
View Related
Dec 5, 2010
I want to find files containing the "$" char (ascii 0x24). 'Grep -irl $ *' would output the names of every file in path *, of course, because it means end of line (EOL). So giving grep the string "$" won't do. So I tried 'grep -irl $ *'. But this doesn't work either and I do not understand why. Am I not escaping the dollar sign? grep should interpret it literally. Neither 'grep -irl "$" *' will work. Fortunately, there's LQ, besides grep's man page.
View 9 Replies
View Related
Mar 17, 2011
I just maked an ext4 partition by the help of gparted. Ubuntu is my only OS no dual boot. Using Ubuntu Maverick. The problem is partition must be open as root to do any work else it wont even allow me to open file,create folder,cut copy paste or anything.
View 9 Replies
View Related
Mar 19, 2011
I have written a script.
#/bin/bash
a=`du -sh /root/samplefolder | cut -f1`
echo $a > testfile
[code]....
The aim of this script is, when the folder reaches 20M then attributes will be set to that particular folder so that no newfiles and folders cannot be created or copied to that samplefolder. whenever i copy a file morethan 20M to that folder its getting copied fully and then the attributes were applied. But i dont want this to happen, when the folder reaches its maximum current write operation to that folder should be stopped automatically with a error.
View 5 Replies
View Related
Feb 1, 2011
When i installed ubuntu. I made a seperate partition so that i could copy an ISO image onto it of an up-to-date version of ubuntu. I wanted to then boot the ISO up so i could install the version that way.I've already tried doing it through the update manager but it'll download, almost be done with installing and it freezes on me. so i figured this would be easier. However i do not know how to gain access to the other partition to copy the ISO image.
View 6 Replies
View Related