General :: How To Remove All Files That Created N Minutes Ago

Mar 4, 2010

I guess in most cases when extracting a tar achive ,we will get a directory with the same name as the archive file but different suffix. but in some unlucky case, as I met today, after extract a tar bar I find lots of files spread in the working directory, which is really nuisance.so what I want to learn from you is that how can I move thoes newly created files ? I know it should be some "find plus rm" fancy approch there, but I don't know exactly how.

View 3 Replies


ADVERTISEMENT

Ubuntu Networking :: Java Socket Connection Created In More Than 3 Minutes

Mar 7, 2011

I'm running Ubuntu 10.10. I have a problem with any client side network communication from any java based program/application. I've tried to run the following code:

Code:
public static void main(String[] args) throws Exception {
long start = System.currentTimeMillis();
Socket s = new Socket("ubuntuforums.org", 80);
System.out.println("1. connection created in "+ (System.currentTimeMillis() - start)/1000.0 +" s");
s.close(); start = System.currentTimeMillis();
s = new Socket("ubuntuforums.org", 80);
System.out.println("2. connection created in "+ (System.currentTimeMillis() - start)/1000.0 +" s");
s.close(); }

The result is the following:
Code:
1. connection created in 189.31 s
2. connection created in 0.085 s

I've tried both java-1.6.0-openjdk and java-6-sun-1.6.0.24 with almost the same results. During the extremely long 189 seconds, the processor is doing almost nothing (java thread has 0 %). I've tried also a wireshark to check what is going on, but the first packet was released after those 189 seconds. There is nothing in log files, I have no exceptions or errors, and the connections work (after the first long delay) just fine.

View 2 Replies View Related

General :: Can I Delete Files Created By Others In A Directory I Own

Jul 23, 2010

I created a directory somewhere with permissions rwxrwxr-x so that other users in my group can create files and directories in it.

I do need to be able to delete the contents in this "public" directory, but it seems that while I am able to remove any files in this directory I cannot remove and subdirectories under it.

Is there a way to remove such subdirectories owned by others under a directory owned by me?

View 3 Replies View Related

General :: Find Files That Have Been Accessed After They Were Created

Sep 10, 2010

With the find command it is easy to find files that have been modified or accessed within a given period. When a file is created, the acesss time is the same as the modify time. But as soon it is accessed (read), the access time changes, but the modify time does not. I need to find files that been accessed at all, ie. files which have access time newer than modify time. How do I do that?

View 2 Replies View Related

General :: Find And List Files Created In A Particular Year?

Jan 31, 2011

How to find and list files and directories present the current directory which were created in, say, years 2005, 2006, and 2009 and then move them to some other location, for example, /backup. Yes, I need to list them and move simultaneously. We can use:

Code:

find . -mtime n {};

but that n is troublesome for me to figure out files/directories created in years 2005, 2006, and 2009, for instance. Is there any way to match exactly by Year Value rather than calulating the "n" (days * 24 Hours)?

System Info:

SunOS 5.8 Generic_117350-06 sun4u sparc SUNW,Ultra-Enterprise

View 3 Replies View Related

General :: Set 775 Permission For All Newly Created Files And Folders

Sep 30, 2010

i am facing a problem regarding permissions. how can i set 775 permission for all newly created files and folders. when i give chmod -R 775 /data permission is getting to all files and folders. but when i create a folder i wont get that permission. i want this 755 permission should be permanent for all old and newly create files

View 7 Replies View Related

General :: Set A Directory So That All Files Created Below It Are Owned By Dir Owner?

Jun 8, 2011

I have a directory cookie_tmp which is owned by some:fella. Session cookies are being created under this directory as How can I set the directory so that files are created and owned by some:fella ?

View 2 Replies View Related

General :: Split Backup Created By DD Into CD Or DVD Sized Files

Dec 8, 2010

I am backing up parts of my computer with DD, and i was wondering if there was a quick way to split the files created into 4.4GB sized files that will fit onto a DVD. Anyone have any idea of how to do this?

