Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
50 views

How can I check which computers I am logged onto on my school network?

At some point in the last week, I forgot to log out of a computer somewhere in my school and now I cannot open firefox because it is already open on that computer. Is there a shell command for me to ...
0
votes
1answer
41 views

linux reverse engineer to find process source

A compromised wordpress site has started several processes that run as the apache user. I can find these processes by running ps and greping for the apache user. Then I take one of the process IDs and ...
3
votes
2answers
155 views

How can I print file names on linux command if know its file descriptor of a file opened by a process?

I know the file descriptor of a file opened by a process, but I don't know the process ID. How can I print file names from the Linux command prompt if I know the file descriptor of a file opened by a ...
1
vote
1answer
56 views

How can I get file names of opened by a process?

I want to list down all file names opened by init process. I know about /proc/PID/fd directory. But that gives file descriptors only. How can I get file names from list of file descriptors?
1
vote
1answer
1k views

Can't unmount dmg. Keep getting “Resource Busy”

"Workspace" is an encrypted dmg where I keep my code. I don't usually unmout it but I need to take a backup and it's refusing to let me unmount: mark@mark-macbook-air /Volumes$ lsof | grep Workspace ...
0
votes
0answers
44 views

Difference between lsof +f and lsof | grep (external storage media)

I was trying to see which files were open on my external HDD, mounted in /var/run/media/mickael/Tora/, and I found two solutions : lsof | grep /var/run/media/mickael/Tora/ (which returns a lot of ...
0
votes
0answers
30 views

How can I determine what process controls the master side of a pty?

The other day I couldn't figure out where the stderr of my gnome-shell process was going to, on a Linux desktop system. lsof showed me file descriptors 1 and 2 pointing to /dev/pts/21. Eventually ...
0
votes
2answers
117 views

What does *:* in lsof output stand for?

While executing the command /usr/sbin/lsof -l -i -P -n as the root user, I am getting this output. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ... httpd 9164 70 3u ...
1
vote
3answers
361 views

mv: cannot move «file.mp4» to «/path/file.mp4»: Device or resource busy*

I simply try to move file to another path and I'm getting mv: cannot move «file.mp4» to «/path/file.mp4»: Device or resource busy* I've tried using lsof, but it's not showing any openfiles. lsof +D ...
4
votes
1answer
457 views

lsof reports no files open on external volume but it still cannot be safely unmounted

I've searched around here on SX and other places but have not found an approach that gives me any traction on my issue. I've a volume (used by Time Machine as it happens) on an external Firewire ...
0
votes
1answer
106 views

Better use of lsof in Linux?

I'm looking for a way to list open files by the Flash plugin (whether Firefox or Chrome). I could use lsof | grep Flash, and it works. But I'm looking for a more efficient way to do that, using lsof ...
0
votes
3answers
274 views

Listing active *and past* network connections

On Linux, I know that I can list active network connections with lsof -i or netstat. However, as far as I know, this only list connections that are currently open. If a process makes a short ...
1
vote
1answer
64 views

How to determine full command with args given a pid (or port in use)

I've got this nice bash function for telling me the pid using a port: using_port() { lsof -i:${1} } Output looks like this: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ...
4
votes
2answers
215 views

How can I programmatically “eject” a keychain on OS X?

I'm using a script to eject a small USB key I use as a “identity” drive, which contains some secure information. Of note, it has an OS X “keychain” file on it, which contains some of my more secure ...
0
votes
1answer
167 views

How to quickly determine which process (if any) listens to a serial port

I am looking for a command to see the process listening to a port, e.g. /dev/ttyS0 (with root rights on a Linux system). I can do that with lsof /dev/ttyS0 but this is really too slow. Also, I ...
2
votes
1answer
291 views

Mac lsof command find all processes for all users

A while ago my teacher asked me to create a script that would kill Minecraft anytime it came up. It worked when the user themselves ran it, but it didn't if it was at root level. Is there a command ...
5
votes
1answer
207 views

Find processes listening on the wildcard address in `lsof`

Using lsof, I can find all of the processes with a TCP socket listening for connections: lsof -Pni -sTCP:LISTEN e.g.: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME cupsd 662 ...
0
votes
1answer
460 views

How can I unbind a UDP port that has no entry in lsof?

On my Mac, I have a UDP port that is "already in use", but doesn't have an associated process: sudo netstat -na | grep "udp.*\.500\>" shows udp4 0 0 192.168.50.181.500 *.* ...
3
votes
1answer
2k views

How to install lsof on Debian/kFreeBSD?

How do you install lsof on Debian/kFreeBSD Testing (Wheezy/Sid)? $ apt-get install lsof Package lsof is not available, but is referred to by another package. This may mean that the package is ...
0
votes
1answer
410 views

How to convert lsof hexadecimal IP:port output to decimal notation?

I feel dumb for asking but how do I convert this to the IP port combination? IPV4 0xffffff8015f9aa40
1
vote
1answer
102 views

Why Does Issuing One lsof Launches Two Processes?

I'm on current OS X 10.7. Sometimes I want to check which application locks a certain file. I do that by lsof | grep $FILENAME I noticed that running this command invokes two instances of lsof. Why ...
0
votes
1answer
5k views

Debugging connection timeouts using strace?

I'm trying to figure out why is Eclipse spinning, so I decided to fire up strace. I found the eclipse process using: $ ps ax | grep java 5546 ? Sl 19:04 /usr/bin/java ... [arguments ...
9
votes
2answers
9k views

Continuously monitor files opened/accessed by a process

lsof -p 12345 will list all the files opened by process whose pid is 12345 but only for a particular instant of time. How can we continuously monitor a process from the start to end(until process is ...
2
votes
1answer
308 views

Periodically printing the number of open files for a process

I can use a program like top to periodically update system statistics and I can use lsof -p <pid> | wc -l to give me a snapshot of the number open files for a process. Is there a command I can ...
1
vote
2answers
479 views

How many files should be listed as open under lsof?

I am not an advanced Linux user. I have a VPS with 768MB of RAM running CentOS. I executed the lsof command as root and I see that there is a list of 3000 files. Usually, how many files should be ...
3
votes
1answer
54 views

Is there a way to know WHEN a connection has been established?

I'm working with mobile IPv6 and was dealing with lots of zombie connections. I set keepAlive to true and want to test whether old connections are being discarded. I'm using lsof to list the process ...
1
vote
4answers
1k views

How to move files that are not in use?

I want to move files in a directory that are not currently in use. I have a sense that some combination of lsof, find, and xargs could work but I can't quite get there. So far, I created the ...