Programming :: How To Know A File Is Modified
May 3, 2011
I want to know what system call is used in linux C programming is used to know whether a file is modified. I know that make utility compiles the file using the modification dates only. I want know how to find whether the file is modified or not.
View 4 Replies
ADVERTISEMENT
Jul 9, 2010
I am new to Scripting. I am trying to find out particular file is modified in last one hour or not in script and then if that file is modified in last one hour i need to copy that file to another directory.Can any one please provide me how to check the file is modified in one hour or not?
View 3 Replies
View Related
Jan 11, 2010
I need to get the modified date on a file in linux to use in a script.I tried using 'ls -l' on the file, but this caused problems when the date turned from a single digit into a double. The reason for the problem was because I was parsing the result string on spaces.How can I get the date of the last time a file was modified so I can use it in a script? For example, if a file was modified on 1/11/2010, I need the 11.
View 2 Replies
View Related
Mar 30, 2010
I need a shell script that will add the users name and date to a file when the user has modified the file, these files are within a group and only accessible to this group. But we need a way for people in the group to know who and when the file was last modified.
View 1 Replies
View Related
Mar 1, 2011
In /etc/default/rcS I have set FSCKFIX=yes. This solves a recurring 'no init found' problem that prevents my machine from booting. Occasionally however, the setting reverts (by itself somehow) to FSCKFIX=no. Thus my machine cannot boot. Is there a way that I can prevent this file from being changed?
View 1 Replies
View Related
Jan 27, 2011
I use RadHat Linu5.We usually log in to LINUX via putty (remote). Very often many people use the same user and password to log in.I wonder how to tell who has edited/modified a file?
View 9 Replies
View Related
Oct 28, 2010
I checked the smbclient man but could not find any switch to us in combination with 'get' to check if the file has been modified before download.
View 1 Replies
View Related
Jan 27, 2011
I use RadHat Linu5.
We usually log in to LINUX via putty (remote). Very often many people use the same user and password to log in.
how to tell who has edited/modified a file?
View 9 Replies
View Related
Aug 20, 2010
How do you find a file modified March 17, 2010, between 3:30 pm and 4:05 pm? I know that I must be missing something somewhere.How do you search for info like this? I goggled "search files time Linux" and got about 38,300,000 results. I looked through the first four pages and did not see what I was looking for.Do I need to calculate how many minutes ago that is and give that to find.I really want to do this in the GUI so that I can operate on the files found without typing in so much stuff.
View 1 Replies
View Related
May 28, 2010
I need to write a script that is given a directory as an argument, and it prints the last modified file from that directory and all its subdirectories.
for example:
$ newest /usr/etc
--> /usr/etc/httpd/httpd May 28 12:16
If I had to do it only for the current dir, it would be easy...I'd probably use "ls -lt" and then show only the first line...
View 1 Replies
View Related
Jan 12, 2011
I have a Redhat server that it is allowed rcp file from remote server, it is strange that after I modified the .rhosts, the server is no longer to accept rcp file , even I use other user to rcp files , the error is still "Permission denied", can advise what is wrong ? what daemon that I can try to restart ?
View 5 Replies
View Related
Jan 27, 2010
I'm using Bluefish on my laptop to modify files on my desktop web server. The machines are networked with samba. Every time I save the files, I'm prompted with this window that says: File has been modified by another process. It gives me the option to cancel or overwrite. It's the only program that does this. I can click on overwrite and that works, but it's pretty annoying.
View 1 Replies
View Related
Jul 6, 2011
Prior to making a fresh install of 10.04, I made a back up of all my documents by copying them to a NTFS partition. I did this my selecting files in File Browser, then right clicking and selecting the Copy command.
When I came to move the files back after the fresh install, I was mortified to find that all the file modification dates had changed to the date I copied them! I've lost all the original file dates, which was the principal way I sorted my files. I guess there's no way of getting it back? It seems that Linux does not store File Creation dates either so I'm stuffed.
View 3 Replies
View Related
Jun 17, 2011
I have two linux servers, they are backup together.
1. Server 1 have 3 files with name: file1, file2, file3 in the path: /etc/sysconfig/network-script/.
2. Server 2 have 3 files with name and path are the same as server 1.
- How to make a script to copy 3 files at server1 to overwrite on server2. But before overwrite, this script will check and compare the last modified date of these 3 files(on server1 and server2). if the modified date of file1, file2 or file3 on server1 is newer than 3 files on server2 then overwrite process will do, if not, will do nothing.
- see my script as below: it works find now but just overwrite. not check last modified date.
View 1 Replies
View Related
Apr 16, 2011
i accidently modified my file system of some partition in my hard disk from ntfs to fat...i havnt formatted the drive...but now i cannot mount this partition...
View 1 Replies
View Related
Nov 18, 2010
I am actually modifying someone else's script and I need some help. The original script rotated image files to the left but it changed the "modified date stamp" which is something I didn't want.
Code: #!/bin/bash
while [[ -n "$1" ]]; do
#if a file and not a dir
if [[ -f "$1" ]]; then
#the images that I copy from my cell phone don't have exif headers #so I am using the -mkexif switch first to match the exif information #to the "created date" in the .jpg file. jhead -mkexif "$1"
[Code]...
It's important to note that the original script, before I made any edits, did not have this quirk whereas I needed to "touch" the file to get it to orient itself correctly. The 'original' script is in black; my additions are in blue.
View 4 Replies
View Related
May 8, 2011
Today I installed KDE 4.6.3. (OpenSuse 11.4). With this version a modified oxygen icon set was installed. Some icons, e.g. folders, are looking very ugly. They are looking a little bit like Tango icons. This mixture of original oxygen icons and the "tango-oxgygen" ones looks very inconsistent. You can repair this by installing the KDE 4.6.0 oxygen icon set (oxygen-icon-theme, oxygen-icon-theme-scalable) coming with OpenSuse 11.4. Yast is showing some problems regarding KDE 4.6.3. you can ignore them.
View 9 Replies
View Related
May 4, 2011
I have very strange problem - trying to install 11.4 (64bit) on my VMware 7.1 - the installtion works, only I have no chance to change anything, it simply takes over and doesn't let me do any modification. The installtion panels look totaly different compared to the installtion manual.
Is there some known problem? What do I need to do to stop that?
View 6 Replies
View Related
Sep 2, 2010
Possible Duplicate: Linux equivalent to robocopy? I have two websites - one is basically a development version and the other is a production version of the same site. So I'd like to be able to merge the changes made to the development site based on the modified date of the files. Is this possible with the 'cp' command?
View 2 Replies
View Related
Aug 18, 2010
I was trying to disable touchpad click, added a section to /etc/X11/xorg.config, and now the OS never starts up, the laptop just runs... This is my second day with the machine, I've done a ton of setup but haven't yet setup a backup utility... is there any way for me to just go in and change the file back to the way it was?
View 3 Replies
View Related
Aug 7, 2010
I was just curious to know where you submit a new or modified distro after making one. Not that I did--I'm not a programmer. But is there a particular place you submit a distro to, or do you just find some website to host it?
View 2 Replies
View Related
Apr 27, 2010
I'm using slack13 and have changed entry in inittab from
Code:
id:3:initdefault:
to
Code:
id:4:initdefault:
to login straight to window system. However after that sound is gone. When I go to mixer it says that audio device cannot be used 'might be access problem'. So I've changed entry to what it was and starting X11 by 'startx' and then sound works again.
View 14 Replies
View Related
Jul 31, 2009
I have a big pb after installing F11 : my partition containing all my photos is now unmountable. Before installing F11, it was in ext3 filesystem
During installing F11 on sda1 (first hard drive), I noticed some strange error messages like "volume doesn't exist" or something like that.
now, when I try to mount my partition of my third hard drive, i get this :
Code:
[root@vincent vincent]# mount /dev/sdc1 /home/vincent/sdc1
mount: type inconnu de systme de fichiers 'lvm2pv'
which means "mount: filesystem type unknown 'lvm2pv' "
[Code]......
View 10 Replies
View Related
Dec 2, 2010
How can I search files modified in a specific day?
View 2 Replies
View Related
May 23, 2011
I want to upload files from my computer to an FTP site and I don't want to upload files that are already on the server. So I need a tool that finds out which local files that are different from the ones on the server, or that don't exists on the server.
Some requirements:
I'm using a cheap provider that does not support rsync or ssh, so I can only use FTP. I generate the files before uploading them, so comparing timestamps is meaningless. I've tried lftp with the mirror command. It's slow (I think it uploads all the files). I upload the files from different computers, so I can't use sitecopy, which uses a local database to keep track of which files are on the server. I'd like to be able to upload all changed files with one command. Preferably no GUI application. And it needs to run in Ubuntu.
I was thinking about creating a tool similar to sitecopy, but which stores checksums of all the files on the FTP server on the server itself. But then I thought that there may already be such a tool.
View 1 Replies
View Related
Jan 22, 2011
How can I make copy only files the have been modified today
as far as get
Code:
find myworkingfolder -ctime 0|xargs -i cp {}-ap bakupfolder
Is it ctime or mtime? and how i add this command to crontab?.
View 2 Replies
View Related
Jul 23, 2010
I need to know the last 10 modified files in a folder.
View 8 Replies
View Related
Feb 20, 2010
I am searching for a program which may be used in order to display a list of modified (non-distribution-default) configuration files. For example, assume we have installed package "example-utility" which uses /etc/example-utility.conf as one of its configuration files. The package provides a default configuration file upon its installation. Assume we have modified /etc/example-utility.conf according to our needs. This file should be included in the listing produced by the program I am looking for.
If such a tool does not exist, I would like to create it. However, I am new to RPM-based systems, and, as such, I am having difficulties finding the necessary documentation. Should I be reading the yum source code? Is there some sort of document describing the package database on RH/CentOS/etc. systems and how 3rd party applications are supposed to work with this database?
View 6 Replies
View Related
Mar 10, 2011
I have CentOS 5.5 running as a desktop, on Live USB with persistent overlay. It's been working great since January. However yesterday I noticed something strange. Almost all the binary files, including those under /bin, /sbin, /usr/bin, and /usr/sbin, have been modified, compared to the originals in squashfs.img (I mounted squashfs.img and did a "diff -r" comparison). The timestamps all remain the same, but the sizes of the binary files have been increased by a typical 1 - 3 KB.
The system has never been updated, other than a few minor package installations via yum. It's running behind a firewall with no services except an SSH server on a non-standard port. Checks on log files etc. didn't find anything suspicious, and chkrootkit turned up nothing.
View 4 Replies
View Related
Nov 30, 2010
I have a simple scripting question. I am trying to list all files that have been modified in the last day and then collect metadata on those files. This command is going to be run on a number of nodes via ssh so I would like to append the hostname to start of each line (the below example has blade1 as the hostname). As you can see the loop is splitting the ls command out onto a separate line for each value. What I need to do is keep the `ls -ld` output all on one line and have the hostname echoed in front of each line.
for i in `find /var -mtime -1 | xargs ls -ld`; do echo `hostname` $i; done
blade1 drwxr-xr-x.
blade1 2
blade1 user
blade1 group
blade1 4096
blade1 Nov
blade1 30
blade1 08:55
blade1 /var/cache/gdm/user
View 8 Replies
View Related