I have to delete with permission the files with size 0 created by a user from a certain path. The user and the path are positional parameters. i thought of making a “for” where i go through the files from a certain user and then with “find” to remove the ones empty from the wanted path…
CPU you selected doesn’t support x86-64 instruction set
I want to compile a program which has lots of 32-bit static libraries which I cannot recompile to 64-bit because the lack of makefiles but there are some libraries that I should compile to obtain some static libraries to use alongside them. One of the libraries that I want to compile has a Makefile as follows…
tqdm stops showing progress in terminal “… (more hidden) …”
I am training a neural network and I found it useful to have a tqdm bar showing how many steps in epoch has come. I faced the following problem: after reaching the end of a terminal window, it shows … (more hidden) … and I cannot do anything about it. I tried scrolling up and down in tmux, but it
Executing a shell script having docker | docker commands not found
I created a pipeline in Azure with Ubuntu 18.04. My requirement was to run a docker image using bash script and for the same below script was created but on execution I received an error “docker command does not exist and docker: invalid reference format. test.sh Error To describe in detail, here are th…
How I can count how many suspended proceses there are in a shell script linux bash
I tried to write a shell script that shows and counts how many suspended processes there are. But I succeeded only to show the suspended processes with: I tried to count the suspended processes with: Of course this didn’t work because it counted every word there was even with the first row that had the …
VS Code: NPM Works Great at the Command Line, but “NPM Scripts” Pane Gets “/bin/sh: 1: npm: not found”
I have Node/NPM installed on my (Linux) system. When I use an ordinary terminal, or the terminal inside VS Code, I can run npm commands just fine. However, when I try to use the “NPM Scripts” feature of VS Code (which lets you run your package.json scripts from a pane in the “Explorer”…
Linux read file line by line, print regex and print everything between two patterns
I made this script: Output of hc_connesse is: I’m not able to print SE401 from hc_connesse. The query is made on 45 different server and without putting the SE04 before the table will be impossible to understand which data are from where. Tried another For cycle inserting another awk before the other. T…
Why docker exec command ingore bashrc inside docker container?
So. I have docker image with ubuntu (also creared container from this image). On my docker container I see this output: On my container on file ~/.bashrc (it is /root/.bashrc) I’m export some variables: When I try to execute command on docker container using “docker exec” I don’t see m…
Read last line of file after the file was modified
I have a problem with reading the last line of file in Linux Ubuntu. I have a file named auth.log and I’m trying to read it last line after new line was added (after file was modified). I know i need to use tail -1 /var/log/auth.log to get last line but I don’t know how to check the file every
rename files which produced by split
I splitted the huge file and output is several files which start by x character. I want to rename them and make a list which sorted by name like below: part-1.gz part-2.gz part-3.gz … I tried below CMD: for (( i = 1; i <= 3; i++ )) ;do for f in `ls -l | awk ‘{print $9}’ | grep