SQLite3 column truncation even though column is wide enough

I have a table with schema

CREATE TABLE test(id INTEGER NOT NULL PRIMARY KEY, numbers TEXT);

and values

INSERT INTO test(numbers) VALUES('1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100');

And if I run these commands

.mode box
.headers on
.width 0 400
.once -e
SELECT * FROM test;

I get output as

┌────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ id │                                                                                                                                                                                                     numbers                                                                                                                                                                                                      │
├────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 1  │ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86 │
└────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

numbers column gets truncated even though the headers are not and the column is wide enough.
I tried increasing width value but still wouldn’t work

This happens with box, column, table and markdown modes only. Other modes work fine.

What am I doing wrong?

I am using SQLite version 3.33.0 2020-08-14 13:23:32

Go to Source
Author: just_chilling

Change terminal tab color in Ubuntu 18.04

I am exactly looking for the same as these guys:

How to make selected tab in terminal more prominent
Customizing terminal tab color in Ubuntu 17.10

They use this file:

~/.config/gtk-3.0/gtk.css

But I can’t find it in my Kubuntu 18.04

Is there any new solution for 18.04 ?

Thanks

Go to Source
Author: user204415

How to stop truncate command safely

I am trying to empty my syslog.1 file which was flooded with some messages and has the size of 77 GB. I did

sudo truncate -s 0 /var/log/syslog.1

but the command is taking more than 2 hours to return. Is it safe to stop it by Ctrl-C or by the kill command? I am afraid that these methods may cause inconsistency in the file system. Is there a better way?

The system is Ubuntu 16.04. The root partition where /var/log/syslog.1 sits is almost full due to the sudden increase in size of this file as well as /var/log/syslog and /var/log/kern.log. The latter files are still continuing to grow, but the command line is still responsive.

Go to Source
Author: norio

How to Bulk / Batch Rename in Terminal?

I Have Question, How to bulk / batch rename in terminal ? i use ubuntu 16.04 64 bit

example

i have 5 file

(GreatSoftware) AVG Anvitirus - 1.exe
(GreatSoftware) Windows Media Payer - 2.exe
(GreatSoftware) Winamp - 3.exe
(GreatSoftware) CorelDraw - 4.exe
(GreatSoftware) Chrome - 5.exe

rename to

Joesoftware AVG Anvitirus - 1.exe
Joesoftware Windows Media Payer - 2.exe
Joesoftware Winamp - 3.exe
Joesoftware CorelDraw - 4.exe
Joesoftware Chrome - 5.exe

please help, I want a script that I understand enough of this problem

thank you

Go to Source
Author: Joe Cola

Copy and paste a folder

I am trying to make a copy of an OpenFoam tutorial folder to my desktop through Ubuntu since I don’t want to mess up the original files. I use the command line:
cp -r $FOAM_TUTORIAL /mnt/c/Users/username/Desktop

but this error pops up
cp: missing destination file operand after ‘/c/Users/username/Desktop’

Can I get any help with this?

Go to Source
Author: user421564

Infinite loop when trying to launch a symbolic-link to a bash script

I am trying to create a symbolic-link by using:

$ ln -s path/to/foo.sh ~/.local/bin/foo

To the following bashscript:

# foo.sh

  1 #!/usr/bin/env bash
  2  appname=`basename $0 | sed s,.sh$,,`
  3 
  4  dirname=`dirname $0`
  5  tmp="${dirname#?}"
  6 
  7  if [ "${dirname%$tmp}" != "/" ]; then
  8  dirname=$PWD/$dirname
  9  fi
 10  LD_LIBRARY_PATH=$dirname
 11  export LD_LIBRARY_PATH
 12  $dirname/$appname $*

I dont understand why i get the following error, when I try to launch, script above, from the symbolic link:

bash: warning: shell level (1000) too high, resetting to 1

Go to Source
Author: z3r0p1r

List & rename files that start with –

I have a 100+ files that start with a dash (-). I need to know how to do two things:

Example: -20200622_142237.jpg (File extensions vary, but all have the dash at the beginning.)

  1. How do I list (ls) files that start with this dash? Bash seems to think I’m trying to use another parameter. I’ve tried using single quotes, double quotes and – in front. Nothing seems to work.

  2. How do I rename all of these files at the same time? The intent is to rename them without the dash at the beginning.

NOTE: I don’t want to change the underscore (_). I just want to remove the dash (-) at the beginning of the file.

Lastly, I’ve already tried this possible solution posted previously, but it does not work.

Go to Source
Author: mc3mcintyre

Permissions – How do I delete files from an external drive that requires root permissions?

Okay, I’m at a loss as to what to do. I was trying to set up a bootable USB using “UNetBootin” and I didn’t properly check where my stuff was actually installing to, so instead of installing to the external drive I was planning to use everything started to install to my 4 TB eHDD. Thankfully, nothing was lost… however, every single file that was added I am unable to delete through normal means. I keep getting an error every time I try to delete one of these folders that says “Error removing file /media/(myname)/My Passport/boot/en-us: Permission denied”. Checking properties, I found that these files belonged to “root” and that I can’t do anything because I’m not the owner.

I’ve tried opening a terminal so I could rm -rf these stubborn files, but I can’t even access my eHDD with it. Typing that directory into the terminal gives me the error “bash: cd: too many arguments”. Same thing happens when dragging the folder into the Terminal.

(If it’s worth anything, I was trying to set up a Windows 10 bootable USB in case I ever wanted/needed to switch back.)

Go to Source
Author: Talia S

Change Font color and size when booting into CLI ubuntu 20.04 LTS

Change Font color and size when booting into CLI ubuntu 20.04 LTS

I was wondering if there was a way to increase font size and change font colour when booting into CLI.
The font is small and white on black, I want it to change the font colour.
If anyone can help, that would be great.
I am ready to provide any system details if needed.
Thanks

Go to Source
Author: Ammar