Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [write]

The tag has no usage guidance.

0
votes
0answers
8 views

Linux RedHat write buffer config

I have Linux RedHat 6.2. How do I configure files to buffer 4096 (or higher 2^N values) bytes before writes? Of course, when an EOF is received, write the file.
-1
votes
0answers
24 views

Transform an unstructured record into structured record

Using UNIX script the following code to be developed. I have a file 20-40 GB data contains data like below. Providing sample records. AUTO="passengers only" CAR="Personal" LORRY="commercial vehicle"...
0
votes
0answers
19 views

Trisquel: I attempted to use init/bin/bash and cannot mount to rw [on hold]

I want to change root password on my system but so far cant get the system to accept my passwords. I have read that the problem is that my drive has not been set to write. #authentication token ...
0
votes
0answers
31 views

Unable to reply to other users using write command

I am trying to reply to a message sent by other user in the Ubuntu termnial. I have 2 users sudhir & chethu. User chethu is logged into system normally & user sudhir logged in via putty. We ...
2
votes
0answers
52 views

Is there a decentralised version of finger, write and talk?

Has someone made a secure, decentralised, terminal-based replica of finger, write and talk? In other words, a utility that lets you look up and communicate with a handful of friends, eg. finger joe ...
2
votes
1answer
64 views

Why does terminal takes input line by line?

If I use: strace echo 'a b c' > file The bottom lines are: write(1, "a\nb\nc\nd\n", 8) = 8 but in strace echo 'a b c d' > /dev/pts/0 These lines are: write(1, "a\n", 2) ...
0
votes
2answers
25 views

Save in a file first 7 file in the directory /bin that starts with c

I have write a command in the shell of linux to count the file (in total 8) starting with 'c'in the directory /bin find /bin/[c]* -type f | wc -l What I wish to do now, it's save the name of the ...
0
votes
2answers
48 views

Write command working one way?

I want to communicate with my girlfriend through the write command. She's on a mac, I am on a debian laptop. I did the next steps: adduser haly apt-get install openssh-server systemctl start ssh ...
6
votes
3answers
809 views

How can I output a command to a file, without getting a blank file on error?

I'm trying to run a command, write that to a file, and then I'm using that file for something else. The gist of what I need is: myAPICommand.exe parameters > myFile.txt The problem is that ...
3
votes
1answer
116 views

Atomically write a file without changing inodes (preserve hard link)

The normal way to safely, atomically write a file X on Unix is: Write the new file contents to a temporary file Y. rename(2) Y to X In two steps it appears that we have done nothing but change X "...
0
votes
1answer
90 views

is `write()` asynchronous write?

From Operating System Concepts Another issue that can affect the performance of I/O is whether writes to the file system occur synchronously or asynchronously. Synchronous writes occur in ...
1
vote
1answer
53 views

Prevent Linux from writing to HDD

I have 3 HDD's, I want to install Linux Mint on HDD 3 which is currently empty and I don't want Linux to be able to write any data on the other 2 which is where all my Windows files are, is there a ...
0
votes
1answer
48 views

Why is my very old USB2 Harddisk faster than expected?

http://web1.heissa.de/usb2_speed.pdf From the spec, I would expect a max. write rate of 60 Mbyte/s. But today a simple test told me it‘s 226 MB/s. Is it possible that this is a trick of kernel 4,18 ...
0
votes
2answers
84 views

Split datetime column in csv file into MM/YYYY and time column separately and write to the same csv

I am trying to use awk, split and then print but running into error Input: id day userId itemId 1 12/1/17 8:32 2232 tv 2 1/12/18 10:18 3232 fdfs 3 2/9/18 10:50 232 fdsf ...
0
votes
1answer
156 views

Knowing when a write() on a serial port has finished transmitting data

