Most voted "terminal" questions
Terminal or console is a line emulator or command prompt, where all commands are issued in plain text.
Learn more…134 questions
Sort by count of
-
25
votes5
answers63261
viewsHow to clean the console in Python?
I am an Operating System user Ubuntu and when I want to clean the terminal, I use the command clear. >>> clear However, in the Python, how could I do to clear the terminal, when I use it on…
-
6
votes3
answers316
viewsOpensuse 13.2 - Sublime as standard editor
I downloaded the sublimeText2 for text editing and would like to define it as the default editor instead of the gedit but I’m not getting it. Attempts Arquivo -> abrir com -> outro aplicativo…
-
6
votes1
answer103
viewsHow to create an application from a Maven file?
I was working with EJB and dealing with four simple Maven projects, a web project ,a desktop project (JSE Swing), a project (JSE) that had only the interface and ultimately a web project (which I…
-
6
votes1
answer787
viewsHow to find out if a directory is empty by the terminal?
I sent some files, via ftp, to put my application into production. Due to some error occurred in the application, I realized that some files were missing. When I gave a ls I realized that some…
-
6
votes3
answers4481
viewsDifference from: "git commit -am" and "-m"
What would be the difference between typing: git commit -m "Teste" and git commit -am "Teste"? I’m learning about Git and would like to know how to differentiate it.…
-
6
votes2
answers5439
viewsHow to use PHP on the command line?
Is it possible to use PHP on the command line? How does language use work in this environment? It is possible to develop scripts and run them as shell scripts?
-
5
votes1
answer713
viewsCMD, Console, MS-DOS and related terms
Well, you have embarrassed all the concepts that I’m going to list below, and I would like to present the definition of these terms, maybe some are synonymous with others and others are totally…
-
5
votes1
answer627
viewsWhat is the difference between reset and clear in Terminal?
In the Terminal, what is the difference between the commands reset and clear? I’m using the Terminal of Ubuntu and apparently the two commands clear the screen.…
-
5
votes2
answers513
viewsIs there a difference between compiling from the linux terminal or from the IDE?
I’m programming in C in the linux for a semester now, and I always come across people who call themselves better programmers because they compile and run the program through the terminal. However,…
-
5
votes1
answer58870
viewsHow to know if a port is open or not on Linux
I have a PHP script that acts as a chat server (websocket) that I have on a given system. I realize that sometimes unexpectedly this service stops running. It runs through the command nohup. I am…
-
5
votes3
answers1837
viewsGet back deleted files in Git
Friends, good afternoon. I removed some files inside the server, but I need them again, I have them in the git repository. How do I redownload the repository files?
-
5
votes1
answer1139
viewsClose console window in C
I need to create the old game. I want to know how to close the black window that appears without having to click any key, for example: When running the program appears: 1 to play 0 to leave If the…
-
5
votes2
answers80
viewsError in build Ionic framework
Gentlemen, I have migrated to linux and I have a question/problem. I already have the android sdk installed with their respective dependencies installed, I run the android command and open me the…
-
5
votes2
answers74
viewsList the amount of space occupied by a file type in the terminal
I suspect that the Pcs I use have many files .RData, used by the R program to save data sets. I want to do a cleaning in these files, but without going into directory by directory, on computer by…
-
5
votes2
answers3295
viewsHow do I stop sending package-lock.json by gitignore?
I can’t "ignore" sending package-lock.json for gitlab, when I run git status it appears to me to be sent. Follow a print showing the .gitignore and my terminal when running git status. File .…
-
4
votes2
answers2087
viewsHow to pass arguments to a PHP script via command line?
I have a script PHP which receives arguments as follows: script.php -f "valor". How do I make PHP pass this argument via command line?
-
4
votes1
answer9015
viewsHow to create a. BAT configuration file in windows?
I am automating some processes on a Windows server, and would like to create some files. bat for this but for such would be necessary the . BAT were able to read a configuration file so I did the…
-
4
votes2
answers805
viewsHow to define a global alias in BASH?
I’m using the Terminal in the Linux and I’m tired of repeating the same commands all the time. For example, I use a command practically all day, then I create an alias to make things easier.…
-
4
votes1
answer6370
viewsHow to configure the Vscode terminal?
I am trying to configure my Vscode so that I can install libraries through the integrated terminal but I am having problems, it seems that Vscode does not "synchronize" with the standard terminal.…
-
4
votes1
answer61
viewsHow to copy the script by running to another folder in Python?
I made a script in Python that runs some commands in the terminal, and I want it to move to another folder. I tried to use the cp teste.py minha_pasta/teste.py, but it doesn’t work. This is my code:…
-
3
votes1
answer566
viewsDelete file by command line with different type
It has 2 directories, their contents are the same, but in one of them there can only be java files and the other only files that are not java In the Resources folder are those not java src main…
-
3
votes1
answer215
viewsprintln on Swift via terminal
I’m trying to compile a class people.swift for Terminal macosx class People { let name:String = "" let age:Int = 0 init(name:String, age:Int) { self.name = name self.age = age } let anyPeople =…
-
3
votes2
answers351
viewsHow to find the installation location of a package via SSH?
I installed a package as in the example below: $ apt-get install nome-pacote But I can’t find which directory it was installed in. Is there a command to find out where the package is? Remembering…
-
3
votes2
answers278
viewsStarting GIT from Terminal
I’m trying to give git init to the terminal and when I type in this command it accuses that the 'config' and '.git' folder already exists, etc. Also when I try to use git add * it takes time to add…
-
3
votes2
answers2027
viewsSend a command to Terminal via C++
How to send a code to the terminal? For example: on a graphical screen where I type the name of a folder, and it sends to the terminal a mkdir NomePasta ? (Of course, there will be other features,…
-
3
votes1
answer326
viewsShow contents of a file by opening the file with the content string of a variable
I have a problem showing the contents of a file using the following command: variavel="Affonso\,\ I.\ P..txt" cat < "$variavel" And running the same command on the terminal but using no variable,…
-
3
votes1
answer353
viewsHow to pass response from one command as argument to another command?
In linux I do something like to take the answer of a command and pass as argument to another: ./program `ruby -e"puts 'Oh' * 3"` In case what is between the accents (ruby -e"puts 'Oh' * 3") will be…
-
3
votes3
answers494
viewsExtract information from a.txt file
I have a.txt file with the following information. 31.812:9.862 179.52:6.847 315.015:9.135 462.305:6.276 103.875:4.122 176.064:3.593 196.7:4.407 246.599:4.423 And I need to extract that information…
-
3
votes1
answer67
viewsHow to count the lines of an output in the terminal?
I want to count the total outputs of the results in the terminal. For example using the cat lista_de_compras.txt: arroz feijão leite I want to receive 3…
-
2
votes3
answers474
viewsGetting Output Terminal History on Ubuntu
Is there any way to get Output History from the Ubuntu terminal? Like a log of everything that rolled into a terminal?
-
2
votes3
answers280
viewsHow to Show the file path opened in VIM
Sometimes I leave the file open for a long time, and I don’t know which directory it is in because the environments of my application are separated by path. Ex: prod /loja/prod/app/index.php teste…
-
2
votes0
answers221
viewsHow to configure Apache via command line?
I wonder if it is possible to configure Apache using command line (Terminal). So far, the most I can do is to run the command apachectl -S which gives me the settings, but this value returned is not…
-
2
votes2
answers208
viewsMerge linux commands - rm and diff
I’m learning to use Linux with Opensuse IDE version 13.1. I wonder if it is possible to merge the commands rm -r with diff - r? Goal Remove the files 1.txt,2.txt,2.txt of path1, because it does not…
-
2
votes1
answer666
viewsCommands on the Mac terminal
I tried to install the Composer on OSX 10.10.3 following the website’s instructions: curl -sS https://getcomposer.org/installer | php and after that I’m no longer able to execute the commands curl,…
-
2
votes2
answers58
viewsError using alias and read in Shellscript
I’m trying to create a command on. Ubuntu bashrc, however I’m having a problem, I’m trying to create a folder with the variable typed when calling the alias, but it’s giving error. When I open the…
-
2
votes1
answer410
viewsRun Rails commands on the Ubuntu terminal
I’m learning Ruby through an Alura course and I have a question. Every time I want to execute a Rails command, for example startar the server with the command rails server the following error occurs…
-
2
votes2
answers186
viewsConvert File Names to Alphabet Letters
Convert File Names to Alphabet Letters For example, I have several image/photo files in a directory, and I want to pass these long names of the respective images in names designated by letters of…
-
2
votes0
answers261
viewsHow to exchange the UUID of a partition via C code?
I am making a program in C, and through Linux, I have been able to "get" UUID easily, with the command blkid. This program needs to know if the disk on which it was installed is still the same and…
-
2
votes1
answer1641
viewsRun console command and read the return in PHP
In linux if I do the command df -h in the terminal it returns me the partitions, size etc ... as shown below: Filesystem Size Used Avail Use% Mounted on /dev/sda3 25G 6.4G 17G 28% / /dev/sda5 70G…
-
2
votes1
answer532
viewsWhat is Ansi Escape Code?
For handling of the linux terminal (other OS console also), is using a string started with a hexadecimal value 0x1B known as ANSI Escape Code. For example printf("\x1B[32mMy Text\n"). How does the…
-
2
votes3
answers7146
viewsHow to run the method inside a.py file by linux terminal
How can I call a method that is inside a.py file directly from the linux terminal, only I don’t want to enter it prompt of python For example [fedora@user ~]$ python arquivo.py metodo parametro…
-
2
votes1
answer218
viewsGit Terminal vs Node Terminal vs Windows Terminal
I’m having some difficulty realizing the need to have so many terminals installed on the computer when I need to use git or Node.js. What are the differences between the terminals, what can one do…
-
2
votes2
answers151
viewsDoubt about shell script
I’m studying linux, and it’s my first contact with the shell script, the documentation I wanted to do is the following: #!/bin/bash if [ uname - m = "x86_64" ]; then echo "sua versão é de 64bits"…
-
2
votes0
answers73
viewsTop command with php does not return the same terminal value
Well I am building a php code to monitor my CPU usage. I am using the top command that is native to linux. I am using a pc with Ubuntu server 18.04 for testing. Well what happens is that I open the…
-
2
votes2
answers1053
viewsHow to install Node.js in its latest version (12.x) from the Ubuntu terminal?
I’m trying to install nodejs on my Linux, but even putting the codes in for version 12.x: # Using Ubuntu curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt-get install -y…
-
2
votes1
answer1173
viewsJAVASCRIPT read a TXT file
I made a command in linux that saves in a txt the output of the terminal from time to time, in case the output of the command free -m, I wanted to read that file. txt so that javascript would update…
-
2
votes1
answer310
viewsHow to change numbers on the same Python line of execution?
Hello, I’m new to programming and I was doing a python countdown program. I did the code and it worked, but then I looked at the running program and the same using several lines just to change the…
-
2
votes1
answer75
viewsReversing the commit
Talk guys, I have a problem in my repository. I want to revert the repository to a previous commit, in which case it would be the commit that’s in red. commit…
-
1
votes1
answer100
viewsRemotely access another Unix machine with Vim
According to this video https://www.youtube.com/watch?v=pN-GCcnI9Es it is possible to access another Unix machine with Vim and continue to edit the file from where I left off. Like I can do?…
-
1
votes1
answer118
viewsWhy can’t I run the file located in the bin?
I need to use the file flare and flasm, which chown and permission are correct. Why can I execute only one and not the other? -rwxr-xr-x 1 daniela.morais sudo 64808 Mar 19 13:54 flare* -rwxr-xr-x 1…