View 6 Replies View Related

General :: How To Skip User Created Files During RPM Upgrade

Sep 4, 2009

I am trying to create an RPM package. However when the RPM package installs, it need to skip some files that might have been created by the user after the last installation and use of the program. Is there a way to build RPM package that just skips the user created content in the installation dir.

For example:
lets say my RPM package creates the following dir and creates files required by my application, say .app files.
/ppm/config/

However the user may also create a few .xml files in the same dir. How will I package my program that will not delete the .xml files from the above dir and will just create the application files (.app files).

View 2 Replies View Related

General :: Change Umask For Files Created In Ext2/ext3

Oct 28, 2009

I have ext3 partition mounted on /mnt/shared/ as follows

Code:

Permissions above are of the actual mounted fs.

Goal is to have all files created on the fs
1) to belong to group 'users'
2) to have this groups permissions set to rw (rwx for directories) so that all users who belong to group 'users' have full read/write access to data and everyone else to have only read access.

Now because of setgid bit (s) in group permissions every file created has group 'users' and additionally setgid bit is set for directories. Because every users umask by default (on my system) is set to 0022 all created files will have permissions 644 for ordinary files and 755 for directories.

Net result of above means that users A and B who both belong to group 'users' won't be able to modify files created by the other.

So how can I make files created on the fs to be created always with umask 0002 WITHOUT changing default umask for users that is used elsewhere (like in their home directory) ?

View 1 Replies View Related

General :: Use Grep Command To Filter The Log Files Created Between 3:00 PM To 4:30 PM In Buch?

Dec 13, 2010

I would like to know how to use grep command to filter the log files created between 3:00 PM to 4:30 PM in buch of log for whole day in different headings. This files resembles like sar file in linux.

View 5 Replies View Related

General :: `mencoder` Captures 10 Minutes Of Audio In Less Than 10 Minutes?

Mar 15, 2011

I'm using mencoder to capture audio from a Encore ENLTV-FM3 video capture device. I have recently noticed that, since one week ago, when the machine was forcibly restarted due to a power outage, all recordings are slightly pitched, they play back slower than they should.

I narrowed down the problem to the following command line:

$ time mencoder -really-quiet -tv driver=v4l2:device=/dev/video1:chanlist=us-cable:audiorate=32000:alsa:adevice=hw.1:input=0:amode=1:normid=11 -endpos 00:10:00 -ovc copy -oac pcm -of rawaudio -o test-32000.wav tv://69
real 9m54.886s
user 0m5.536s
sys 0m1.740s
$ ls -l test-32000.wav
-rw-r--r--@ 1 martin martin 76800000 Mar 15 17:20 test-32000.wav

Somehow, mencode managed to gather precisely 10 minutes worth of raw audio in 9m 55s. That's not physically possible, unless the capture device's A/D converters are "overclocked". I can't think of any other explanation besides hardware failure. Can that be? Could it be that something got burnt during the power outage and now the capture device's internal clock went nuts?

Since the machine's restart, I've also noticed dmesg is flooded with entries like this:

CE: hpet increased min_delta_ns to XXX nsec

Which seem to indicate that the computer's high precision event timer is somehow out of sync. Does this have to do with the audio issue? Can it be that the audio converter's sample rate is linked to the HPET? I'm totally lost here. Has anyone bumped into something similar?

View 2 Replies View Related

General :: Check From Application Serverthat Is There Any New Files Created Today In The AAA Directory?

Aug 16, 2010

I have backup_server and application_server.backup_server has directory AAA. I need to check from application serverthat is there any new files created today in the AAA dirctory. if yes, all files were created today or partial files?.

View 10 Replies View Related

General :: Bash Shell Script To Check / If Empty Files Are Being Created & Start Process

Jun 25, 2010

I have an Ubuntu server in which a file is dumped every hour and a new file for the next hour and the process continues. If there is any problem due to which the creation of file stops then empty files are created every minute till the process is killed & started again. I need help to make a shell script to check if the empty files are being created and then kill the process and start it again.It would be a great help if anyone can help me regarding this.

