debian

why cant I redirect the output from sed to a file

隐身守侯 提交于 2021-02-20 18:51:12
问题 I am trying to run the following command ./someprogram | tee /dev/tty | sed 's/^.\{2\}//' > output_file But the file is always blank when I go to check it. If I remove > output_file from the end of the command, I am able to see the output from sed without any issues. Is there any way that I can redirect the output from sed in this command to a file? 回答1: Remove output-buffering from sed command using the -u flag and make sure what you want to log isn't on stderr -u, --unbuffered load minimal

查询linux发行版本号方法总结

北城余情 提交于 2021-02-19 05:17:17
了解Linux发行版本的版本号是一项非常重要的事情,大多数软件对系统的版本都有要求,发行版本号与软件不匹配,软件将无法安装或者无法使用.这边集合市面上流行的 Linux 发行版本版本号查询方法.有了这边文章,老板再也不担心我装错软件了呢 1. 发行版本号查询 Debian版本查询: # cat /etc/debian_version 5.0.7 # cat /etc/issue Debian GNU/Linux 5.0 \n \l Ubuntu版本查询: # cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS" # cat /etc/issue Ubuntu 10.04.4 LTS \n \l CentOS版本查询: # cat /etc/*-release CentOS release 6.4 (Final) CentOS release 6.4 (Final) CentOS release 6.4 (Final) RedHat版本查询: # cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.0

Nodejs installed without npm?

ぐ巨炮叔叔 提交于 2021-02-18 11:16:09
问题 I've just installed nodejs on Debian 7 - by apt-get install nodejs. Nodejs seems to be working fine, but when I enter "npm" I get "command not found". "which nodejs" points to "usr/bin" and there it is - nodejs, but there is no npm file, what went wrong? I found a few solutions, but all of them are related to Macs BTW, "usr/local/bin" directory is empty I believe everything should install right there? 回答1: You have several options. If you want to continue using Debian packages, you could

No such file or directory find command on linux [closed]

风格不统一 提交于 2021-02-17 06:30:25
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Improve this question I've created script which delete old backup file from directory but this command was worked fine before 1 week and Nothing change on script or packages but still getting below error: root@:# find /var/backups/abc/* -type d -mtime +6 /var/backups/abc/2016-03-09

No such file or directory find command on linux [closed]

↘锁芯ラ 提交于 2021-02-17 06:30:01
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Improve this question I've created script which delete old backup file from directory but this command was worked fine before 1 week and Nothing change on script or packages but still getting below error: root@:# find /var/backups/abc/* -type d -mtime +6 /var/backups/abc/2016-03-09

MySQL container crash after /etc/mysql/my.cnf change, how to edit back?

旧城冷巷雨未停 提交于 2021-02-17 05:27:29
问题 I changed some mysql config settings and set something wrong, now Docker container keeps restarting and I cannot find the my.cnf file to edit in host filesystem. I have tried aufs/diff folders but so far unable to find it. Also tried: find / -name my.cnf -exec nano {} \; But it does not bring up the file I changed. And I tried to change config.v2.json to start /bin/bash instead of mysqld and restarted docker, but yet it started mysqld (due supervisor or something?) using official mysql

QuartusII 14.1.0 Debian Linux crash

泪湿孤枕 提交于 2021-02-16 21:00:36
问题 I can't use Quartus 14.1.0 with Linux Debian (wheezy and Jessie) on my 64 bits computer. If I launch it on console I've got this message : user@fpgaformation:/opt/altera/14.1/quartus/bin$ ./quartus Inconsistency detected by ld.so: dl-close.c: 743: _dl_close: Assertion `map->l_init_called' failed! And the GUI is launched correctly. But, after some minutes of using it, quartus disappear suddenly without message on terminal but with an altera problem-window. In this window, we can get the

DinkToPdf Library Unable to load shared library 'Shell32.dll'

ε祈祈猫儿з 提交于 2021-02-11 17:04:30
问题 I am using DinkToPdf Library for pdf generation, but I encountered on a problme on Debian 9. I changed CustomAssemblyLoadConext to load the .so file like this #region DinkToPDF #if DEBUG string filePath = $@"{Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)}\libwkhtmltox.dll"; #else string filePath = $@"{Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)}\libwkhtmltox.so"; #endif CustomAssemblyLoadContext context = new CustomAssemblyLoadContext(); context

docker registry with --insecure-registry and docker 1.5

不想你离开。 提交于 2021-02-10 06:17:50
问题 I have an issue with docker 1.5. So, I run a private registry at myregistry:5000. I can push & pull from an other location (debian 7 & docker 1.4) with : DOCKER_OPTS="--insecure-registry myregistry:5000" in /etc/default/docker Now, I have a new system with docker 1.5 and debian 8, it's not working anymore. I tried all possibilities like, --insecure-registry=myregistry:5000 or --insecure-registry http://myregistry:5000 Any clue? (Note : It works well if I stop docker and launch docker -d -

Getting ModuleNotFoundError: No module named 'pandas' Error on Airflow Bash Operator

孤者浪人 提交于 2021-02-08 10:20:56
问题 My airflow bash operator suddenly getting an error ModuleNotFoundError: No module named 'pandas' It was worked perfectly for the last 2 months but stop working from yesterday. I didn't change anything on the server or didn't update my server. 回答1: BashOperator simply runs bash command on your machine. So check if your machine has pandas installed on it. If not, do pip install pandas 来源: https://stackoverflow.com/questions/53953410/getting-modulenotfounderror-no-module-named-pandas-error-on