Questions tagged as 'linux'

3
answers

How to execute the method inside a .py file by the terminal linux

How can I call a method that is inside a .py file directly from the Linux terminal, but I do not want to enter the prompt of the python For example [fedora@user ~]$ python arquivo.py metodo parametro Something like% Django / P...
asked by 15.08.2017 / 22:42
1
answer

Difference between REJECT and DROP on iptables

What's the difference between using REJECT or DROP in the configuration of iptables ?     
asked by 10.12.2016 / 23:25
2
answers

Parameters for external call

I use Linux and by default (or at least in my case) it does not have screen brightness control, however it has a program that can control it. The question here is that I want to get the value of the "user" and use this value in a function typ...
asked by 19.11.2016 / 03:57
1
answer

What are ttys for?

I use Fedora 23 and CTRL + ALT + F1 to CTRL + ALT + F6 I'm going to access these terminals, I only need to use them when graphic mode hangs and I need to restart gnome and I have the definition that these > are terminals without g...
asked by 25.02.2016 / 05:25
1
answer

An Exception PDO occurs when localhost is used as host

Consider the following adapter class DbAdapterMySQL that extends the class PDO : class DbAdapterMySQL extends \PDO implements DbInterface { public function __construct(array $config) { $dsn = "mysql:dbname={$confi...
asked by 29.02.2016 / 16:22
2
answers

Copy (cp) to the current folder in LINUX [closed]

Is it possible to exempt target path by giving a command to copy (cp) in the linux console to the current / current folder? Ex: cp ~/Origem ~/Destino What I want is some shortcut in bash equivalent to the target. Ex: cp ~/Origem...
asked by 13.09.2015 / 05:43
1
answer

Working with Windows Forms with designer on Linux?

In Linux (Ubuntu) can you create applications with Windows Forms in Mono or similar using a designer such as Visual Studio ? I'm having trouble because I need to develop with Windows Forms in a Linux environment with a designer simil...
asked by 05.08.2016 / 05:26
1
answer

Execute console command and read return in PHP

In linux if I do the command df -h in the terminal it returns me the partitions, size etc ... as I show below: Filesystem Size Used Avail Use% Mounted on /dev/sda3 25G 6.4G 17G 28% / /dev/sda5 70G 2.9G 64G 5...
asked by 28.10.2016 / 12:24
2
answers

Function in Shell script with no return

I have the following function: function ping { nome=$(dialog --title "inform o endereço que deseja PINGAR" --inputbox "IP ou URL - \ Lembrando que será disparado 10 pings para o endereço informado." 10 45 --stdout) status=$? if [[ $status -eq...
asked by 13.08.2015 / 05:37
1
answer

Go through a bash script array

Can anyone give me an example of an if and case traversing an array in bash script? I'm just setting an example with for what's to list the items .. I'm trying this way but it's not right. ex: v1=("sim" "s" "y" "yes" "") v2=("não" "no" "nao")...
asked by 08.07.2018 / 03:41