View 9 Replies View Related

Ubuntu :: Remove 2GB Virtual Drive Created With Qemu?

Jan 23, 2010

I installed Windows XP on my system using QEMU as a 2GB virtual drive in my home directory. I don't want to have it anymore, however I can't get rid of this 2GB used space with windows XP. I can't even delete QEMU, because the command sudo apt-get remove qemu tells me that package qemu is not installed. (however it is there, works, and is able to start Windows XP as usual).

How can I get rid of this qemu/Win XP and have 2GB of my home folder available again?

View 1 Replies View Related

General :: Desktop Environment As Root - Files Created By The Desktop That Could Compromise The System

Jul 20, 2011

a server at work has been accessed through the desktop environment as root. I know this is a risk and since I have never done it before I was wondering if there are any files created by the desktop that could compromise the system and how could I clean it up.

View 2 Replies View Related

General :: Files (system & User) Created After Login To System In RHEL 5.0?

Jun 4, 2010

How to find, what are the files (system & user) created after login to the system in RHEL 5.0?
Any single command available?

View 1 Replies View Related

General :: Files Created In A Directory Owned By Directory Group?

Jan 29, 2010

Is there a way, on Linux, to cause all new files created in a directory to be owned by the directory's group instead of the creating user's group?

View 2 Replies View Related

Software :: Selecting Last 60 Minutes From Log Files?

Apr 9, 2009

I'm monitoring 20 asterisk servers and I've developed a small php utility that displays me their errors when they happen.Currently I'm using the something like this:tail -5000 /var/log/asterisk/full | egrep -i "ERROR|WARNING" > errors.logThe problem with this is that some servers are getting more traffic then others resulting that on one box 5000 lines might last 5 hours and on another 5 minutes. And as such what I see on the screen might be outdated by a few hours or scrolls too fast for me to see.I'd like to know what would be the most efficient command to extract only the last 60 minutes and perform my egrep on that. Cron is setup every minute.Here's a sample of the log format:

Code:
[Apr 9 08:21:38] VERBOSE[13499] logger.c: Found request for channel [1239279644.1537]
[Apr 9 08:21:38] VERBOSE[13499] logger.c: CTI Asked for EXECAPP on channel [Zap/16-1],

[code]...

View 5 Replies View Related

General :: Remove Files Which Have A Certain Syntax

Jan 23, 2011

I have a couple of files which follow this syntax:

*_yyyy-mm-dd_hhhmmm.*

Example:

*_2010-01-01_00h10m.*
*_2010-01-01_01h10m.*
*_2010-01-01_02h10m.*

[Code].....

and delete the others. or maybe move them to a subdirectory to be safe...

View 2 Replies View Related

General :: Unable To Remove Files Using Rm -rf *?

Jun 22, 2010

Output of my terminal:

linuxx86:110$ rm -rf *
rm: cannot remove `dttscopeger.dir/.nfs00000000012821280000ec25': Device or resource busy
rm: cannot remove `dttscopeger.dir/.nfs00000000015561050000ec26': Device or resource busy

[code]...

View 6 Replies View Related

General :: Remove Directories That Only Contain .txt And .log Files?

Aug 8, 2010

I'd like to remove all directories of a certain depth that don't contain .txt or .log files -- is this possible? So far I have: find ~ -mindepth 3 -maxdepth 4 -type d -exec rm -r '{}' ; Is it possible to add in "only if the directory doesn't contain .txt and/or .log files"? Or do I have to start learning perl to do that?

For example:
dir 1:
hello.txt
runme.sh
dir 2:
runme.sh
oct12.log
[Code]....

View 13 Replies View Related

General :: Remove Temporary Files?

Apr 11, 2010

me with proper syntax / command to remove temporary files in linux

View 9 Replies View Related

Ubuntu :: Where To See When Files And Folders Were Created On System?

Jan 18, 2010

