Server :: Copy A File Preserving Its Original Modification Time Using The Command?

Jun 8, 2010

It seems to be simple one, but couldn't figure out exactly. Say I copy a file preserving its original modification time using the command

Code:
cp -p file1 file2
Now later, I want to know when file2 was copied... How do I find it ?

View 1 Replies


ADVERTISEMENT

General :: File Modification Time ?

Mar 30, 2010

The tail of my log is the following:

BUT:

So, how is it possible that some process writes to the file but file time modification still remains untouched?

View 2 Replies View Related

Red Hat :: Checking Last File Modification Time

Mar 5, 2010

I don't think there is a way of doing this with date or clock commands. But maybe they are writing to some file and I can take a look at the file's modification time. dmesg and /var/log/messages show nothing relevant.

View 1 Replies View Related

General :: Capture Elapsed Time For A File Copy Command?

Jan 25, 2010

I am troubleshooting file copy time issues between 3 servers. I need to copy the same file from server A to both server B and server C and compare the elapsed times for the copy. Is there an easy way to do this?

View 3 Replies View Related

Programming :: Bash Script To Copy Modification Date From A File To His Folder?

Jul 29, 2011

I need this script but I don't know how to do it I have one folder with several folders inside.On each folder a have one MKV or AVI file inside...What I need is a script to change the "modification date" of each folder to the "modification date" of each MKV or AVI that the folder has inside.

View 16 Replies View Related

General :: Descending List Ordered By File Modification Time

Feb 28, 2011

