General :: Copy Symlinks To Target As Normal Folders?

Nov 30, 2010

i have a folder with symlinks:

marek@marek$ ls -al /usr/share/solr/
razem 36
drwxr-xr-x 5 root root 4096 2010-11-30 08:25 .

[code]....

i want to copy it to ~/solrTest but i want to copy files from symlink as well when i try to cp -r /usr/share/solr/ ~/solrTest i will have symlink here:

marek@marek$ ls -al ~/solrTest
razem 36
drwxr-xr-x 5 root root 4096 2010-11-30 08:25 .
drwxr-xr-x 358 root root 12288 2010-11-26 12:25 ..

[code]....

View 4 Replies


ADVERTISEMENT

General :: Copy One File To All Folders?

Apr 4, 2009

I am developing a Web-based application and have some folders that will generally reside outside of the Web accessible area of the server. However, since some people will not be able to store those folders outside of the "public_html" folder, I am looking to put a blank "index.php" inside of every folder within that section of the application. To make things easier, I would like to know if there might be a way to recursively copy one file into every folder in a certain location.

In other words, is there a command that might do something like:
Code:
> cp -R index.php /home/user/public_html/source-files/*
Basically, I want every directory inside of "source-files" to get a copy of "index.php". The directory hierarchy within "source-files" can go at least three or four levels deep, so the command would need to be recursive. I am looking for a command-line statement that I can type to perform this action.

View 3 Replies View Related

General :: Copy All Files Except From Some Certain Folders?

Jan 19, 2010

At the moment I'm using:"cp -ap . /destination-folder"to copy everything from the folder I'm in to another folder.That works.Is it possible to cp everything except:folder1/folder2/in the current folder I'm in?

View 2 Replies View Related

Ubuntu Networking :: Copy Files From XP Infact Folders Using TERMINAL In Netbook, Not Copy And Paste Using Mouse?

Jul 9, 2010

just installed ubuntu couple of days back on my netbook. I am still a beginner, enjoying my adventure exploring ubuntu. I have another desktop which runs on XP. I am able to access XP shared folders through my netbook(linux). However, i wanted to copy files from XP infact folders using TERMINAL in my netbook, not copy and paste using my mouse. Are there any commands for it?

View 1 Replies View Related

General :: Copy All Files And Folders From Specific Date?

May 26, 2011

I wanna copy all folders and files created from 01.01.2011 until today to new placeie:cp -r /home/moviecar/public_html/wp-content/uploads/ /home/teaser/public_html/wp-content/uploads

View 4 Replies View Related

General :: Copy A Set Of Sub Folders From Their Multiple Parent Directories To A New Location

Nov 5, 2010

I am attempting to copy a set of sub folders from their multiple parent directories to a new location.

For example, I have three folders to copy:

I would like them to be copied to:

In actuality there are many folders besides folder1, folder2, folder3, and no numerical order exists. So, the folder named 'photos' would be copied to its parent folder's name in a new location. I would need this to occur for all folders in the '/home/user' directory.

View 6 Replies View Related

General :: Shell Script To Copy All Folders Older Than 7 Days?

Mar 16, 2011

I want to make the script to copy all folders which older than 7 days from Linux server to Windows server by Samba. And make it automatically by using cron

View 4 Replies View Related

General :: Copy Folders From Windows Machine To System Script?

Oct 7, 2010

I'm looking for a script to run that will be run from my linux box to copy folders from a windows server at a certain time on a daily basis.

View 2 Replies View Related

General :: Windows 7 - Backup Folders To External SFTP Server With Shadow Copy

Mar 1, 2010

I have an account in university on Linux machine with 10TB of free space accessible via SFTP. I would like to backup my Windows 7 x64 laptop to university. Currently I am using rsync+cygwin, but backup is pretty slow (without shadow copy) and I hate console window appearing every day on my screen when I login.

So I am looking for something like Windows Backup but with support for SFTP. Combination of tools will work too.

View 3 Replies View Related

General :: Copy Folder Hierarchy / Recreate All Folders From One Directory Without Copying Over Contents Of Folder?

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

General :: Copy Files And Folder Except Some Files And Folders?

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

CentOS 5 :: Differences Between Scsi-target-utils & Iscsi-target

May 8, 2009

I want to run ISCSI target on CentOS. Both "scsi-target-utils" and "iscsi-target" can be used.

They seem to have the same function.

Is there any significant difference between them, on performance or stability?

View 4 Replies View Related

Ubuntu :: Copy Files/folders With GREP?

Jul 1, 2011

I'm attempting to find a particular word wherever it appears within a massive directory listing of teeny tiny text files -- and then copy all files containing this word into a "staging" directory.

Whenever I use the command below (on a test folder of smaller scale), it never carries the directory structure but attempts to copy all files within the "output" folder.

Code:
cp `grep -ir 'word' *` output

how to copy all these text files and have them retain some sort of directory structure?

View 2 Replies View Related

OpenSUSE :: Copy Some Files And Folders To The Usb Memory Fails

Jul 29, 2010

when I try to copy some files and folders to the usb memory fails me. What if I copied it from console or dolphin. I get this console error:

cp -r /home/jonatan/Documentos/carpeta
cp: no se puede crear el directorio �./carpeta/ejemplo�: Argumento inv�lido

If I try to copy the data to an ntfs partition I have no problem.

View 5 Replies View Related

Programming :: Using Rsync To Copy Only Certain Folders Within A Directory Structure?

Jun 15, 2011

I am trying to create a simple bash script to rsync some folders within a directory stucture. I am using wild cards, in the rsync source directory structure, but my command always fails. I believe it is the way I am using wild cards within my for loop. Here is my command ;

Code:

for seq in `cat test.txt` ; do rsync -nvP /folder/folder/folder/folder/folder/**/$seq /folder/folder/folder/ ; done This always fails, where if I do a ls to the destination, to test the path, it always works.