I can't figure out where to see when files and folders where created on the system. All I can see in Gnome and the terminal is the modification time. I also want to see the last access time.

View 2 Replies View Related

Ubuntu :: Stop Files Being Created On Desktop?

Oct 2, 2010

Everytime I open a drive, an icon shows up on the desktop. i hate that! i want a clean desktop free of icons so i can put pretty widgets and all that other junk . how do i stop this from happening?

View 2 Replies View Related

Ubuntu :: Cannot Delete Files Created By Scalpel

Nov 23, 2010

I ran Scalpel to retrieve some files from an old HDD, what I didn't realise is how much larger the output from Scalpel is than the original disk space.

So what happened is at about 5% of files carved (pass 2/2) my disk space was full and the program aborted.

Then when I rebooted Ubuntu I can't get in unless using Recovery Mode.

I think this is because there is no disk space left. The error I get is to do with Gnome Power Manager not being configured, I never had this error before.

So I went into CLI prompt and performed 'find -maxdepth 2 | grep *.mpg' and I can see a tonne of mpg directores called ./~/mpg-1-6, ./~/mpg-1-7, etc, and they all have lots of files.

Now I have no way of deleting these, I tried using 'sudo rmdir */*mpg' and it cannot find the directory.

When I go to my home folder and 'sudo ls -al' these aren't listed.

The only way I can see them is using the 'find' command.

Can I chain the find command with a delete command somehow?

View 9 Replies View Related

Red Hat / Fedora :: Created A Script To FTP Some Files From A RHEL Box To A EMC NAS?

Jul 9, 2010

I've created a script to FTP some files from a RHEL box to a EMC NAS and the script works because if I run it script manually it runs fine and transfers the files to the NAS but when I schedule it in the crontab the script runs but it doesn't transfer anything and I pipe the output of the cron job and I see message about 'passive mode refused' and lib: not a plain file, sys: not a plain file, etc...I did a vi ~/.netrc which contains the a single line of "machine xxx.xxx.xxx.xxx login ftpuser password xxx"

My script looks like:
/usr/bin/ftp -i xxx.xxx.xxx.xxx <<EOF
cd ftpdir

[code]....

View 2 Replies View Related

Programming :: Looking For Last Five Files Created On Hard Disk

Aug 4, 2010

Kernel 2.6.21.5, GNU (Slackware 12.0).
Bash 3.1.17.

I want to search an entire subtree of /, in the file system, for all files, with extension html, created on the hard disk. In addition, these have to be the last five created. I think I could split the problem into two parts: (a) Forget about the last condition. Then this is a job for the find command. (b) Sort the output of find using the date as the key, then use 'head' to print the desired output. But even two such simple steps are enough to justify the writing of a shell script. And here lies my weakness.

My script writing knowledge is rudimentary. What's the final purpose? Well, I lately saved four or five LQ pages onto disk containing information I consider valuable to me. But I don't exactly remember where on the disk. Then: either the problem posed is really of a very simple nature or it is not, in the latter case a script being mandatory. One of the algorithm drawbacks (the one described above) is that find may be running a great deal of time. My machine resources (RAM and CPU speed are low) are scarce and there possible are a large number of HTML files on the disk.

View 8 Replies View Related

CentOS 5 :: Why Do Files Created Via Samba Have Nobody Ownership?

Apr 21, 2011

files and directories are NOT being created with consistent ownership and permissions: when created via Samba, they are created with user/group = nobody, and when created via the OS, they are being created with user/group = root.This causes problems with our automated tools that access the server (via Samba) and do a variety of file system operations (which need root privileges).How do I cofigure Samba so files/directories are created with user/group = root?

View 3 Replies View Related

General :: Remove All The Files Which Has A String In A File?

May 8, 2010

I am trying to remove all the files in a directory hierarchy which a certain string inside the file (not the file name, it is the file content).

I can list out all the file name which has a string in the file using 'grep -r -l mystringlooking for'.

But how can I remove all the files returned by the grep ? I am trying this on ubuntu.

View 1 Replies View Related







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