CentOS 5 :: Find - Mtime Does Not Work As Expected On Files?
Dec 1, 2010
I have some files on server with the date several months ago, but invisible for `find -mtime 7` search. When I list them as `ls -l` they look perfectly normal:
-rw-r--r-- 1 root root 347253 Jun 12 16:26 pedia_main.2010-06-12-04-25-02.sql.gz
-rw-r--r-- 1 root root 490144578 Nov 24 16:26 gsmforum_main.2010-11-24-04-25-02.sql.gz
"find -mtime" does not work as expected on files with different timezones?
View 3 Replies
ADVERTISEMENT
Dec 25, 2009
I need to delete all *.trc files that are older than 30 days and I am getting a "Argument list too long" error. There are other files that should not be deleted which is why I am using the "*.trc" and newer files need to be kept as well. I have seen other postings but they do not cover both of the conditions. Below are 2 of the many attempts at doing this but I cannot get this to work.
find *.trc -mtime +31 -print| xargs rm -f {}
find *.trc -mtime +31 -print -exec rm -f {} ;
View 3 Replies
View Related
Aug 12, 2010
I've got a script where I have to parse out the last modified time for a large amount of files. Piping the output for "ls" into "cut" seems to work most of the time, but the output is unpredictable.The "fields" argument doesn't find the date modified columns consistently, and using character count is as well since the output can vary in width depending on the file name
View 3 Replies
View Related
Feb 2, 2011
I am writing a bash script which includes the find (and rm command with exec) command the options -mtime -15 or +15 so that files older 15 days must be deleted from the home directory. I think that -mtime +15 should be ok, but in which case does the option -mtime -15 really come in handy?? go back 15 days until today's date?
View 1 Replies
View Related
Aug 12, 2010
Code:
$ ls -l
-rw-r--r-- 1 username vuser 35553 Aug 9 18:15 note.20100809_1815.sql
[code]....
View 3 Replies
View Related
Jul 6, 2011
I'm very very tired, worked all night long, and I did't sleep for hours... So I'm like a zombie now... half awake, and half asleep.
I was trying to clear a directory. Then I run the command cd to enter the directory, and then before thinking I run this dangerous command. on my Linux server: "find / -mtime +1 -exec rm {} ;"
I got a lot of:
Could this command have deleted something inside these directories? I'm afraid that the next reboot the server won't startup...
View 2 Replies
View Related
Jan 8, 2011
I am running ubuntu 10.04 on an emac powerpc. I go to the update manager and click on 'Update to Ubuntu 10.10', and then it starts the update and everything goes well until step 2 which is setting new software channels. It displays the error message:
W: Failed to fetch httports.ubuntu.com/ubuntu-ports/dists/maverick/Release
Unable to find expected entry partner/binary-powerpc/Packages in Meta-index file (malformed Release file?)
,E:Some index files failed to download, they have been ignored, or old ones used instead.
View 2 Replies
View Related
Oct 7, 2010
I am running following command- $ gksudo ./myscript
It doesnt do anything. If i run sudo, then it works perfectly fine.
View 4 Replies
View Related
Oct 28, 2010
I just installed Ubuntu 10.10 on a brand new HP EliteBook 8540w with an Nvidia card. To get the machine to work at all I have to use the proprietary nvidia driver. The downside is that when I use this driver gnome-settings-daemon seems to crash when I start the machine which results in a ugly theme. To fix this I have to run the following command:
Code:
sudo gnome-settings-daemon
After this the theme is re-applied. If I try to run gnome-settings-daemon as my regular user I get the following messages:
Code:
** (gnome-settings-daemon:2187): WARNING **: Failed to acquire org.gnome.SettingsDaemon
** (gnome-settings-daemon:2187): WARNING **: Could not acquire name
[Code]...
View 1 Replies
View Related
Jul 9, 2011
When I want to update with synaptic I get this error:Ophalen van ts/Release is mislukt Unable to find expected entry 'iceweasel-5.0/source/Sources' in Release file (Wrong sources.list entry or malformed file)Some index files failed to download. They have been ignored, or old ones used instead.
View 2 Replies
View Related
Mar 8, 2011
When i create a backup with yast using the option to manually create it, i select the file name /mnt/Backup/system-full-$(date +%F).tar which results later on in two files, the xml file and the tar file with different names:
for example
/mnt/Backup/system-full-2011-03-08.tar, /mnt/Backup/system-full-$(date +%F).xml
this is not acceptable. both files should have the same suffix. Is this the expected behavior or should i report a bug?
View 6 Replies
View Related
Feb 4, 2011
Well, this is a problem that keeps on coming, and I never found a solution: Maybe it is just me misunderstanding how it should work, but:
1) do you confirm that, as a member of the group "fuse", I should be able to read the file?
2) of course, I could change the permission of the file, or read it as sudo, but sometimes this is not possible. how to achieve it then?
View 7 Replies
View Related
Aug 30, 2010
I need to convert an int array into a char* array.
I'm using the following code:
Code:
But it returns me
Code:
View 14 Replies
View Related
Jun 22, 2009
CentOS 5.2. Openldap server-2.3.27-8.el5_2.4 I'm trying to get the server to do two things. One is allow authentication--that is, if a client is configured to use openldap for authentication, it should be able to access this server.
In other words, on machine_2, a client, doing getent passwd (as a quick test) will show the users in the openldap database. The more or less out of the box configuration works for this. However, as soon as I start trying to add ACLs, it stops working. For example, I want to restrict access to an address book which is also in the database. So I have
access to base.dn(changing base to subtree makes no difference) "ou=addressbook,dc=example, dc=com"
by users read by anonymous auth Now, even though this is just the address book, after that, an ldap client can no longer get the names of users in ou=People, and using the ldap server for authentication doesn't work.
I don't understand what I'm missing. ACLs are supposed to work first match wins. *IF* I add under that, access to * by * read, it will work, but the address book can then be accessed without a bind dn.
I am not sure what I'm overlooking. If I put in any sort of access control, the only way that clients can continue to use the server for authentication is adding that access to * (or to dc=example,dc=com"), by * read. I tried using access to ou=Group and ou=Peoplle by * read, thinking that would allow the clients to authenticate, but that doesn't work either, The idea is to allow any machine configured as a client to use it for authentication, but also to restrict viewing the address book only to those with a proper bind dn name.
View 4 Replies
View Related
Jun 20, 2010
I played a bit with the upgrade configuration files, to solve a couple of problems I have with Ubuntu 10.04, now when the upgrade procedure starts I getQuote:Failed to fetch Release Unable to find expected entry multiversdeb/source/Sources in Meta-index file (malformed Release file?)Some index files failed to download, they have been ignored, or old ones used instead.
View 9 Replies
View Related
Jul 8, 2010
New to CentOS5.5 I'm experiencing some trouble in order to continue my configuration. I've just installed my vmware tools and configured my network card with system-config-network
Edit eth0 (eth0) - vmxnet3 -> with a static IP I rebooted my server and since then I lost my eth0. I still see it in system-config-network, but I can't active it anymore.:
/etc/init.d/network start Bringing up interface eth0: Device eth0 has different MAC address than expected, ignoring. [FAILED]
View 2 Replies
View Related
Jan 2, 2010
I'm trying to upgrade from 8.04 to 9.10 via 8.10 etc. When I run update manager, I get this:
W:Failed to fetch [URL] Unable to find expected entry universal/binary-i386/Packages in Meta-index file (malformed Release file?), E:Some index files failed to download, they have been ignored, or old ones used instead.
and then it closes. I've unselected all the third party packages and tried various servers, but no difference. I can wget the file, but when I look at it I see entries for "universe/binary-i386/Release", but nothing for "universal" .
View 4 Replies
View Related
Jun 21, 2011
I m trying to write a program that use omapi but when put the include dhcpctl.h and isc/result.h i m but able to compile the source.
In file included from /usr/include/dhcpctl.h:38,
from rece.c:11:
/usr/local/include/omapip/omapip.h:40:22: error: dns/tsec.h: No such file or directory
In file included from /usr/include/dhcpctl.h:38,
[code]....
I tried to install bind-devel-9.3.6 and 9.3.4...and still no file...
View 5 Replies
View Related
Mar 21, 2011
I`m trying to install Intel EXPI9402PT PRO/1000 PT Dual Port Server Adapter on my machine. I download the drivers for this card from intel web page, but I can`t make it work. I`m running OpenSuse 11.3 version. When I tried to install it for the first time I got this message:
Makefile:71: *** Kernel header files not in any of the expected locations.
Makefile:72: *** Install the appropriate kernel development package, e.g.
Makefile:73: *** kernel-devel, for building kernel modules and try again. Stop
Then I install the kernel-source package and I got this one:
Makefile:107: *** Linux kernel source not configured - missing version header file. Stop.
I also installed kernel-devel package, but I get the same message.
View 9 Replies
View Related
Jan 23, 2011
New subversion user here. I've run into a nasty problem. It seems that nautilus chokes any time it tries to display a directory containing .svn files. There seems to be some sort of timeout involved per object under version control. The larger the directory, the longer it takes to display. I'm talking minutes here for a fairly ordinary sized directory.
Now I know that nautilus is painfully slow even at the best of times, but this is just ridiculous. These delays are crippling. I have no problem with nautilus and svn files on my work machine, which has centos. So it looks to me like something is misconfigured somewhere. And it is something specific to .svn files.
View 1 Replies
View Related
Dec 25, 2010
I am getting virtual-box repository download error as given below:
Code: Failed to fetch http://download.virtualbox.org/virtualbox/debian/dists/maverick/Release Unable to find expected entry non-free/source/Sources in Meta-index file (malformed Release file?) Some index files failed to download, they have been ignored, or old ones used instead. Repository: deb http://download.virtualbox.org/virtualbox/debian marverick non-free
View 5 Replies
View Related
Jan 19, 2011
For some reason, my Konqueror can't use Find Files. When I enter the parameters and then click find, the search instantly ends with nothing found, even when I know the item(s) exist. I do have kfind installed, and just tried reinstalling it and Konqueror.
View 5 Replies
View Related
Jun 24, 2010
I did the UPGRADE from Karmic Koala to Lucid, and everything was going well. But now I've been having problems with the UBUNTU UPDATE tool for the last 2 weeks. Every time I try to do an update check on the packages, I get the following message:Failed to fetch http:[url]....Release Unable to find expected entry deb-src/binary-i386/Packages in Meta-index file (malformed Release file?)
Some index files failed to download, they have been ignored, or old ones used instead.I've tried changing the servers to MAIN and others, and still no way to solve it. I've also checked for other posts, but haven't found a solution yet. Here's my SOURCES LIST (gksudo gedit /etc/apt/sources.list)# See http:[url].... for how to upgrade to # newer versions of the distribution.
View 3 Replies
View Related
Dec 26, 2010
i install kernel rpm after i boot that kernel network not working kernel name : kernel-rt-trace-2.6.24.7-132.el5.centos.i686 [URL] error "Bringing up interface eth0: Device eth0 has different MAC address than expected, ignoring."
View 1 Replies
View Related
Sep 11, 2009
I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:
wc `find . ( -name "*.as" -o -name "*.mxml" ) -exec grep -H HeightResizableList {}` ;
View 10 Replies
View Related
Jul 15, 2011
Is there a way to specify to find that I only want text files (and not binary files)? Grep has an option to exclude binary files, so I thought find probably has a similar feature, but I've been unable to find it.
View 2 Replies
View Related
Jan 25, 2009
I know how to search for normal files but can you let me know " How to search for 5 setuid files on the system. Also explain, for each file, why setuid mechanism is necessary for the command to function properly"
View 1 Replies
View Related
Aug 9, 2011
The find command does not seem to find all files in my directory hierarchy. My home directory is automounted from a server. The command to illustrate this is:find | sed -e 's/^.///' | sed -e 's//.*//' | sort -uThe result misses several directories. Likewise, a find of a particular file, like:find . -iname *sample* -printwhere sample_file.txt resides in one of the directories that is missing in the first find command, finds nothing
View 4 Replies
View Related
Oct 5, 2010
I know I can do find . -type f, but that includes binary file and I couldn't find a way to exclude them with find
View 4 Replies
View Related
Oct 11, 2010
I found this command that works great finding and replacing a simple string to another in files located in that folder and all sub-folders.
Code: find . -name '*.php' | xargs perl -pi -e 's/OldText/NewText/g'
The problem I have is that I need to replace a more complex string, like this: Old string: /mnt/stor6-wc2-dfw1/627896/982574/ New string: /mnt/stor8-wc2-dfw1/369587/302589/ There I don't know how to do it... since the / is what separates the old from the new strings, and the strings that I want to replace have / in it. Also, I would like to know how to specify under what folder replace the files, for example, I want that it search/replaces all files under /var/www/mysite/htdocs folder.
View 1 Replies
View Related