Questions tagged [command-line]

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

Filter by
Sorted by
Tagged with
32
votes
4answers
42k views

apt full-upgrade versus apt-get dist-upgrade

In accordance with man pages: apt has parameter full-upgrade apt-get has parameter dist-upgrade. Are both the same command? btw: which is officially the recommended command in Ubuntu 16.04? apt ...
44
votes
4answers
237k views

Install Nvidia driver instead of nouveau

I've installed Ubuntu 14.04 and I'm experiencing a fuzzy/blurry screen and bad support for multiple screens. I realized that Ubuntu installs nouveau as default, but I need to install nvidia drivers, ...
4
votes
2answers
98 views

Copying directories in linux only if it contains the specified file

I need to make a copy of all the folders under /parent (into a new location) but only if it has 123.dat - in which case I need to copy the folder too, but none of the other files it contains. So that ...
0
votes
0answers
24 views

SUPER+D does not maximize minimized opened windows with SUPER+D after right-click on desktop

I have some opened windows in foreground. If I do SUPER+D the desktop will be shown minimizing all opened windows. It I right-click on desktop, then I can't reuse SUPER+D to maximize those windows. ...
0
votes
0answers
14 views

run batch files with setsid

I want to run many tasks which are defined is a batch file, for example task.sh for i in 1 2 3 4 5 do setsid python main.py 1>data/${i}_a.log 2>&1 sleep 3 done echo "OK 1" for i in ...
1
vote
0answers
43 views

bash help (ubuntu)

I made a script that has an update command running first for example sudo apt -y update I need to make sure that if SYSTEM updates are available , the script will ask me if i want to update so ...
2
votes
1answer
40 views

Inserting #' to a configuration file using sed

I'm trying to use sed to insert a # to a configuration file. I've tried: sed 's/33/#' /path/to/file But get the output sed: -e expression #1, char 6: unterminated `s' command I've also tried sed ...
670
votes
9answers
2.1m views

How to install updates via command line?

When I log into my web server via SSH I see the information: 88 packages can be updated. 80 updates are security updates I tried apt-get update then apt-get upgrade but each time I log in I still ...
1
vote
0answers
13 views

How to open Jupyter Notebook in command line with 'jn' instead of 'jupyter notebook' [duplicate]

I want to create a shortcut in command line to open jupyter notebook to avoid typing long command. also i am curios why 'TAB' key autocomplete 'jupyter' but not 'notebook' when i type jupyter notebook ...
1
vote
4answers
1k views

How to display line numbers with pygmentize

I often use the command pygmentize filename.py to show color source files with code formatting. This works like a charm. I now also want to show line numbers like cat -n filename.py does. I read ...
0
votes
1answer
32 views

Software installation problem: cannot adding path to /usr/local/bin

I am currently installing a software in a local directory(/some/local/directory/bin/). I tried to copy it into the usr/local/bin/ but I am not allowed. I am wondering that how can I execute the ...
19
votes
5answers
6k views

How to display the name of file which I am currently editing with vim on terminal title?

I am editing multiple files located in the same folder, in multiple tabs, on a single terminal. pwd(directory in which I am currently working) is displayed on the top of the heading of the terminal, ...
132
votes
7answers
322k views

Automatically enter input in command line

I'm running a script that it requests entering 'y' on each operation, I am looking for a solution like $ ./script < echo 'yyyyyyyyyyyyyy' to pass all my inputs in one time.
1
vote
1answer
27 views

terminal - count how many types of (file) extensions exist with their associated files in current directory

I've about 0.1 million images in a directory with all kinds of extensions (gif, jpeg, png, tiff, etc). Now I want to find out how many types (of extensions) are there in the current directory, ...
29
votes
9answers
93k views

Count total number of files in particular directory with specific extension

I want to count the total number of files in particular directory that ends with ".mp4" extension. I am getting following command: ls -F |grep -v / | wc -l It count all the files in particular ...
0
votes
0answers
25 views

Compare content of 2 files using diff - no such file or directory problem

May I know how can I compare content of two files? I tried these codes below but I get this message: sh: diff: No such file or directory. The commands that I tried are: plink.exe 10.3.0.121 -l ...
0
votes
1answer
4k views

E: Unable to locate package jasper-lib ( also happened to libpng, and jasper-dev )

