Questions tagged [truncate]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2
votes
1answer
38 views

tail -n 10 is truncating my entire file [duplicate]

I have these 2 scripts, one is writing to the file: #!/usr/bin/env bash while true; do sleep 1; echo "$(uuidgen)" >> /tmp/cprev.stdout.log done; the other is reading the last 10 lines ...
0
votes
0answers
15 views

Query gets truncated while executing in sqlcmd in shell script

I am trying to execute a select statement from linux via sqlcmd, the query length is of 5100 characters. When I print the result using echo the entire query is being displayed, but sqlcmd execution is ...
0
votes
1answer
25 views

What could cause a log file to be trunctated during writing?

In my workplace, I've inherited the responsibility of managing a web server. It's a CentOS Linux virtual machine, running on Amazon AWS EC2. Alongside serving web pages, there is a pile of scheduled ...
4
votes
9answers
452 views

Is it possible to truncate a file (in place, same inode) at the beginning?

It is possible to remove trailing bytes of a file without writting to a new file (> newfile) and moving it back (mv newfile file). That is done with truncate: truncate -s -1 file It is possible ...
2
votes
2answers
205 views

/usr/bin/truncate: Argument list too long

I want to use the truncate command to create a huge number of small files for testing. I tried the command with a small number of files (100) and it worked. When I changed the number to 1000000, it ...
2
votes
1answer
232 views

Difference between writing file from /dev/zero and truncate

$ timeout 1 cat /dev/zero > file1 $ wc -c file1 270422016 file1 $ du file1 264084 file1 Questions : (1) How do 270422016 null characters come out to be 264084 bytes (i.e 258M). $ truncate -s ...
0
votes
2answers
555 views

wget not downloading streaming mp3 correctly

I am trying to download a streaming mp3 using wget. this is my basic command: wget http://sj128.hnux.com/sj128.mp3 -c --timeout=1 --waitretry=0 --tries=0 -O "file.mp3" i have been doing this in a ...
1
vote
1answer
156 views

ffmpeg truncates paths on output when there are dots involved when run on bash

If I have a path with dots in the path, for instance: /home/user/Documents/hello/test.testing_23-24.123/test.testing_23-24.124 ffmpeg can locate the file if you pass the file's path as an argument ...
0
votes
1answer
142 views

How to print multiple columns without truncating?

I know that pr -m -t file1 file2 will give me 2 columns like so: file1: a abc abcdefg abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz file2: 1 123 12345678 12345678901234567890 - $ pr -m -t ...
0
votes
1answer
154 views

How do I remove a directory on a remote system that has a quota?

I have an rsync.net account that has hit its quota and I'm trying to remove (rm -rf) a directory to clean up space. However all the remove commands I can think of to try (rm, truncate, find -delete, ...
1
vote
1answer
256 views

What size blocks does `truncate --io-blocks` use?

What size blocks does GNU truncate --io-blocks use? -o, --io-blocks treat SIZE as number of IO blocks instead of bytes 512 bytes blockdev --getbsz blockdev --getpbsz