I need to synchronize an IO pin value with a write to a serial port from user space (because I wasn't yet able to do it from kernel space - see my other question). My code (leaving out error checking) ...
1
vote
2answers
40 views

Can we use read(), write() on a directory in unix/linux?

Can we use read(), write() on a directory just like on any other file in Unix/Linux? I have a confusion here because directories are also considered as files.
0
votes
1answer
149 views

How to use write command to send message to user in debian stretch

who command show that xyz user is on tty2. $ who xyz tty2 2018-06-22 08:18 (:0) I trying send message to xyz using write xyz command. But it does not shows on terminal. When I run tty ...
2
votes
1answer
55 views

Prevent battery drain from constant write IO churn by browsers

For some reason, common browsers (Chromium is particularly bad, but Firefox isn't much better) generate constant IO load, particularly writes, on my Debian system. This is the case even when the ...
1
vote
1answer
301 views

Simulating slow down of disk operations

we know that there exist some excellent tool like netem which make it possible to slow down network parameters (like bandtwidth and so on). Is there exists analogous tool for simulating slow down ...
0
votes
1answer
60 views

Can reading STDIN conflict many writings from different processes? [closed]

One of my applications (Let's say "A") pushes its some alerts into STDIN and that app's shell script reads that STDIN and processes it. In the same way, there can be another applications (called B, C, ...
0
votes
1answer
67 views

Output to multiple files in crontab

In crontab I have set up a python script to run every 5 min, and output to a specific file */5 * * * * sudo /home/pi/MyProgram.py -o /home/pi/MyFile.csv How can I take the same ...
1
vote
1answer
1k views

How to block messages from write?

I have an ssh account on a server. Someone is spamming me with write messages. So I can't run any command in an interactive login. Is there anyway I can prevent them from sending me write messages or ...
4
votes
1answer
461 views

How to force Fedora 27 to write to USB flash drive immediately?

My Fedora 27 writes actual data to USB on umount. Before umount it works only with links or something like that. So, for example, when I transfer a big file of 5 GB cp /home/iam/bigFile /run/mnt/iam/...
4
votes
4answers
931 views

Overwriting a running executable or .so

I have a question about overwriting a running executable, or overwriting a shared library (.so) file that's in use by one or more running programs. Back in the day, for the obvious reasons, ...
2
votes
1answer
536 views

Linux USB Flash direct write / write cache

Lately I've been using USB2 flash drives to transfer a lot of data to my company. When copying the Data to the flash drive, I noticed that the data is not written directly to the drive. It wrote ...
0
votes
1answer
45 views

Why is the write rate to the disk being up to several GB/s, while no process reports any writing?

I use Ubuntu 17.04, though this problem was persistent in many previous versions. Long ago (a year or two, I think) I started to spot it. Immediately (no more than a couple of minutes) after the ...
-2
votes
1answer
73 views

write/wall: how to prevent non-printable characters from being escaped [closed]

Compare dd if=/dev/urandom bs=512 count=4 to write lsr < <(dd if=/dev/urandom bs=512 count=4) How do I achieve the intended behaviour? Current output: Message from qwe@hhgw11 on pts/386 at ...
1
vote
0answers
65 views

Relation between write and filesystem blocksize in SSD disks on Apple

R. Stevens, in his famous book about programming in O.S. environment, taught us that when the syscall write's block size is comparable (or even equal) to the filesystem block size, the performances ...
-5
votes
1answer
61 views

Write xommand in Solaris, Unix

Hey guys need a little help here. For example me and my buddies are sending messages on our school computers using write user* pts/** , my question is can the system administrator see on his pc that ...
1
vote
0answers
26 views

Allowing write only access to a log? [duplicate]

I am in the process of putting in place an audit log, for operations related to database modifying operations and url access. For various reasons, including preventing tampering and protecting ...
2
votes
0answers
321 views

How to compress images using trimage?

I installed trimage to optimize images hosted on my websites with nginx However I'm getting the following error: [error] /var/www/resistfromday1.org/htdocs/wp-content/uploads/2017/01/video-anti-...
3
votes
1answer
118 views

Why doesn't /proc/self/fd/0 have a writable bit in serial session before a shell is started?

I came across a program which uses a very old version of linenoise library. All write() are done to STDIN_FILENO, like this: write(STDIN_FILENO,prompt,plen) write fails with -1 and errno set to ...
0
votes
1answer
955 views

Writing the output of a command to a file in a bash script

I am trying to write a simple bash script that executes the command tcprobe -i $1 where $1 is an mp4 file. Then, I want to write the output of this command, which should be a long string of ...
-2
votes
1answer
27 views

Loop until find entry and then use the entry

Lets say i have a file which have entries, File: user pts/1 2016-10-22 19:47 (ip) user1 pts/2 2016-10-22 20:04 (ip) user1 pts/3 2016-10-22 20:04 (ip) i want to have a loop ...
2
votes
1answer
3k views

Why can't I send messages with the wall command?

I'm trying to send messages with either wall or write. To test this, I opened two gnome-terminal windows. Then entered the following in one window: me@host>>wall message to everyone <ctrl&...
1
vote
0answers
471 views

How to allow OpenLDAP user to write data to SSHFS mount point?

I mounted a network drive (Storage Server) to the directory /home/ldap for all OpenLDAP client computers. If a user login one of the computers, their home directory will be set the mount point as: /...
1
vote
2answers
865 views

How to write text containing $var to a bash file? [duplicate]

I am having trouble with writing case $1 in a bash file. I tried with cat <<EOT > /etc/init.d/startup.sh #!/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin case "$1" in start) ...
0
votes
0answers
692 views

RAID0 worse that write speeds of hard drives independently

So I have two hard drives one connect with SATA and one with USB3.0 SATA (/dev/sdc1): Apple HDD Toshiba USB (/dev/sde2): Western Digital Technologies, Inc. Elements SE Portable mounted ...
1
vote
0answers
243 views

Random write on DISK benchmark shows high read rate on iostat

I am running a random write benchmark directly on some disks (HDD & SDD) and I am getting some weird output data on the iostat monitor. Besides the usual write rate, there is a read rate that I ...
57
votes
3answers
8k views

How does `yes` write to file so quickly?

Let me give an example: $ timeout 1 yes "GNU" > file1 $ wc -l file1 11504640 file1 $ for ((sec0=`date +%S`;sec<=$(($sec0+5));sec=`date +%S`)); do echo "GNU" >> file2; done $ wc -l file2 ...
1
vote
2answers
652 views

No output when running script on startup (but correct output if run manually)

I recently got myself a Raspberry Pi 2 to learn a couple of things in my spare time. It is now running on Raspbian and I control it remotely via ssh from a laptop with Linux Mint 17.2 installed. Now ...
2
votes
1answer
153 views

How to write a luit command that outputs a file

I need to format a luit command so I can write a file that I'm trying to fix the encoding for. What I have write now is luit -encoding gbk cat santi.txt, but I would like this to have the output ...
1
vote
2answers
2k views

Stress (write) Test an SD card to destruction using a simple shell script

I would like to find out how many write cycles I can get from my SD card. I have googled and found good answers like this but its too complicated for a normal person like me. Say its a 64GB exfat ...
0
votes
2answers
2k views

Chat over LAN in Linux

I am trying to set up a LAN chat with two users using Linux server and none of them is root. I have tried this two methods: write account_name on both computers And: nc -l port_number on first ...
30
votes
1answer
96k views

How to get total read and total write IOPS in Linux?

How do I get read and write IOPS separately in Linux, using command line or in a programmatic way? I have installed sysstat package. Please tell me how do I calculate these separately using sysstat ...
2
votes
2answers
6k views

warning: Filesystem seems to be mounted read-only

I have an old SGI indigo with an EFS file system (Extent File System ), and the password needs to be reset. I can mount the hard drive, but read-only. I need write permissions. # mount --rw -t efs /...
2
votes
1answer
578 views

What data transfer / write speeds are to be expected for a badblock destructible write test?

I have purchased a new HDD for my backups. Before entrusting the device with the job of keeping my data safe I want to make sure that it is in good condition. The drive is a new internal 3.5 inch SATA ...
-1
votes
1answer
408 views

How to Interactively ask a user to change Permissions for a Specified File

I need to create a script that will allow a specified file to have its permissions changed interactively by asking the user if they would like to enable Read, Write and/or Execute one by one for each ...
1
vote
1answer
775 views

write command does not work

I have 2 users : User1 is connected on tty1 and User2 is connected on tty2. The output of mesg on both ttys is is y. On tty1, when I type write User2 tty2, I get write: User2 has messages disabled ...
4
votes
2answers
525 views

How to determine whether the data is written to disk or cached?

I'm learning file operation calls under Linux. The read() and write() and many other functions use cache to increase performance, and I know fsync() can transfer data from cache to disk device. ...