How can I generate a list of files in a directory [e.g.: "/mnt/hdd/PUB/"] ordered by the files modification time? [in descending order, the oldest modified file is at the lists end]
ls -A -lRt would be great:[URL]
But if a file is changed in a directory it lists the full directory...so the pastebined link isn't good [i don't want a list ordered by "directories", I need a "per file" ordered list]
OS: openwrt..[no perl -> not enough space for it :( + no "stat", or "file" command]

View 3 Replies View Related

General :: Stripping EXIF Metadata + Preserving Of The Original Date

Feb 23, 2011

I would like to remove almost all of the Privacy Evading data that a digital camera is generating, such as EXIF DATA. EXIF DATA: Camera Brand, Camera Model, Date taken, Exposure Time, Flash Fired, Focal Length, Location (if you are using iPhone with categorization by location, if enabled), Metering Mode, etc.

May you, please, write a script which does that job for multiple files?Exiv2 seem to reduce more weight than Jhead so I'll use the command exiv2.That's, generally, what I want the script to do:Retrieve the (Modified) date of a file.

View 3 Replies View Related

Server :: Get File Modification Times Measured To Less Than A Second?

Mar 17, 2010

Is it possible to get file modification times measured to less than a second?milisecond, nanosecond, 10th of a second.

View 3 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 :: Asking Cp To Copy Preserving The Whole Source Path

Jun 13, 2011

cp (GNU coreutils 6.9).

I have these files:
Code:

I want to copy them to /xp/borrar/ such that the result is

Code:

Can this be done with the cp command alone?

View 7 Replies View Related

General :: Copy Files With Preserving The Attributes?

Jun 3, 2010

I need to copy my data from the pc to an external hard drive with keeping the attributes; so i used the command

cp -rp ~/sourceDir ~/Destination

but when i am coping it it give the error message "cp: failde to preserve ownership for 'file' : Operation not permitted and it copied the files to the destination but the attributes has changed from

-rw-r--r-- to
-rwxr-xr-x

I tried to copy it by loging as the root also but still the same thing happens. how to copy the files with preserving the attributes

View 7 Replies View Related

General :: Copy Directory Into Another Preserving Specific Structure?

Jul 20, 2011

I would like to find the command that copy my eclipse options to another workspace code...

It doesn't work, and it could be source of error to write the path .metadata/.plugins manually. It certainly a better idea to create a complete script ?

View 1 Replies View Related

Programming :: Copy All The Files In The Directory Based On The Modification Date?

Dec 29, 2010

Originally Posted by Kenny_StrawnPlease wrap [CODE] tags aroung any code posted here. The full source that way could still be posted.I am trying to copy all the files in the directory based on the modification date (i.e created on Dec 29). Not able to find the proper command for this. This is what I have tried.

(none) login: root
#
# cd /mnt/hd/

[code]...

View 8 Replies View Related

General :: How To Change Modification Time (Created Recursively)

Jul 1, 2009

I know there exists a touch command to change the date of the files. However, I want to change the files of a directory and the directory time. Is there a command like -R. Please provide me an example of the command?

View 4 Replies View Related

Ubuntu :: Measure Time Needed To Copy A File From One Place To Another?

Apr 24, 2010

I was wondering if you could help me how to measure the time needed for Ubuntu to copy a file from one place to another.

View 2 Replies View Related

General :: Copy A File And Rename It At The Same Time While Copying It To The Same Exact Directory?

Jun 26, 2010

Create a copy of the file above and call it commands.sorted. Use the vi command to manually sort this file. I.e. use yy to copy a line, P or p to paste a line, and dd delete a line. Order the commands with the two lines starting with double quotes first. Then list the rest of the command in alphabetical order.

Anyone have any ideas what he's talking about? Can I copy a file and rename it at the same time while copying it to the same exact directory again? Now sure what the two lines things means either. I have an email out to him but it usually takes a long time for him to answer me. I got alot of work to do so everytime I get hung up it kills me.

View 2 Replies View Related

Server :: Unable To Copy Data To Remote Server Using Ncftp Command

Jul 16, 2011

I am unable to use ncftp command I have defined all variables used. i have to copy the data to another server FTPS. When i am executing this command it is throwing error

ncftp -u : option unknown

I am copying total script what i am executing in my server. Please some one tell me is there any pistake in using the ncftp command , or tell me some other commands to copy data to remote server

BAK="/opt/DBbackups"
NOW=$(date +"%d-%m-%Y")
FTPU="username"
FTPP="password"

[code]....

View 6 Replies View Related

General :: Copy A File From Windows With Scp Command?

Aug 18, 2010

I would like copy a backup file from image vmware linux to windows but i don't know how to process it ?i tried :scp /source/backup.tar.gz admin@x.x.x.x:/c:ProgrammefilesC:Documentsand SettingsAdminMyDocumentsbut error and i know that it's not like that, so if you have solutions

View 2 Replies View Related

Ubuntu :: Kill Copy File Command?

Jun 6, 2011

I started to copy a directory using Nautilus. I dragged and dropped a directory from my hosted server to my home drive. It got hung up, and wouldn't download. I clicked the red "stop operation" button, but I have a lingering icon in my upper panel saying that I still have file operations going on, even though it has supposedly stopped. How do I determine from the command line what this process is named and how do I kill it to remove the icon

View 4 Replies View Related

Server :: When Executed Last Command Its Showing System Ip Logged In Time And Logged Out Time The Output?

Feb 27, 2011

logging in a server through putty in the same network when i executed last command its showing system ip logged in time and logged out time the output as followsthis is my system
oot pts1 xx.xx.xx day month date time in time out timeand similarly am geeting other than this likeroot :0day month date time still logged in this is from more than 3 days its logged in

View 2 Replies View Related

General :: Copy Code From Text File To Command Prompt?

Dec 2, 2010

First I hope to undrestand my English word because Iam Arabic girl and not so good in English...

my problem is:

I wrote code in .c file and I run that code on the prompt command, its ture but I want after the out put copy the code on the command by some statment in the code , how can I do that?

View 3 Replies View Related

General :: Command Line - Move Or Copy Selected File

Jul 16, 2011

How do I move around select a file and move or copy it. All tutorials I have seen are not simple enough.

View 7 Replies View Related

General :: Copy A File To All Subfolders In A Directory Using A Single Command?

Jul 18, 2010

I'd like to copy a file, say widgets/water.txt, to all subfolders in the folder widgets using a single command. So if the folder widgets has 10 subfolders like widgets/blue, widgets/green, etc. I'd like to copy water.txt to all of them with one command.

I tried the commands

Code:

cp water.txt ./*/water.txt
cp water.txt ./*/

However these don't seem to work. The latter gives 'cp: omitting directory' errors.

View 7 Replies View Related

General :: Change A Files Modification Date "only" Without Changing The Time?

Oct 29, 2010

I'd like to change a files modification date "only" without changing the time. I'm aware of the 'touch' command but is seems like it only allows changing both the date and time, and not one of them. Any ideas on an easy way to change a file's modification date without also changing its time? (I have a long list of files and thus would like to run one to command to change them all)Example: Change a file's (month) timestamp from "2010-09-23 11:59:23" to "2010-10-23 11:59:23"Background: I accidentally set the wrong month on my camera and ended up with all photos having a modification timestamp with the wrong month.

View 3 Replies View Related

Ubuntu Servers :: Command Line To Copy File To Root Directory

May 12, 2010

I want to copy file from the Server cd drive and USB drive to the server root directory, but I haven't find any command of listing the cd drive or usb drive.

View 4 Replies View Related

General :: Copy The Contents Of A Txt File To Other Txt Files (with Similar Names) By Cp Command?

Jul 2, 2010

Code:
cp -r aa123.h aa*.h
results in
Code:
cp: target `aa456.h' is not a directory

Yes I read man page cp (1p). There is something written there about it, I couldn't understand though.

View 7 Replies View Related

Ubuntu :: Preserving File Timestamps On NTFS Partitions

Apr 5, 2010

I'm using two NTFS formatted partitions. One is internal and holds all my data. The other is on an external hard disk and is where I back up all my data to. What I'd like to do is copy all my files from the data partition to the backup partition and preserve all the windows' timestamps (including the file creation dates).How hard can this be? Well it appears that in the case of Ubuntu the answer is very hard indeed.I'm aware that Linux does not support the concept of a file creation date natively. However, according to the ntfs-3g website, all of the windows' timestamps (including the creation date) are mapped on to the system.ntfs_times extended attribute (link). So if you preserve the extended attributes when making a copy then, in theory at least, the timestamps should also be preserved.

I read on another forum that a file's timestamps will be listed (albeit in an unreadable hex format) if you run the following command:getfattr -h -e hex -n system.ntfs_times <filename>Unfortunately however, I just cannot get it to work. With every file I've tried I simply get a message saying "no such attribute".

View 9 Replies View Related

Server :: Synchronizing Server Time With Ntpdate Command In Cron?

Jul 14, 2011

we are synchronizing server time with ntpdate command in cron.how often should it run?

View 3 Replies View Related

General :: Command To Copy The File Practice.txt To A New Name Of Myfile.txt While In The Home Directory-found

Nov 15, 2010

-the command to copy the file Practice.txt to a new name of Myfile.txt while in the home directory-found
-command to create a directory in the home directory-found
-say i just created a new directory called "test". whats the command to delete the test directory.-found
-command to create a blank, text file without using an editor.
-the exact syntax in Linux you would need to rename the file to a new name-found

View 4 Replies View Related

General :: Command - List Only Access Time And File Name?

Mar 19, 2010

How do I list only access time and file name? For example if I do ls -l --sort=time then

[Code]...

View 5 Replies View Related







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