Hello so I'm using Ubuntu 17.10 and I needed to install the following to work as a libraries for the WRF software. tcsh jasper-dev jasper-lib libpng libpng-dev m4 the bolded ones got installed when ...
-5
votes
0answers
26 views

All day long i couldnt install a single software in linuxmint [on hold]

so basically guys , i installed linuxmint cinnamon 19.1 today first time using linux ever and i liked it so much except i couldnt install any software i tried snaps but in linuxmint there's no gnome ...
0
votes
1answer
41 views

Why can I not install auto-apt?

OS: Ubuntu 18.04 I was looking at the Ubuntu documentation on how to install auto-apt. However, when I run apt-cache show auto-apt I get N: Unable to locate package auto-apt E: No packages found ...
0
votes
1answer
39 views

Alsamixer finding “item” by command line?

I have 3 playback devices: TV (HDMI), Headphones, Speakers TV uses the GPU soundcard through HDMI, Headphone and Speakers use integrated Mainboard sound. In the following alsamixer screenshot, you ...
9
votes
0answers
308 views

gnome-terminal hides ending characters of the current path's first row

I'm using Ubuntu-18.04.2's original ~/.bashrc file and I have done no changes in any original files. Do Ubuntu 18.04.2 users experience the problem I'm going to describe to you down below? Let me ...
14
votes
0answers
3k views

Get binary delta-encoded recursive diff of two directories as single patch file in CLI (and online use)

Essentially, I am looking for a GNU/Linux tool, that could recursively iterate through two directories, find file changes/additions/deletions; and for all changed files, output a diff. This can ...
2
votes
2answers
43 views

/usr/bin/rename: Argument list too long

I'm trying to rename a bunch of files and folders. I tried this command rename 's/test/test2/' but I got unable to execute /usr/bin/rename: Argument list too long I searched a lot and tried ...
0
votes
0answers
27 views

How to execute Alt + F2 + r + Return (Gnome Shell Reset) through the Terminal

I'm trying to automate the installation of a Gnome Tweaks extension (Dash to Panel) and, at the end, it requires me to restart the Gnome Shell through Alt + F2 + r + Return (I think that Gnome Tweaks ...
0
votes
2answers
45 views

cp: cannot create directory '/home/rexxi/usr/lib/firefox-addons/plugins': No such file or directory

I tried to move files from downloads dir cp -r ~/Downloads/flash_player_npapi_linux.x86_64 ~/usr/lib/firefox-addons/plugins And I got a error message cp: cannot create directory '/home/rexxi/usr/...
2
votes
1answer
3k views

Ubuntu 16.04 installation using serial console - unreadable characters

I'm trying to install Ubuntu on an appliance that does not have ports for a display (i.e. VGA, HDMI, DVI). I have made a bootable USB stick using the Ubuntu ISO using Unetbootin and edited three files ...
0
votes
0answers
41 views

Date: Invalid date [on hold]

I keep on getting this error everytime I run csh script date: invalid date ‘2D1B/E1//S AS:/D:AT’ ... date: invalid date ‘/nisa/3E - 1 day’ date: invalid date ‘/nisa/3E + 1 day’ Can someone please ...
243
votes
6answers
409k views

How to see time stamps in bash history?

Is there any way I can see at what time the commands were executed from the bash history? We can see the order but is there any way I can get the time also? Bottom-Line: Execution time in the Bash ...
10
votes
6answers
2k views

How to remove the first colon ':' from a timestamp?

I am new to programming!! Can anyone help to remove the : at the first position in a timestamp: :29.06.2019 23:03:17 Presently I am trying to do it using awk/cut commands as shown below: TDS="$(...
5
votes
2answers
3k views

How to control gnome-terminal from Python scrypt?

I am developing an application in PyGtk, and would like to launch a gnome-terminal and output commands to it. My user should then be able to modify the command, or maybe ignore using the up arrow ... ...
0
votes
0answers
35 views

Compiling ffmpeg for android

I am trying to compile ffmpeg for android. I have followed the steps in the tutorial. Here's the link to the same https://yesimroy.gitbooks.io/android-note/content/compile_ffmpeg_for_android.html ...
1
vote
0answers
36 views

youtube-dl: ERROR: This video is not available… Which video?

When using youtube-dl version 2019.07.16, if I run the following command: $ youtube-dl --get-id https://youtube.com/user/youtube_channel I will sometimes get an output like this example: dIJxA-...
3
votes
1answer
4k views