View 5 Replies View Related

Ubuntu :: Copy All The Pictures From Various Folders In Documents To A Single Folder

Dec 8, 2010

I'm using Ubuntu 10.10. I want to copy all the pictures from various folders in my Documents to a single folder. So in Nautilus, I clicked on Places > Search for Files. Then chose the Documents folder and typed *.jpg in the search criteria. It found all of my pictures just fine. However it would not let me copy and paste them into a folder I put on my desktop. Copy is not on the "right" click menu and Ctrl C did not work for the highlighted search results. This is so simple in Windows but it does not seem to work in Ubuntu.

View 4 Replies View Related

Programming :: Need To Copy The Obtained Output Files Inside Corresponding Folders?

Nov 2, 2010

I have encountered a problem:I have "while" loop; at each run a set of outputs is produced but then I need to shift them into a corresponding folder ; otherwise next run the new outputs will be over-written. Furthermore, I need to pipe what I have on the screen inside a file. I have put my code in the following:

Code:
# !/bin/bash
jf="GeoQuery.jar"

[code]...

View 3 Replies View Related

General :: No Symlinks Allowed In Smb Share?

Feb 8, 2010

I have the following share setup on my Ubuntu machine

# From /etc/fstab
//192.168.1.13/media /home/USER/SHARE/media cifs username=USERNAME,password=PASSWORD,_netdev,uid=USER,gid=users 0 0

[code]....

View 1 Replies View Related

General :: Can Grep Exclude Symlinks?

Oct 15, 2010

I tried to run one grep that excludes symlinks and pipe it into a second that searches for my pattern but I continue to get the recursive directory loop error. As a result (I think) my grep is incomplete as the search just loops between directories symlinked together.

View 7 Replies View Related

Ubuntu Servers :: Auto Copy Folders To Windows And Vice Versa?

Apr 6, 2010

1. I need a script(like a scheduled cron job) which should perform Automatic copy (backup) of a directory from ubuntu server to windows and vice versa....

i tried every thing like samba mounting,ftp,etc..with samba its possible to map the network drive of an ubuntu directory in windows..but if the ubuntu server is not available then i cant access the network share..

Exactly this situation is happening for me while backing up tmp directory of ubuntu server ...

so in this case i need a permanent backup of tmp directory of ubuntu server in windows rather than a network share.

2. Also any ideas or scripts regarding automatic ftp (while doing a backup) from ubuntu server to windows... which can easily solve the above issue...

View 8 Replies View Related

General :: File Permissions Apply To Symlinks?

Jun 27, 2011

Let's say you have this structure:

+ directory
-- file1
-- file2
-- file3 -> /tmp/file3

file3 is a link to another file3 somewhere else on the system.

Now let's say I chmod 777 the directory and all contents inside it. Does my file3 in /tmp receive those permissions? Also, let's say we have the same situation but reversed.

/tmp/file3 -> /directory/file3

If I apply the permissions on the file being linked to, how does that effect the link?

View 2 Replies View Related

General :: Linux And Windows Symlinks Interchangeability

Apr 10, 2010

This question is about windows 7. I want the "C:program Files" folder to be a symlink to a directory on another partition. I can't do this from within windows because it locked the Program Files Folder. Will a linux live CD do the trick?

View 1 Replies View Related

General :: Resolving Symlinks Mounted Via Samba On Windows?

Feb 11, 2010

