Ubuntu :: Command Line To Copy Files From One Location To Another / Retain Source Files Group / User?

Feb 20, 2011

Is there a method at the command line to copy files from one location to another and retain the source files group and user?I'm migrating some MySQL files from one machine to another.I want to back-up the original files in the directory presently. They have owner:group of mysql, some have owner:group root:mysql and so on. To copy them under cli or Nautilus everything changes to root for I execute sudo cp or gksudo nautilus and copy via gui.

Since it is MySQL data I could simply do a dump of the database and restore it on the other machine. But there's about 20 db's and I want to do this via a copy for it will be faster - at least that is what I think.

View 5 Replies


ADVERTISEMENT

General :: SQL Like Group By And Sum For Text Files In Command Line?

May 2, 2010

I have huge text files with two fields, the first is a string the second is an integer. The files are sorted by the first field. What I'd like to get in the output is one line per unique string and the sum of the numbers for the identical strings. Some strings appear only once while other appear multiple times. Given the sample data below, for the string glehnia I'd like to get 10+22=32 in the result. how to do this either with gnuwin32 command line tools or in linux shell?

[Code]...

View 2 Replies View Related

Ubuntu :: Copy Files Via Command Line?

Dec 14, 2010

I'm looking for a way to copy files with a certain file extension over to another folder. For exampleSource Folder: /home/user/downloadsFile Type: *.epubDestination Folder: /home/user/epubs/The downloads folder has several folders that may go as deep as 2 or 3 levels.I tried this but it didn't seem to work (and I'm not really sure what to do to modify it to get it to work).Quote:find . -maxdepth 1 -type f -exec grep -q "pattern" '{}' ';' -exec cp '{}' /path/to/destination

View 4 Replies View Related

Ubuntu Multimedia :: Take Screenshots And Copy Image Files To Clipboard From The Command Line?

Feb 17, 2011

install imagemagick python, and pygtk.

Code:

sudo apt-get install imagemagick python pygtk

Now save the following script somewhere as imgclip.py. This is a simple python script which takes an image file and puts it in the gnome-clipboard.

Code:

#! /usr/bin/python
import pygtk
pygtk.require('2.0')

[code]...

View 1 Replies View Related

General :: Command Line - Automating A Task - Copy All Subdirectories And Files From One Directory To Another

Jun 10, 2010

I need to copy all subdirectories and files from one directory to another ever 5 minutes or so, with the old data automatically being overwritten with the new data. I'd also like this to run at startup. Is there any way this can be done? If so, what program would I need to schedule the automation and what is the command line I would need.

View 2 Replies View Related

Fedora :: View A User's Group In The Command Line ?

Mar 23, 2011

I am learning about group and user management with Fedora and can change the user's group using the usermod command but did not know if there was a command to see the group currently associated with the user.

View 3 Replies View Related

Ubuntu :: Copy Files From Ldd To Location?

Jan 30, 2010

When I use ldd it prints the location of the depends.Is there a way to copy the depends listed to a location in a single command or streamline it? I don't want to copy each dependence once at a time.

View 1 Replies View Related

Ubuntu :: Set My Log Files To Copy Themselves To A Different Location ?

Dec 12, 2010

How can I set my log files to copy themselves to a different location every, say, two weeks? Thanks in advance.

View 1 Replies View Related

Programming :: Script To Copy Files From One Host To A Group?

Mar 31, 2011

I have one script that goes through some IPs:

###############################3
#/usr/bin/sh
# This is a script to copy files from one host to a group of

[code]....

View 6 Replies View Related

Programming :: Source Code To Get The Location Of Installed Files After Rpm Installation

Jul 25, 2011

The rpm command to get all the list of all installed file location after rpm installation is rpm -ql <rpm file-name>

View 7 Replies View Related

General :: Files To Inherit User And Group?

Mar 8, 2010

i have a directory ( /dir1) that belongs to a user1:group1. I need to know if this is possible and if so a basic idea of how to. when i copy a file into /dir1 (as root) i would like it to obtain a different user and group. Is this possible?

View 1 Replies View Related

Software :: Allow A Group/user To Execute A Command, Where One Of The Parameters Of The Command Is A Group As Well?

May 3, 2010

Is it possible to allow a group/user to execute a command, where one of the parameters of the command is a group as well? example that does not work as intended:

Code:
Cmnd_alias SU=/bin/su -l %group1 This example works sortof, it treats the "%group1" literally. I know I can list out the "/bin/su -l <eachuser>", but as you can imagine that is impractical. In this example, I want people in group2(not shown for brevity sake) to be able to su to someone in group1

View 13 Replies View Related

Software :: Copy Files From One Source To Multiple Destination Simultaneously?

Aug 5, 2010

i want to copy one or more files or directory from one drive to multiple drive simultaneously. It like a cloning a disk. But i dont like clone entire disk. i want to copy/clone only certine files or folder. if any one can know how to copy one source to multiple destination simultaneously.

View 3 Replies View Related

General :: Search Word In Group Of Files Using Command?

Oct 10, 2009

i am using openSUSE 10.3 & like to use power of terminal to do tasks.I want to search all files containing word 'echo' in given folder.What should be command.

View 14 Replies View Related

Ubuntu :: Copy A Line By Number In Text Files On Terminal?

Apr 10, 2010

I got a text file. Now I want to write a line by its number in a bash variable. That is all.

View 1 Replies View Related

General :: Copy Mutiple Files Over Scp In One Command?

Mar 4, 2010

I have to transport a lot of files from one pc to another (both Linux). I would like to use scp for that, but scp only allows for transferring one file at a time. How can I do this?

I have No possibility to use rsync or any other protocol No possibility to use passphrase free certificates (but have a certificate with a passphrase) A list of files to transfer and a list with the destination path of the files on the other server The files are spread out over a lot of directories, and not all the files in the directories I want to copy If possible I would like to gzip and ungzip transparently to save bandwidth!

View 3 Replies View Related

Ubuntu :: Command To Copy Files In Directory Created Within 2 Hours?

Apr 22, 2010

Is there a simple command to copy files that have been created within the past 2 hours?I've been looking through the man pages for unisonrsyncfindcpand I can't find anything I'm looking for.All I need is a simple command.Code:Copy folder a to b if created < 2 hours.

View 4 Replies View Related

Ubuntu :: Creating PDF Files From A Command Line In 10.04?

Sep 15, 2010

rying to find a way to generate a PDF file from a text file in a command mode (X is not installed). Is there a simple way to do that?I don't need anything fancy - no special formatting and no images to include, just simple text converted to a PDF format

View 3 Replies View Related

Ubuntu :: Command Line Tag Editor For Ogg Files?

Oct 8, 2010

I had a great system going with a bash script to update all of my mp3 files' genre tags. Now that my music collection is ogg, id3v2 doesn't work.

Can anyone recommend a command line tool to edit tags for ogg files please?

View 6 Replies View Related

Ubuntu :: Rescuing Files By Command Line Only?

Jan 4, 2011

I have a laptop with Ubuntu 10.04 which appears to be completely wrecked. Even in recovery mode I can't get any GUI. The only access I can get is via command line, which with my limited knowledge of cd and ls commands shows me that the home directory is OK and all the data files present.

How can I get the data files off this machine, eg by copying them to a usb stick, or maybe by copying them to the Windows partition (which still works OK)?

View 9 Replies View Related

Debian :: Getting Files With The Command Line?

Dec 28, 2010

how to download or upload files to a Debian machine using only the command line. I well aware of how to do it in GNOME, but seeing as how this is for a web server, I won't be using GNOME. I have a zip file on my personal machine that contains the website files that need to go on the Debian machine that is to be the web server, but I have no how to get it to that Debian machine without GNOME.

View 14 Replies View Related

Ubuntu Servers :: Execute .php Files From The Command-line?

Jan 26, 2010

Some time ago I installed LAMP in my server, but now I need to execute .php files from the command-line (in order to execute some manteinance scripts for mediawiki). Seems that the PHP files running in the server are run thru some kind of "module" in apache2. Can I tell apache2 to run a .php file in command-line mode using that php module? Or should I install a fresh copy of php-5? Won't that interfere with apache or mangle the system?

View 4 Replies View Related

Ubuntu :: Find Multiple Files In The Command Line?

Mar 2, 2010

command line, I have a server for work that I ssh into and I need to be able to find multiple files (they have the leading text just the date identifier changes) and then zip the files (with bzip) them and then finally scp(Secure copy) them to another server.

These files are always in the same directory and this is a daily task and just want to make into a script that I run once I am logged into the remote server.

View 4 Replies View Related

Ubuntu :: Delete Duplicate Files Command Line?

Apr 14, 2010

Is there a way to remove duplicate files from a specific folder through SSH? I've uploaded a lot of flash games on my server and I can see in the Webmin's file manager that I have many duplicates. Their names are different, of course.

View 2 Replies View Related

Ubuntu :: Move Multiple Files Via Command Line?

Sep 15, 2010

I liked the idea of the "cosmos" screensaver/desktop, but wanted to add my own pictures to the application. I navigated to /usr/share/backgrounds/cosmos and tried to drag and drop. I quickly found that I did not have permission to do this.

I googled my problem and found some command line tutorials telling me to sudo cp. My problem is that I have about 30 pics that I want to move in there, and I don't think I can just move the directory, they have to be in that folder as the pictures themselves.

I don't really feel like typing the cp line multiple times with multiple randomly named image files.

Is there a way to have the command line cp all of my files from one directory to another?

View 4 Replies View Related

Ubuntu :: Copying Files From One File Without Using Command Line?

Dec 9, 2010

Is there a way to copy a file from the desktop to /usr/lib/ICAclient folder that I have, by using drag and drop.For some reason, I thought I was able to do this in Mint.

View 9 Replies View Related

Ubuntu :: Put All Of The Current Directory's Files On The Command Line?

Feb 21, 2011

Is there an easy way to put all of the current directory's files on the command line, without tab-completing each individual one?

View 9 Replies View Related

Ubuntu Multimedia :: Split Wav Files From The Command Line?

Apr 2, 2011

how to split wav files from the command line?

View 4 Replies View Related

General :: Secondary Group Users Need To Change File Permissions Of Primary Group Files?

Oct 19, 2009

i want secondary users can able to change the files permissions of primary group?user MAC is having www as a primary and httpd as secondary group. But he want to change the file permissions (chmod) httpd group files. Is it possible or not? I think its not possible. If it`s possible then let me know how?

View 3 Replies View Related

OpenSUSE :: Find Files In 11.2 Without Using The Command Line

May 25, 2010

How do I find files in opensuse 11.2 without using the command line. I see in dolphin "nepomuksearch", but it doesn't work. Even in the command line you cannot whereis a file like Monday, Monday.mp3. whereis also seems to be case sensitive.

View 5 Replies View Related







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