Generating a single LaTeX file by merging different LaTeX files

I have a main LaTeX file which \input{} (aka imports) many other LaTeX files. For example: \documentclass{article} \begin{document} \input{input1.tex} \input{./Input_folder_1/input2.tex} \input{...
3
votes
1answer
65 views

How to reboot system if specific directory modified as a systemd service

I'm trying to create systemd service to reboot device. When hello.txt file content or file modified, system needs to reboot. I try to achieve but I don't know rebooting indefinitely. Here is my ...
22
votes
3answers
6k views

Why do I need root privileges to umount a drive at the command line, but not in Nautilus? How to change that?

When I insert a thumb drive, media card, or USB hard drive, to unmount it via the command line, I need to use: sudo umount /media/the_device But, I can unmount the device in a file manager like ...
0
votes
1answer
3k views

How I can open .kmz files?

I am new in ubuntu-linux, and I was wondering if there is any way to open or view .kmz file-output through ubuntu-linux commands? Currently I'm using a macbook (XQuarts) bash-ssh connected to a remote ...
2
votes
4answers
237 views

How to extract interesting piece of output in bash

My output of command is like: File Size : 23 kB File Size : 9.8 kB File Size : 9 kB File Size : 128 kB File ...
17
votes
3answers
44k views

What's a terminal similar to iTerm2? [duplicate]

My terminal choice has always been Guake, but at my job they have some Macs and I've started to use iTerm2 and I really love the split-functionality. So I was searching for something similar in ...
52
votes
9answers
136k views

How do I increase console-mode resolution?

I've recently clean-reinstalled Maverick on my computer. It uses propietary Nvidia drivers. Everything runs just fine, except that I'm seeing lots of ugly text when booting and shutting down Ubuntu. ...
0
votes
1answer
27 views

Access python os.environ var in virtualenv with sudo?

I am working on a django project where I have to keep secrete information to python's os.environ. by following below link http://barkas.com/2016/set-environment-variables-activating-virtualenv/ code ...
243
votes
16answers
592k views

How can you log out via the terminal?

Is there a terminal command that will log you out of your current desktop session and take you back to the login screen?
0
votes
1answer
70 views

Trying to run a script in a new terminal tab from a running script

I'm kind of confused, I thought doing something like this would work : #!/bin/bash wget https://myscript.sh chmod +x myscript.sh exec gnome-terminal --tab --active --title="my title" -- myscript.sh ...
0
votes
1answer
27 views

Is it possible to identify windows using regular expressions in xdotool?

OS: Ubuntu 18.04 Say I have the following five open windows with mozilla in their title: $ wmctrl -lx 0x03e00018 0 Navigator.Firefox kububb Ubuntu Manpage: xdotool - command-line X11 automation ...
24
votes
7answers
7k views

Why is it possible to delete the entire file system?

After committing the infamous mistake of deleting my entire file system via sudo rm -rf /*, recovering from the horrendous damage that I had done and coping with the fact that I just lost 6 years off ...
4
votes
2answers
5k views

Error found while loading /home/[username]/.profile

When the system loads it gives the following error: Error found while loading /home/[username]/.profile mesg: ttyname failed: inappropriate ioctl for device As a result the session should not be ...
-1
votes
0answers
25 views

Make a list of things we need to learn (Linux) [duplicate]

For those of us who are learning Linux, we need to create a list of things to test our knowledge. To determine how proficient we are at Linux and what we need to know next. What should be in this ...
11
votes
8answers
5k views

Command line calculator that keeps fractional values

I just found a good command line calculator program called bc and was satisfied with it until I discovered it rounds off fractional values, thus causing loss in precision. According to its man page: ...
1
vote
1answer
4k views

Command 'gradle' not found,How to run gradle command from any directory

I am trying to learn gradle build. I followed this link to install gradle and i followed the steps mentioned in this link. https://gradle.org/install/#close-notification to verify it i am issuing ...
1
vote
1answer
55 views

Environment variables of current process

I'm trying to find the environment variables of a currently running process. Let the executable be test. What I'm doing: ./test // first run test Inside the program I have a print statement doing ...
0
votes
0answers
37 views

System recovery: can’t manipulate encrypted files

Something has used up all the disk space on my home directory and caused my computer to freeze up. I tried to reboot and the system would not do so, and I then booted into recovery mode. Using the ...