I have a samba mount in Windows, mounted from a local Linux devbox. The projects on this mount contain a lot of symlinked directories. They all work fine and look like normal directories to Windows. What I'd like to do is figure out for a given file what its real UNIX path is.The context is: in my editor I have a script that runs the Perforce open command, to which I pass the file location.p4.exe edit FILE_LOCATION

However, perforce will not understand this FILE_LOCATION, if on the Linux side part of the path is a symlink. It needs to know the real path.What I need is something along the lines of the Linux readlink command, which resolves symlinks in paths.

View 1 Replies View Related

General :: Moving Symlinks Into A Folder Based On Id3 Tags?

Apr 3, 2010

I'm trying to get my music folder into something sensible. Right now, I have all my music stored in /home/foo so I have all of the albums soft linked to ~/music. I want the structure to be ~/music/<artist>/<album> I've got all of the symlinks into ~/music right now so I just need to get the symlinks into the proper structure. I'm trying to do this by delving into the symlinked album, getting the artist name with id3info. I can do this, but I can't seem to get it to work correctly.

for i in $( find -L $i -name "*.mp3" -printf "%h
")
do
echo "$i" #testing purposes

[code]....

I'm trying to mv The Trance Mix 3 Wanderlust - DJ Exortius [TRANCE DEEP VOCAL TECH]@ into the real directory DJ Exortius. DJ Exortius already exists, so it's just a matter of moving it into the correct directory that's based on the id3 tag of the mp3 inside.

PS: I've tried easytag, but when I restructure the album, it moves it from /home/foo which is not what I want.

View 2 Replies View Related

General :: In Ubuntu 9.04 - Mount The Different Folders On The Partition To Different Folders In Home?

May 12, 2010

I have a shared NTFS partition ("shared") that I use for data for both Windows and Ubuntu. How can I mount the music folder on shared to $Home/Music, and the Videos folder on shared to $Home/Videos? I want to mount the different folders on the partition to different folders in home.

View 2 Replies View Related

General :: Gnome-terminal: Preserve Symlinks Of Working Directory When Opening New Tab?

Aug 31, 2010

If I'm using gnome-terminal in a working directory whose path includes symlinks and I open a new tab, the symlinks will be expanded to their destinations in the working directory of the new tab.

Is there any way to preserve the symlinks when opening a new tab?

View 1 Replies View Related

Ubuntu :: Copy User Settings / Folders From One User Home Folder To Another?

Jan 10, 2010

I have 2 users and I would like to copy all the files and folders in one home dir to another.... sounds simple, til i got started. Ive tried

Code:

sudo cp -nRv /home/user1/* /home/user2
but that didnt copy the .* folders. Im after the firefox and thunderbird folders mainly, but all of them is OK too.

im talking about the .adobe, .amsn ..........

How can I copy the .* folders from one user home folder to another and then give the correct permissions to the new user.

View 4 Replies View Related

General :: Cp: Target ' Is Not A Directory?

Apr 22, 2010

I am running following commands and ist runs fine for me.cp -r /mnt/datasource/* /opt/IBM/WebSphere/DataSource/But if I put this command in script, it does not work.

vi cpydata
cp -r /mnt/datasource/* /opt/IBM/WebSphere/DataSource/
#save it

[code]....

View 5 Replies View Related

General :: Copy A Read-Only File And Make The Copy Writable With A Single Cp Command?

Mar 1, 2011

How to copy a Read-Only file in Linux and make the copy writable with a single cp command in Linux (Ubuntu 10.04)? The --no-preserve and --preserve seemed to be good candidates, except that they should "and" the mode flags, while what I am looking for is something that will "or" them (add +w mode).

More details: I have to import a repository from GIT to Perforce. I want that all Perforce depot files are Read-Only (that is how Perforce was designed), while all other files that were derived/copied from depot files are writable. Currently if a Makefile tries to copy a Read-Only file then the derived file will also be Read-only. This leads to build-errors when cp tries to overwrite Read-Only file second time. Of course the --force is a workaround here but then the derived file is also Read-Only. Also I do not want to mess with "chmod" after each "cp" command - I will do that only as the last resort.

View 1 Replies View Related

General :: Cross-compiling To Target System?

Jul 22, 2010

I have synology nas box DS710+ that has intel atom processor inside. i've installed ubuntu under virtual box, downloaded needed toolchain for x86 processors, and decided to cross-compile openvpn.

I 've started from compiling lzo library, but first question that appeared in my head - how i have to move all compiled binaries to my synology?

1. configure - okay
2. make - okay
3. make install - this is not necessary?

Will --prefix parameter helps me? or do i have to use chroot? cause there is a plenty amount of files that i need to move to my synology.

View 2 Replies View Related







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