General :: Filesystems - How To Find Which Process Had Created Any File
May 16, 2011Is there any way to know which process had created any file in Linux Red Hat/CentOS 5?
View 2 RepliesIs there any way to know which process had created any file in Linux Red Hat/CentOS 5?
View 2 RepliesIs there some file in Linux that enumerates and describes mount options for file systems like /etc/services describes ports?
View 2 Replies View RelatedI need commands which five me the following details abt all the file systems mounted the linux box
type
mount pt
file system id
I created a VM disk image with kvm-img, but I forget what was the max size of that disk image when I created it. Currently, its size is 6.2G, I want to install some large packages in that VM, so I want to make sure the disk image can expand to an adequate size.
View 1 Replies View RelatedI'm a little bit confused with partitioning the filesystem in Linux. the difference between creating the file system with fdisk and mkfs (when formatting the disk). I can't clearly tell my problem, so please look at this picture:
View 2 Replies View RelatedHow do you find the parent process of zombie processes?
When the child process is something where the parent is not entirely obvious...
Is there some way to list processes in tree format or something?
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 RelatedI have a 500GB external drive I want to use on a couple of Linux systems, and looking for a filesystem for it. External drives are frequently formatted in FAT32, but I don't need to interoperate with Windows and would rather avoid the ugly limited kludge that is FAT.
Since I only need to use it on Linux, I would use ext4 or XFS, but they store ownership information. Ideally, I'd use a proper Unix file system that doesn't track ownership (files are owned by whoever mounts the device, like they are when mounting a FAT32 partition), but I do not know of any file system that does that.What would be a good file system for this disk?
I've been using *Unix systems for many years now, and I've always been led to believe that its best to partition certain dirs into separate FileSystems, off the main root FS.
For instance, /tmp /var /usr etc
Leaving as little as possible on the main / system.
Its so that you don't fill up the root system be accident, by some user putting in too bigger files in /tmp, for example.
I would presume that filling the / system would not be too good for Linux, as it would not be able to write logs and possibly other things that it needs to.
I believe that if root gets full, then there is something like a 5% amount saved for just 'root' to write to, so that it can do its stuff.
However, eventually, / will become full, and writes will fail.
On top of this, certain scripting tools, such as awk, use the /tmp/ system to store temp files in, and awk wont be able to write to /tmp/ as its full, so awk will fail.
However, I'm being advised that there is no need to put /tmp /var etc onto separate FSs, as there is no problem nowerdays with / filling up. So, /tmp /var /usr are all on the root FS.
I'm talking about large systems, with TBs of data (which is on a separate FS), and with a user populations of around 800-1000 users, and 24/7 system access.
I have a bunch of disk images, made with ddrescue, on an EXT partition, and I want to reduce their size without losing data, while still being mountable. How can I fill the empty space in the image's filesystem with zeros, and then convert the file into a sparse file so this empty space is not actually stored on disk?
For example:
> du -s --si --apparent-size Jimage.image
120G Jimage.image
> du -s --si Jimage.image
121G Jimage.image
This actually only has 50G of real data on it, though, so the second measurement should be much smaller.
This supposedly will fill empty space with zeros: cat /dev/zero > zero.file rm zero.file But if sparse files are handled transparently, it might actually create a sparse file without writing anything to the virtual disk, ironically preventing me from turning the virtual disk image into a sparse file itself. :) Does it? Note: For some reason, sudo dd if=/dev/zero of=./zero.file works when cat does not on a mounted disk image.
One of the good points of linux is that is easy to customize the partitioning scheme of the disk and put each directory (/home, /var, etc) in diferent partitions and/or diferent disk. Then we can use diferen file system/configurations for each of them for make them better. xamples:
noatime is a mount option to not write access time on the files. data=writeback is an option to layz write metadata on new files. ext3/4 has journaling that make the partition more secure in case of a crash. bigger blocks make the partition waste more space, but make it faster to read and may become more fragmented. (not sure) Then: What are the best filesystem/configurations for each directory? Note: given the answer of Patches, will only discuss /, /home and /var only.
/var -> It's modified constantly, it write logs, cache, temporal, etc.
/home -> stores important files.
/-> stores everything else (/etc and /usr should be here)
i want to know who created the user(this user was created 1yr ago).Is there any process or command to know who created the user and which date he was created
View 1 Replies View RelatedWith 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 RelatedHow 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
one tell me the internal working of kill command. that is how it kills a process internally or from where it picks file to continue its process.
View 3 Replies View Relatedcreate one tar.gz file that contains my /home, /etc, /root directory.
a) The process ended with a 88GB file size (which is ok) but with the following message.Code: tar: Exiting with failure status due to previous errors.I have searched a little but I could not find what went wrong.
b) What are the limitations of tar and gz for backups. Of course I fully understand that they can not be used for differential backups (if it is called like that)
c) Let's say that my backup will be a file of 100GB and I want to see the contents of the .tar.gz. In kde there is a program called ark. Can ark handle so big files? Does it use my hard disk (eg. /tmp) to uncompress the file so to show me its contents? It might be the case that might be the compressed file is much bigger than the left space on the hard disk?
d) How can I do an integrity check when my tar.gz file is created?
Currently have access to a VPS where we are running a small game server on ubuntu - the problem is that it is a multi-user environment, so when one person restarts the server process, all files it creates are owned by that users name and group. I have created a group called 'game' and added both users to it, but I need to know how to make all files in the game server's directory to be r/w/x for the group 'game'. Currently, I have a script that chowns and chmods all files recursively on startup, but I'd prefer not having to do this.
View 4 Replies View RelatedI know that this command
"pid aux | less"
displays all the processes and their pid but it would be too time consuming to search for the pid of one specific process is there a way to use "grep" to find pid of a certain process?
i tried "grep process-name pid aux"
To be specified,what I want to do is:
if I create xxx.php,#!/usr/bin/env php will be the first line of the file
if I create xxx.py,#!/usr/bin/env python will be added first.
Debugging some of my scripts after upgrading from Debian Lenny to Ubuntu 10.04. In so doing, I tripped over this "problem," the solution to which may give me a clue to others.
On a bash shell command line I created a file thusly:
sudo touch zero_file
and it lists as expected with default permissions 0644:
-rw-r--r-- 1 root root 0 2011-03-09 11:18 zero_file
But then this command fails
sudo echo abcdef >>zero_file
-bash: zero_file: Permission denied
I can place the command (minus the "sudo") in a script & run it under the auspices of sudo & it works. Am I missing something re the stdin redirection when using sudo?
i created a script file named myscript.shi ran this by typing sh myscript.sh and i got my outputbut,when i tried to execute by typing ./myscript.sh i received permission denied errori gave permission as chmod 777 myscript.shthen i executed by typing ./myscript.sh . It worked fineso i wanted to know whether using sh and ./ with permissions are same.. ?or did it work for only this.. are there any differences
View 1 Replies View RelatedI am just starting out in LINUX and I know the basic commands but I am a having a problem. I scoped the man pages but I can't get it. Maybe one of know... Can anyone tell me the cmd to figure out the system a file was created on? I just can't figure out this problem.
View 6 Replies View RelatedI am looking for a way to be mailed a new file when it is created in a certain directory.I have found tools that will notify me when a file is created, such as iWatch with iNotify, but is there a way to actually be sent the new file when it is created.It is only a short text log file, but I would like to read it in my inbox rather than have to login and open the file each time an event is logged.
View 2 Replies View RelatedI can see that the light of the HDD is flashing. I would like to find out what the process is that is accessing the HDD. Is there a way to achieve this?Is there a utility that ties up processes with hw resources?
View 1 Replies View RelatedI have set up a cron job in linux server using the command 'wget -q -o wget_outputlog url'
But on every run, an empty file being created at root.
How to stop this.
I want to run an executable file during or post linux installation which take input from user and closes on click of "ok" button. The thing i want to accomplish is something like the screen that turn up during the installation, like setting time or selecting some packages and then pressing next button...i want to do a similar stuff like the above said using my applicatio
View 2 Replies View Relatedi have about 22 gb of music (mp3 & ogg) on my laptop harddrive.i also have an unused sony mp3 player with a 20 gb hard drive.what i want to do is back up the 22gb into a 20 gb space the music does not need to be playable on the sony player...just using it as a back up device.ok...2 issues:1. when i've tried compressing (tar.gz) mp3 files, little to no space is saved, i assume that a mp3 is pretty compressed already.is there another way to compress effectively ? i dont want to reduce bit rates of the individual music tracks.2. i formatted the sony hd using ext4, but this leaves me with only 16 gb usable space. tried fat32 and this left me with about 18gb.
View 6 Replies View RelatedIm using SUSE, i have 31GB of memory Mem: 31908592k total, 31429632k used, 478960k free, 12176k buffers. How do I find out what process are eating up all my memory.
View 3 Replies View RelatedIs there any link where i can get information about below?
Dirty memory
RSS
PSS
One more?
if a set of process are getting executed in a use case say 50 times. How do one know the memory leak for a particular process?
I am using ubuntu 8.04
here is what i did
I ran
ffmpeg -i /sumeet/clip/friends introduction song.mp4 -s 160x120 -acodec amr_nb -vcodec mpeg4 -r 30 -ar 8000 -ac 1 ~/Desktop/friends.mp4
now I compared sample video created by mobile file I created above.code...