cat is stuck on a specific file
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a python script that generates a file (cap.pcap).
when I execute cat on it, it gets stuck forever (doesn't display anything).
I tried to run:
- The commands file, hd and vi. They work properly.
- lsof and fuser, they show nothing.
- cp to another file and cat on the latter. It gets stuck.
- dd to another file, same result.
< base64 cap.pcap > b64; < base64 -d b64 > cap2.pcap; cat cap2.pcap;
It gets stuck again.- Sent the base64 content to another machine and tested it; it worked properly.
Also, when I execute cat on any other file: it works.
Versions:
- Ubuntu 18.04.1
- cat (GNU coreutils) 8.28
Just in case it might help,
the part of the following python script is responsible of this:
import pcapy
data =
cap = pcapy.open_live("enp0s3" , 65536 , 1 , 0)
dumper = cap.dump_open('cap.pcap')
for i in range(20):
hdr, pkt = cap.next()
dumper.dump(hdr, pkt)
if i%10 == 9:
f = open('cap.pcap', 'rb+')
data += f.read();
f.truncate(0)
f.close()
dumper.close()
cat
New contributor
add a comment |Â
up vote
0
down vote
favorite
I have a python script that generates a file (cap.pcap).
when I execute cat on it, it gets stuck forever (doesn't display anything).
I tried to run:
- The commands file, hd and vi. They work properly.
- lsof and fuser, they show nothing.
- cp to another file and cat on the latter. It gets stuck.
- dd to another file, same result.
< base64 cap.pcap > b64; < base64 -d b64 > cap2.pcap; cat cap2.pcap;
It gets stuck again.- Sent the base64 content to another machine and tested it; it worked properly.
Also, when I execute cat on any other file: it works.
Versions:
- Ubuntu 18.04.1
- cat (GNU coreutils) 8.28
Just in case it might help,
the part of the following python script is responsible of this:
import pcapy
data =
cap = pcapy.open_live("enp0s3" , 65536 , 1 , 0)
dumper = cap.dump_open('cap.pcap')
for i in range(20):
hdr, pkt = cap.next()
dumper.dump(hdr, pkt)
if i%10 == 9:
f = open('cap.pcap', 'rb+')
data += f.read();
f.truncate(0)
f.close()
dumper.close()
cat
New contributor
Have you triedcat -t
?
â dsstorefile1
11 mins ago
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a python script that generates a file (cap.pcap).
when I execute cat on it, it gets stuck forever (doesn't display anything).
I tried to run:
- The commands file, hd and vi. They work properly.
- lsof and fuser, they show nothing.
- cp to another file and cat on the latter. It gets stuck.
- dd to another file, same result.
< base64 cap.pcap > b64; < base64 -d b64 > cap2.pcap; cat cap2.pcap;
It gets stuck again.- Sent the base64 content to another machine and tested it; it worked properly.
Also, when I execute cat on any other file: it works.
Versions:
- Ubuntu 18.04.1
- cat (GNU coreutils) 8.28
Just in case it might help,
the part of the following python script is responsible of this:
import pcapy
data =
cap = pcapy.open_live("enp0s3" , 65536 , 1 , 0)
dumper = cap.dump_open('cap.pcap')
for i in range(20):
hdr, pkt = cap.next()
dumper.dump(hdr, pkt)
if i%10 == 9:
f = open('cap.pcap', 'rb+')
data += f.read();
f.truncate(0)
f.close()
dumper.close()
cat
New contributor
I have a python script that generates a file (cap.pcap).
when I execute cat on it, it gets stuck forever (doesn't display anything).
I tried to run:
- The commands file, hd and vi. They work properly.
- lsof and fuser, they show nothing.
- cp to another file and cat on the latter. It gets stuck.
- dd to another file, same result.
< base64 cap.pcap > b64; < base64 -d b64 > cap2.pcap; cat cap2.pcap;
It gets stuck again.- Sent the base64 content to another machine and tested it; it worked properly.
Also, when I execute cat on any other file: it works.
Versions:
- Ubuntu 18.04.1
- cat (GNU coreutils) 8.28
Just in case it might help,
the part of the following python script is responsible of this:
import pcapy
data =
cap = pcapy.open_live("enp0s3" , 65536 , 1 , 0)
dumper = cap.dump_open('cap.pcap')
for i in range(20):
hdr, pkt = cap.next()
dumper.dump(hdr, pkt)
if i%10 == 9:
f = open('cap.pcap', 'rb+')
data += f.read();
f.truncate(0)
f.close()
dumper.close()
cat
cat
New contributor
New contributor
New contributor
asked 22 mins ago
Hédi Ghédiri
1
1
New contributor
New contributor
Have you triedcat -t
?
â dsstorefile1
11 mins ago
add a comment |Â
Have you triedcat -t
?
â dsstorefile1
11 mins ago
Have you tried
cat -t
?â dsstorefile1
11 mins ago
Have you tried
cat -t
?â dsstorefile1
11 mins ago
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Hédi Ghédiri is a new contributor. Be nice, and check out our Code of Conduct.
Hédi Ghédiri is a new contributor. Be nice, and check out our Code of Conduct.
Hédi Ghédiri is a new contributor. Be nice, and check out our Code of Conduct.
Hédi Ghédiri is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479674%2fcat-is-stuck-on-a-specific-file%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Have you tried
cat -t
?â dsstorefile1
11 mins ago