unix

What's the cause of Unable to open socket file: process not responding while Dumping the JVM? [duplicate]

冷暖自知 提交于 2020-06-28 04:43:48
问题 This question already has answers here : Running jmap getting Unable to open socket file (4 answers) Closed 3 years ago . I am running the command: jstack 1234 > threadDump.tdump On an PID of a Java process. I keep getting the following message: Unable to open socket file: target process not responding or HotSpot VM not loaded The -F option can be used when the target process is not responding I am not asking just how to solve, but I want to understand why I am getting this message, since I

What's the cause of Unable to open socket file: process not responding while Dumping the JVM? [duplicate]

ε祈祈猫儿з 提交于 2020-06-28 04:43:07
问题 This question already has answers here : Running jmap getting Unable to open socket file (4 answers) Closed 3 years ago . I am running the command: jstack 1234 > threadDump.tdump On an PID of a Java process. I keep getting the following message: Unable to open socket file: target process not responding or HotSpot VM not loaded The -F option can be used when the target process is not responding I am not asking just how to solve, but I want to understand why I am getting this message, since I

UNIX find: opposite of -newer option exists?

南楼画角 提交于 2020-06-25 07:24:25
问题 I know there is this option for unix's find command: find -version GNU find version 4.1 -newer file Compares the modification date of the found file with that of the file given. This matches if someone has modified the found file more recently than file. Is there an option that will let me find files that are older than a certain file. I would like to delete all files from a directory for cleanup. So, an alternative where I would find all files older than N days would do the job too. 回答1: You

UNIX find: opposite of -newer option exists?

蓝咒 提交于 2020-06-25 07:24:25
问题 I know there is this option for unix's find command: find -version GNU find version 4.1 -newer file Compares the modification date of the found file with that of the file given. This matches if someone has modified the found file more recently than file. Is there an option that will let me find files that are older than a certain file. I would like to delete all files from a directory for cleanup. So, an alternative where I would find all files older than N days would do the job too. 回答1: You

db2 command not found in unix

≡放荡痞女 提交于 2020-06-24 23:21:07
问题 I am trying to execute a simple db2 command in Linux command prompt. but Linux command prompt is not recognizing the command it is giving - bash db2 command not found. but db2 is installed in the Linux machine. command I am trying to execute from Linux command line processor is db2 "create database smaple" Error I am getting is below "If db2 in not a typo you can run the following command to lookup the package that contains the binary" command-not-found db2 -bash: db2: command not found" Is

jq dates and unix timestamps

本小妞迷上赌 提交于 2020-06-24 05:43:07
问题 So I have a data with bunch of unix timestamp values (in milliseconds). Something like this: { "id": "f6922fd5-4f97-4113-820e-b45eba0ae236", "published_at": 1461624333859, "tracking_id": "a85d5ed5-5efa-461b-aae0-beb2098c0ff7", }, { "id": "835d412f-5162-440c-937b-7276f22c4eb9", "published_at": 1461625249934, "tracking_id": "86472ba2-ce5f-400f-b42a-5a0ac155c42c", }, { "id": "bc2efcac-67a0-4855-856a-f31ce5e4618e", "published_at": 1461625253393, "tracking_id": "c005398f-07f8-4a37-b96d

jq dates and unix timestamps

99封情书 提交于 2020-06-24 05:43:06
问题 So I have a data with bunch of unix timestamp values (in milliseconds). Something like this: { "id": "f6922fd5-4f97-4113-820e-b45eba0ae236", "published_at": 1461624333859, "tracking_id": "a85d5ed5-5efa-461b-aae0-beb2098c0ff7", }, { "id": "835d412f-5162-440c-937b-7276f22c4eb9", "published_at": 1461625249934, "tracking_id": "86472ba2-ce5f-400f-b42a-5a0ac155c42c", }, { "id": "bc2efcac-67a0-4855-856a-f31ce5e4618e", "published_at": 1461625253393, "tracking_id": "c005398f-07f8-4a37-b96d

Is it possible to create a script to save and restore permissions?

让人想犯罪 __ 提交于 2020-06-23 22:10:08
问题 I am using a linux system and need to experiment with some permissions on a set of nested files and directories. I wonder if there is not some way to save the permissions for the files and directories, without saving the files themselves. In other words, I'd like to save the perms, edit some files, tweak some permissions, and then restore the permissions back onto the directory structure, keeping the changed files in place. Does that make sense? 回答1: hm. so you need to 1) read file

Print a variable with multi-line value in shell?

梦想与她 提交于 2020-06-22 08:32:05
问题 In Bash (or other shells) how can I print an environment variable which has a multi-line value? text='line1 line2' I know a simple usual echo $text won't work out of the box. Would some $IFS tweak help? My current workaround is something like ruby -e 'print ENV["text"]' . Can this be done in pure shell? I was wondering if env command would take an unresolved var name but it does not seem to. 回答1: Same solution as always. echo "$text" 回答2: export TEST="A\nB\nC" echo $TEST gives output: A\nB\nC

find directories having size greater than x MB

末鹿安然 提交于 2020-06-22 06:58:12
问题 Is it possible to find the directories only having size large than x MB. Suppose, I want to find all the directories only whose size is large than 1000MB with only 1 maxdepth under /home, how to find it in ? 回答1: If I'm interpreting your question right, I think this might be what you want: cd /home du -sm * | awk '$1 > 1000' This will show all directories in /home that contain more than 1000MB. If your version of du doesn't support -m , you can use du -sk and adjust the awk bit to look for