Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [command-line]

Questions about using the command-line interface (CLI).

0
votes
0answers
10 views

how to display hidden text using TR command in terminal?

I have a full hidden text named "ghost.txt" when i cat ghost.txt i see just a lot of space with no characters. how can i display the text?
0
votes
0answers
4 views

Ubuntu 16.04.5 LTS (GUI stop but no command terminal)

I am new to Ubuntu Linux. I was trying to disable the GUI with one of the following commands_ sudo telinit 3 (OR) sudo systemctl stop lightdm. After typing one of these commands, the GUI stopped but ...
0
votes
1answer
26 views

Save 10 lines from Help into txt file

I need to save first 10 lines from manual for command man to txt file. First step I have command man man but what to do next? Thanks for help.
-1
votes
1answer
14 views

Change Background colour/ Permissions for directories in terminal when copy pasted folders from another desktop

I have copy pasted some directories and files from other computer. Now if i open those files and directories i get a green colour for directories and in case of files the copy pasted files are in ...
1
vote
1answer
17 views

how to increase the ulimit limit in ubuntu 18? [duplicate]

I want to increase the ulimits and used the commands for it ulimit -n 1024 ulimit -n 10000 bash: ulimit: open files: cannot modify limit: Operation not permitted After lot of searching. I got a my ...
0
votes
1answer
36 views

NameError: name 'python3' is not defined [Jenkins]

I have a very simple task to do. I've written a script job.sh to invoke a python script: #!/bin/bash python3 pythonscript/script.py I want this script.py to run every hour, so I took help of Jenkins ...
-1
votes
0answers
12 views

Why “can't fork” error, when trying to run “ps” command through script? [duplicate]

I'm running a script, where basically I'm trying to find the number of a specific process. My code is given below: #!/bin/bash name="someProcessName" process_number=`ps | grep $name | grep -v grep | ...
0
votes
0answers
16 views

How to move to a particular folder by command line [duplicate]

Let's say I have the directory structure A-B-C-D-E where A is the root directory, and one more directory path, say A-F-G-H-I - here A is parent directory for folders F and B. Now my query is how to ...
0
votes
1answer
13 views

Remove garbage from Media/jw with command line

While running f3write erroneously at first I left some garbage files in my Media/jw directory - 1.h2w and 2.h2w. How do I get rid of them? I can find them with the GUI but I don't have permission to ...
0
votes
1answer
20 views

No manual entry for command [duplicate]

By following this Q&A I started using command instead of which when checking for the existence of a program. But man command returns: No manual entry for command Why there is no manual for it ...
0
votes
0answers
13 views

How do I ping two devices using the gateway in linux?

This is a bit of a networking query in linux using ubuntu 18.04 in vmware workstation 15.0 I have 2 devices, and the gateway in between What is the work process what are the commands do I use to ...
1
vote
1answer
32 views

How can I replace [0] with ascending numbers in a text file?

I want to change a file with text like this Application[0]=test_app1 Application[0]=test_aap2 Application[0]=test_app3 Application[0]=test_app4 .. to have ascending numbers like this: Application[0]...
0
votes
0answers
15 views

configuring network files in windows 10 linux bash shell

just wondering what are the right files to configure the network in windows 10 bash shell, internet works anyway, here is the last error I got from net manager error: cannot communicate with server: ...
1
vote
1answer
33 views

How to change passwords in bulk? Ubuntu 16.04

Is there a command that will let me change all the user passwords at once? I would like to find an easier way to perform this change for all 32 users on my machine, and doing them one at a time is not ...
0
votes
0answers
29 views

Detect image on screen and integrate it to a bash script?

I'd like to know if there's any package or command on ubuntu that can detect if a image or similar appears on screen and pipe its output to script. I would like to work on a video detection script, ...
0
votes
0answers
18 views

Can did I launch process separate of main process? In bash script

I try launch project on server and send query to him: similar to: #!/bin/bash java -jar patch/p-SNAPSHOR.jar curl -d localhost/go/param the script launches p-SNAPSHOT.jar and stops - waits for a ...
0
votes
1answer
16 views

How to emulate a remote host shell environment on my ubuntu 16.04 LTS workstation

