General :: Find Directory With Frequent Writes And / Or Deletes?

Jun 20, 2011

Is there a way under linux to find out directory with frequent writes and/or deletes?

I'm using Ubuntu and recently bought SSD. I moved /tmp to ramdisk and did some other tweaks to avoid wear. But I was wondering if there's a way to pinpoint hotspots in filesystem where files are often written. For example webserver's log directory with many appends every minute or user's download directory where he downloads gigabytes of stuff only to be moved elsewhere soon after finishing.

I came across inotify which could probably do the trick but it seems it'd require lot of scripting which I'm not very familiar with

View 4 Replies


ADVERTISEMENT

General :: Whenever Execute The Below Scriptlet With Out Proper File Name It Deletes /tmp Directory?

Jul 22, 2010

Whenever execute the below scriptlet with out proper file name it deletes /tmp directory .I guess this is because value of variable a didnt get initialized and there for rm -rf /tmp/ get executed and entire /tmp directory get deleted.How would i avoid any empty variables to be used in script? as this is a classic case of destructive script.

Code:
#!/bin/bash
echo "Enter file to delete from tmp"

[code]....

View 8 Replies View Related

Red Hat :: Why Rpmbuild Deletes The BUILD Directory

Apr 15, 2011

I'm using rpmbuild 4.8.0 to build my rpm package on RHEL6. The spec file works just fine with any other Linux Releases, including RHEL5. But at the end, build failed with:
"shell-init error retrieving current directory: getcwd: cannot access parent directories: No such file or directory" I found that rpmbuild tried to compare the BUILD directory with the root filesystem, it will delete the BUILD directory if it's not '/'. My working directory is /tmp/test, so something like this in the /var/tmp/rpm-tmp file:

Code:

