sed -n 's/CONFIG_TARGET_ROOTFS_PARTSIZE=103/CONFIG_TARGET_ROOTFS_PARTSIZE=255/' $file_name sed -i -e 's/CONFIG_TARGET_ROOTFS_PARTSIZE=103/CONFIG_TARGET_ROOTFS_PARTSIZE=255/' $file_name sed -i -e 's/CONFIG_TARGET_ROOTFS_PARTSIZE=103/CONFIG_TARGET_ROOTFS_PARTSIZE=255/' $file_name On Sun, Jun 22, 2025 at 10:39 PM Qingwei Zhang via linux <linux [ at ] linux-ottawa [ dot ] org> wrote: > > Hi, > > You can use the following one-liner with `sed` to edit the file in place: > > ``` > sed -i 's/^CONFIG_TARGET_ROOTFS_PARTSIZE=103$/CONFIG_TARGET_ROOTFS_PARTSIZE=255/' filename > ``` > > Replace `filename` with the actual name of your file. > > On Sun, Jun 22, 2025 at 10:31 PM Ron via linux <linux [ at ] linux-ottawa [ dot ] org> wrote: >> >> James via linux wrote on 2025-06-22 19:23: >> >> > I want a one liner to edit a file in place to change: >> > CONFIG_TARGET_ROOTFS_PARTSIZE=103 >> > to >> > CONFIG_TARGET_ROOTFS_PARTSIZE=255 >> >> >> Assuming file is called $file_name, try this: >> >> sed -i -e >> 's/CONFIG_TARGET_ROOTFS_PARTSIZE=103/CONFIG_TARGET_ROOTFS_PARTSIZE=255/' >> $file_name >> >> >> >> >> To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org >> To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org >> To visit the archives: https://lists.linux-ottawa.org >> To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org To visit the archives: https://lists.linux-ottawa.org