On my desktop ubuntu host if I run a script with only the line echo $SHELL it prints /bin/bash But on a different host running busybox, if I do the same thing I get /bin/sh printed And I have ...
1
vote
0answers
9 views

Bash_alias, run a script with a parameter and close console [duplicate]

I just created a script that runs a command using a parameter like so: (firefox "localhost/?id=""$1" &) I created the alias like so: alias gotoid='/myscript.sh As you can see, my script ...
6
votes
1answer
349 views

builtin [ , -bash: [: missing `]'

while going through learn bash the hard way, I found that [ and test are both commands and synonyms, and both are builtin. As it is a builtin it should not give any error for builtin [ , but I am ...
0
votes
1answer
36 views

is there a terminal command to identify which partition my /home directory falls under [duplicate]

I'm familiarizing myself with disk partitioning, in the effort to get comfortable un/mounting. I'm working on my understanding of my filesystem hierarchy. My os runs through an LVM. So via my root, ...
0
votes
1answer
29 views

How to execute g++ code and run it as well using execl

I am writing a program in c++ that uses fork and then child program do execl which opens xterm and execute another program let's say p2code. Here is what I am doing execl("/usr/bin/xterm", "/usr/bin/...
0
votes
0answers
15 views

Updating Bashsrc Automatically On Login [on hold]

I've added a number of aliases to my .bashsrc file to allow me to use shortcuts for launching programmes. The aliases don't work until I run source ~/.bashsrc And even then the aliases only work in ...
0
votes
0answers
9 views

How can i run nsqlookupd on remote terminal detached, so i can close that terminal?

How can i run nsqlookupd on remote terminal detached, so i can close that terminal? I am trying to set nsq message queue on remote ubuntu server, how to do this and close terminal? Where can i see ...
0
votes
1answer
31 views

Terminal only outputs last few lines and everything before is deleted

I am using grep to find strings in multiple files. It outputs a lot of text which is what I need, but then terminal just deletes all the output while grep continues working and so I can see only last ...
0
votes
1answer
23 views

Differences using the slash in the server terminal or server terminal with GUI

I have installed the 18.04 LTS server version. I did different commands like: tar -xzf xxxx.tar.gz xxxx/ (without GUI) hadfs dfs -put input /input (with GUI) I did other commands which work with ...
0
votes
0answers
13 views

ubuntu 18.04 - terminal frozen

In terminal when I type a commande (ls for instance) and press enter, nothing happens. Only Ctrl+C seems to work. Is it a known issue? How to deal with it?
1
vote
1answer
63 views
+50

How to increase the update frequency of upower (Power-Statistics)?

Working on Ubuntu 18.04. To get the discharge rates I was comparing powertop and the inbuilt Power-Statistics app that seems to use upower. Powertop updates its results every few seconds. It is also ...
-1
votes
0answers
25 views

I'm unable to write my program in Vi and my backspace key is not working inside the file [on hold]

I'm unable to write my program in Vi. Vi filename.f90 Implicit none Now backspace key isn't working inside the file.
-1
votes
2answers
123 views

How can I solve this error related to gnome-terminal & software updater?

Due to this error, my terminal is neither opening from shortcut key (CTRL+ALT+T] nor from launcher. It only opens from "Open Terminal" option by right clicking on desktop. prateek@Home-Alone:~$ sudo ...
-1
votes
2answers
40 views

How to make changes in .bash_profile permanent?

I added the following to my .bash_profile alias lr='ls -hartl' alias q='grep -i' alias get='curl -OL' then source .bash_profile the aliases worked as expected. But if I close the shell and ...
2
votes
1answer
83 views

Help with find command to identify SUID file please?

I am doing an online course and could do with some help please. Please see the image below. I am using find to locate a file with the SUID bit set. The question asks "What is the contents of the file ...
-2
votes
1answer
47 views

Can't run java program with terminal in Ubuntu 18.04.2 [on hold]

I can't run any java program with terminal: openjdk version "10.0.2" 2018-07-17 OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.2) OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-...
1
vote
1answer
46 views

How to solve the error “Failed to launch Terminal” after upgrading python?

How to solve the error "failed to launch Terminal" failed to execute child process GNOME-Terminal ( No such file or directory ) ? Please HELP us to solve this error. Currently I have upgraded Python ...
2
votes
1answer
31 views

Modify creation and last modified date for entire subdir

This is only an issue because some antique software has Y2K issues, I need to move the file creation dates from 1990's to 2000 but for files across 21 subdirectories. A way to manage it recursively is ...
1
vote
1answer
23 views

Can you cancel an upgrade in progress? Upgrade from terminal hangs at same point, every time. Even on a fresh reinstall

Picture of screen: https://photos.app.goo.gl/HkKeBTEQr57G53Kq6 I'm really not sure what to do at this point.
0
votes
0answers
41 views

How can I paste CTRL+Z into a terminal, and have it behave as if I had typed it?

I want to create a text string to paste into terminal to create several short text files and write text to them using the cat > command and then save and close each file before the next one is created....
0
votes
0answers
14 views

OpenFoam Win 10, Ubuntu Bash installation fails

I am trying to install OpenFoam on ubuntu bash on Win 10. I am following these steps:OpenFoam installation on win 10 Ubuntu bash At this step: echo "source /opt/OpenFOAM/OpenFOAM-v1806/etc/bashrc" &...
0
votes
0answers
12 views

Using keyring to automatically authenticate with wget

My university offers all of the curriculum online and available for everyone that has a username and password. So naturally i wrote a shell script to just crawl in every needed course and download all ...
1
vote
1answer
42 views

gnome-terminal will not load, sudo gnome-terminal will

My gnome-terminal appears to have stopped working. Clicking the icon, Ctrl+Alt+T, and Alt+F2 -> gnome-terminal all have the same effect: the mouse changes to a spinner, the icon shows that gnome-...
0
votes
1answer
36 views

Capturing fdisk output into an array and printing it

I want to get a list of partitions on the system... I use this command sudo fdisk -l | grep '^/dev' | awk '{print $1}' The output is /dev/sda1 /dev/sda2 I need to get this result as first ...
0
votes
1answer
35 views

Is it possible to add a white space at start of my commands? [on hold]

I would tweak my custom commands using a whitespace in Linux terminal. I have used echo " " + cmd but it doesn't works. If someone has any hint, would be great, thanks.
1
vote
0answers
12 views

Are there any command line calendar (ics) readers which can handle rrule (recurring events)?

Using this demo calendar: For graphical calendar readers, the output looks like this: But from the various npm and python projects, all I get is variations of this, where it only shows the first ...
0
votes
0answers
28 views

Error when I open the terminal - bash: alias: Virtual: not found

I keep getting the following error: bash: alias: Virtual: not found bash: alias: Environment: not found bash: alias: Wrapper: not found This is the content of my ~/.bashrc: # ~/.bashrc: executed by ...
0
votes
2answers
325 views

What does this mean root@DESKTOP-9R2GIKO?

What does this mean root@DESKTOP-9R2GIKO? I donk think this direct to my Disk. When is use the ls command, the following is printed. bin dev home lib media opt root sbin srv tmp var ...
0
votes
0answers
21 views

SOLVED Switching user in automated scripts like cron jobs

If I run su -c "notify-send test" myusername as root, the command will be executed by myusername (me). But if I place a script in /etc/cron.daily or /lib/systemd/system-sleep and it is ...
0
votes
0answers
21 views

Upgrading from version 15.10 to the next one [duplicate]

I want to upgrade my old version of Ubuntu 15.10 to a new one, I just tried to write in the shell sudo apt-get upgrade, sudo apt-get clean and my errors has been represented in the pictures. I ask ...
-1
votes
0answers
22 views

after entering firefox in command prompt, I cannot get $ in to type anything [duplicate]

this is my command prompt. after enter firefox, I cannot do anything.
0
votes
0answers
25 views

wc -l < ala.txt > ala.txt gives always 0 [duplicate]

Can someone help why the expression wc -l < ala.txt > ala.txt gives always 0 regardless of how many lines are in the file?
0
votes
0answers
50 views

Configure MS VPN in Ubuntu Command line [closed]

How can I connect to Microsoft Windows VPN using a command line such as nmcli?
0
votes
2answers
30 views

How to remove first X lines from file up to the first occurrence of particular string?

I have many PostgreSQL dump files such this and because I import these files automatically into another database server (H2) and SET command is not compatible with this database, I need to remove all ...