cd "/tmp/test/BUILD"
[ "RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"

I think this is the reason why the command failed. And I can't find the two lines of similar code in an earlier version of rpmbuild on RHEL5.

View 5 Replies View Related

General :: Find Directory Older Than X And Mv Directory With Sub Files Command?

Jul 13, 2011

I'm quite new to linux but I have configured a simple ftp server and it's working great. I have a FTP-Shared folder with upload and download subfolders. Under upload's and download's I have identical category subfolders like mp3's, movies, software etc. in both. As the guy's upload, I would like to create a line crontab where I can move all the content under /FTP-Shared/upload/mp3/* older than 14 day's to FTP-Shared/downloads/mp3/ recursively (Like in cp command), but the timestamp must be searched on the first directory and not sub files example: /mp3/Club Dance/CD1/Hallo world.mp3This is how far I got:[root@clients ~]# /usr/bin/find /FTP_Shared/upload/Mp3s/ -depth -mindepth 1 -mtime +14 -type d -exec mv -f {} /FTP_Shared/download/Mp3s/ ;This command moves the directory and files, but it is not recursively

View 4 Replies View Related

General :: Where To Writes The Commands

Feb 1, 2010

where to writes the commands if i am using fadora 11?

View 2 Replies View Related

General :: Frequent Crashing On Ubuntu 10.10 / Fix It?

Jan 17, 2011

First post here, some really useful information on the site especially for a Linux newbie like myself.

I installed Ubuntu 10.10 after Vista on a Compaq desktop not dual boot and with a completely blanked HDD, which although not the most powerful of desktops has an intel pentium dual core processor and a decent enough graphics card, enough to surpas the system requirements for linux anyway. After installing there has been alot of freezing, particularly when loading alot of programmes. It either freezes the screen completely so I cant do anything whatsoever and have to turn the computer off manually, or flashes a blank screen then goes back to the page I was previously on. However when it does this, the mouse works, but nothing responds, no keyboard shortcuts or anything. I have a feeling it may be the computer not the OS.

View 5 Replies View Related

General :: Read - Writes Are Slow On NFS

Oct 23, 2010

Read/writes are slow on NFS.How can we diagnosing the issue, what commands are used for the error finding

View 8 Replies View Related

General :: Desktop With Less Frequent Release Schedule?

Sep 13, 2010

I just want to know the distribution which is supported for longer time ex: Ubuntu will be supported for 18 months fedora for 14months. I repeat,I want a distribution which is stable,which I can leave without upgrading to next version for atleast 2 or 3 years. tell me other than Ubuntu LTS version

View 5 Replies View Related

General :: Ldconfig Deletes The Link That Create Using Ln -s In /usr/lib?

Nov 9, 2009

I created a link for a library my application needs in /usr/lib/ and then run ldconfig.
The link gets deleted. Should I be creating the link in any other way?

View 1 Replies View Related

General :: Monitor Disk Reads Versus Writes?

Jul 2, 2010

We are graphing various system parameters using Cacti. One of our graphs shows hard drive reads and writes. A question came up: why do we need this graph?

View 3 Replies View Related

General :: Debian Sqeeze Pressing E Key Writes 0128

Mar 8, 2011

I hav Debian Sqeeze, and not knowing what I did, it suddenly starts to consider all pressing of e key as 0128. Also some other key, which I don't know currently. I use different layout, however it happens on others too.

View 2 Replies View Related

General :: Find And Copy In The Same Directory

Sep 1, 2010

I installed a new music application. It reads covers.jpg as the cover of the album, however, my covers files where named album. I dont want to rename, I want to make a copy of album.jpg and if possible as well rename it to covers.jpg. The file has to be in the same folder that it currently is. I have looked around to see how I can do this but have not been able to.

View 14 Replies View Related

General :: Cannot Find Zipfile Directory

Feb 22, 2010

zipinfo: cannot find zipfile directory in one of /home/jimmy/Downloads/GenuineCheck (1).exe or /home/jimmy/Downloads/GenuineCheck (1).exe.zip, and cannot find /home/jimmy/Downloads/GenuineCheck (1).exe.ZIP, period

What does this mean I am not able to download anything

View 1 Replies View Related

General :: Find A Particular String From A Directory

Jul 27, 2011

I want to search a particular string in a directory , that directory contains N number of subdirectories, and files and my requirement is inside the directory and subdirectory what are the files contains particular string like "TBone" i want to display that files. Is it possible to do that..

View 8 Replies View Related

General :: Find And Replace Command For Whole Directory

Aug 17, 2011

Is there any command in Linux which will find a particular word in all the files in a given directory and the folders below and replace it with a new word?

View 4 Replies View Related

General :: Find Current Thunar Directory From CLI?

Apr 20, 2011

Is it possible to find out the directory Thunar is currently displaying from the command line? I will only have one instance of Thunar open at one time.

View 3 Replies View Related

General :: Find Number Of Files In A Directory?

Feb 22, 2010

i need to know how to find number of files in a directory? is there any system calls in fedora 12.And i need to know how to perform a operation if the that count increases by one?

View 14 Replies View Related

General :: Find Files In A Directory That Contain Numbers?

Mar 1, 2011

I am trying find files in a directory that contain numbers. I have tried ls /etc *[0-9]* but that doesn't work. If I cd to /etc and run ls *[0-9]* it almost works but it also includes results from within files. My last thought was to try: find /etc [0-9] -type f but this does not work either. My second problem is that I am trying to get list of files in a directory that were changed less than 10 hours ago, using grep, while leaving out directories. I am completely stuck with the second problem.

View 8 Replies View Related

General :: Can't Emacs On Mac OS X Find Information Directory Node / Why Is So?

Feb 15, 2010

The default Emacs on Mac OS X, 22.1, appears to have some problems with the info/help stuff.

When you hit C+h i, it says:

Can't find the Info directory node.

It works in AquaEmacs, but I downloaded the 23 version of emacs precompiled binaries from here and I still have the same problem.

View 2 Replies View Related

General :: Find Document Files And Copy Them To Another Directory?

Nov 7, 2010

This is a bit of a basic question but I'm trying to copy all .doc files I find in a directory and copy them to another directory.I know each command:

find -name '*.doc' .

and:

cp filename location

how can I combine the two commands?

View 3 Replies View Related

General :: Directory - Find Folder Inside Sub Folders

Jan 21, 2011

I am trying to find a directory named 480debugerror nested under child directories. I don't know the exact path, or even if I have the exact spelling of the directory I ant to find.

Is there any linux command to find directories with a given prefix or suffix, for example directories with a name of debug or debugerror, with unknown some prefix or suffix?

View 3 Replies View Related

General :: Find The Directory With Latest Modified Content?

Sep 29, 2010

how to find the latest modified directory. I know that the command 'ls -rtl' gives the latest modified file/directory at the end. But my specific requirement is: If I create two directories named dir1, dir2 in the same order. so now my latest modified directory is "dir2". Now inside each directories, I created a file. Now in the last, I modify the file in "dir1". So overall, the content of dir1 got modified recently. If I use the command 'ls -rtl', this will still show dir2 as latest, as it is created recently. But I want the directory in which any internal content at any sub-hierarchy modified recently. so with what linux command I'll get this latest modified directory (dir1)?

View 3 Replies View Related

General :: Find A String In Files Under The Current Directory?

Oct 5, 2010

Assumed y directory structure looks as follow:

Code:
--root
-- dir1
-- dir1-1

[code]....

And under each sub dir there are some log files ended with .log. Now I know how to list all these log files with:

Code:

find . -type f -name "*.log"

Assumed now there is a string called "Hello World" inside some of these files. How can I find out these files? I try followings but failed

Code:

grep "This is" | find . -mtime 0 -type f -name "*.log"

View 4 Replies View Related

General :: Find All First Level Subdirectories Under The Current Directory?

Jan 24, 2011

1. How can you find all first level subdirectories under the current directory?
2. How will you show the last 100 lines of the file "foo.log"?
3. How will you Stream the contents of a the log file "foo.log" as it gets written to?
4. How can you grep for a pattern on a gzip'ed file? e.g., find "foo" in bar.gz
5. Find all lines in the file "foo" which DON'T have the pattern "bar"
6. Your web server is running very slowly. If you can login to the server, what command will you run to find out cpu and memory use?
7. Extract the file foo which is a part of the tar'ed, gzip'ed file bar.tar.gz
8. You attach a usb disk to your linux desktop, but it does not show up. How can you get more information about the error?
9. What is the secure way to login to remote systems?
10. What is the difference between TELNET and SSH?
11. Given a file 'a' with the following permissions -rwxrwxrwx 1 rohit rohit 0 2011-01-24 13:30 a Change its permissions such that it is only readable and writable by its owner, not accessible by anybody else in the group and only executable by the world
12. Difference between using ' and " for quoting a string / command in a shell
13. In the attached text file (test.txt) replace all occurrences of 'red' with 'yellow' without using an editor (i.e. from the command line)
14. How would you suppress output written to stderr by a command
15. Meaning of the #! notation in scripts e.g. #!/bin/sh
16. What is the output of the attached shell script test.sh Scripting questions, all based on the attached file access.log. Use one of perl, python, ruby, or shell scripts to solve these questsions. If any answer is obtained using just the command line, please include those commands as well.
17. How many accesses were made between 10am and 11.30am on Jan 24, 2011?
18. How many unique IP addresses accessed this server?
19. For every IP address which accessed this server, output a report showing number of hits for every type of HTTP status. For e.g., IP 192.168.1.20 has 164 hits with status 404 and 1690 hits with status 200.

View 8 Replies View Related

General :: Program That Reads Multiple Pipes / File Descriptors And Writes To Standard Output

Feb 23, 2011

Is there already a program that reads multiple pipes or file descriptors and writes to the standard output (not splitting lines).Like cat, but reading all files simultaneously and preserving lines.It is needed to avoid coding of select/epoll loops or using multithreading in simple programs. Like "select loop for bash".

View 1 Replies View Related

General :: Unable To Find Directory Listed In /etc/crontab File?

Feb 10, 2011

when a script in /etc/cron.d directory will be executed?. I know that scripts in cron.daily will be executed daily [ set in /etc/crontab file]? Cant able to find this directory listed in /etc/crontab file?

View 2 Replies View Related

General :: Find Files With Specific Extension And Move To A Directory?

Apr 18, 2011

I need little help. I want to find all files with extension "*.tar" "*.gz" and "*.zip" and move all those files into "/opt/old" directory. I've tried this command:

Quote:

find . -type f -name "*.tar" "*.gz" "*.zip" -print0 | xargs -0 -r mv /opt/test

It's not working, something wrong after "mv" i guess.

View 10 Replies View Related

General :: Find All Files Starting With A String Lsnr* Under Root Directory

Oct 31, 2010

I am looking for Windows Search equivalent looking for file name patterns (not file contents but file names)....

I am aware of "globbing" and wildcard recursive search functionality in ls but I am still not capable of finding files under directories.

for example: I want to find all files starting with a string lsnr* under root directory / and any sub-directories.....

ie I want to look for files like lsnr*.* anywhere under / and any sub-directories under / such as /dir1/dir2/dir4 and dir1/other/dir/someotherdir/sub-dir etc.

so if I have /dir1/lsnrcontrol and also have /dir1/dir/2/dir3/lsnr-tinit.dat then I want to list the files names etc.

how to do this using ls -R and wildcards.

View 1 Replies View Related

General :: Ran "find / -mtime +1 -exec Rm {} ;" - Trying To Clear A Directory ?

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

General :: Find Files In Subdirectories And Copy Them To Another Directory With The Same Subdirectories?

Nov 18, 2010

This question is very similar to this one except that I want to maintain the file's original subdirectories.

For example if I had

/temp/a/a.txt
/temp/a/a.jpg
/temp/a/b.txt
/temp/b/c.txt
/temp/d/d.txt
/temp/d/d.jpg
/temp/d/e.txt
/temp/f.txt

[Code]...

View 2 Replies View Related







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