Questions tagged [command-line]

This tag is for questions that are about using the command-line interface (CLI), including the use of standard command-line tools and shell commands. However, for questions that are specific to each shell (like Bash, ZSH etc.), use the tag of that particular shell as well.

Filter by
Sorted by
Tagged with
6 votes
4 answers
25k views

Comparing two text files

I have 2 big csv files, file1.csv which looks like this 1,2,3,4 1,4,5,6 1,7,8,9 1,11,13,17 file2.csv which looks like this 1,2,3,4 1,7,8,9 2,4,9,10 13,14,17,18 These are just random numbers that I ...
Lynob's user avatar
  • 6,675
6 votes
5 answers
73k views

ifconfig : Command 'ifconfig' is available in '/sbin/ifconfig'

My question is related to another open question. My echo $PATH gives me an output which is like /home/sahil/.rvm/gems/ruby-1.9.3-p125/bin:/home/sahil/.rvm/gems/ruby-1.9.3-p125@global/bin:/home/...
Sahil Grover's user avatar
6 votes
3 answers
5k views

Why does echo $$ return a number?

Why does running echo $$ in bash return a number like 7190, while running echo $ only returns a $?
user8292439's user avatar
  • 3,798
6 votes
1 answer
950 views

Why can't I rename a file from 'NAME' to 'name'?

I am unable to rename a file from RELEASE to release which is currently located on my USB flash drive. If I try to rename it through the file manager (Nautilus), it shows the error message as follows:...
Avinash Raj's user avatar
  • 78.6k
6 votes
5 answers
19k views

How to print both from the command line as well as through CUPS?

I have a printer that is being used for two purposes: Printing of regular documents (Word, Internet pages, etc) Direct printing from the command line (done by echo "text" > /dev/usb/lp0) This ...
user avatar
6 votes
6 answers
7k views

How to count the total number of files/folders on a system?

How can I count the number of all files/folders that exist on a system, using the command-line? I can find it out using a GUI, simply by opening the properties window for the entire / folder, but it ...
TellMeWhy's user avatar
  • 17.5k
6 votes
3 answers
6k views

How to make zenity "transient parent" warning disappear permanently [duplicate]

Zenity annoys me by always displaying the warning in terminal: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. Apparently I'm not the only one: linuxquestions.org - ...
WinEunuuchs2Unix's user avatar
6 votes
2 answers
7k views

date to display the EDT time

I want to check the time Eastern Daylight Time Time zone in Washington, DC, USA (GMT-4) Thursday, May 9, 2019, 8:11 PM However, $ TZ="EDT" date Fri May 10 00:12:25 EDT 2019 "EST" works ...
Alice's user avatar
  • 1,710
6 votes
2 answers
98k views

How to reinstall Ubuntu Software Center? [closed]

The system has become too slow and Terminal tool does not work. I deleted Ubuntu Software Center. How do I download it again?
heshamkhamis's user avatar
5 votes
1 answer
977 views

Wrapping lines bugs when trying to colour terminal PS1 (even when escaping non printing caracters)

Since I've been issue while working too long without plugging my laptop in, I'm trying to write a new PS1 which show my current battery status using upower. I'm almost there, everything is working ...
DrGorilla.eth's user avatar
5 votes
2 answers
5k views

Need help to interpret output of free command

I would appreciate help in interpreting the output of 'free -m' below. -bash-4.2$ free -m total used free shared buff/cache available Mem: 15793 ...
Dipendra Kothari's user avatar
5 votes
3 answers
2k views

How do I find and copy an arbitrary list of files in terminal?

I'm trying to get my head around finding files in terminal at the moment. I've found a lot of answers about how to find files to a specific pattern, such as files ending in a certain extension, or ...
david_lr's user avatar
5 votes
3 answers
4k views

Multiple File Extension Rename with single command

I received some important files via mail. There are about 150 files like these. The extensions of the files are named as zip1,zip2,zip3, zip_ etc. I just want to change the extension of these files ...
thewhiteeye's user avatar
5 votes
2 answers
385 views

Run TTY script every time I open a GUI terminal

When I log in to a TTY I get the following nice text: Ubuntu 16.04.03 LTS Log-in: username Password: Last log-in date/time Welcome to Ubuntu 16.04.03 LTS * Documentation: * Management: * Support: ...
Fabby's user avatar
  • 34.3k
5 votes
1 answer
10k views

Add GRUB menu item to boot into terminal

OK, this is what I'm trying to achieve: Have a separate menu option in GRUB, so that I can select it and boot straight into the command line - that is: without a desktop manager, but leaving the ...
Dr.Kameleon's user avatar
5 votes
1 answer
11k views

Setting system-wide environment variable using /etc/environment

I want to add to my PATH so that my computer (Ubuntu) knows where to interpret the "R" command (for launching R). I need this so a Terminal or RStudio can find where I installed R. I did all of the ...
lrthistlethwaite's user avatar
5 votes
2 answers
2k views

How to know the release date of my BIOS version?

It's pretty easy to check the release date of BIOS version directly from the terminal emulator using a simple single command. So how to do that?
Maythux's user avatar
  • 84.3k
5 votes
2 answers
37k views

script to open terminal, run command and keep terminal open

I have simple goal of creating script to open terminal, run command and then keep terminal open. Here is what I tried: #!/bin/bash xterm -e -hold ls It generates the following error: xterm: Can'...
user1700890's user avatar
5 votes
2 answers
26k views

What does `cat passwd | awk -F':' '{printf $1}'` do?

What does this command do? How do I see that in the terminal because I don't have anything when I write cat passwd | awk -F':' '{printf $1}'
alex's user avatar
  • 129
5 votes
3 answers
54k views

How to list the size of a directoy and subdirectories and files inside it by terminal?

Is there a command to list a directory total size and then each sub-folder and files inside it . I also want to sort them by increasing order so that I can see which folder is greater in size.
nux's user avatar
  • 38.1k
5 votes
3 answers
7k views

ASCII source file checker

For official Ubuntu documentation where the source English files are in docbook xml, there is a requirement of ASCII only characters. We use a "checker" command line (see here). grep --color='auto' -...
Doug Smythies's user avatar
5 votes
2 answers
2k views

How do I segregate multiple files based on file size into a sub directory?

I have a bunch of video files which I would like to segregate based on file size I have decided. Example: Folder BB has 15 files of various file size. I have sub folder set as: less than 100 MB ...
SIDDHARTH's user avatar
  • 209
5 votes
3 answers
6k views

How do I capture a screenshot of a window, and all the windows on top of it?

I'm using screenshots as regression tests for GUI software. Before deploying each new version, a series of automatic tasks is run against the old and the new version, screenshots are generated after ...
Clément's user avatar
  • 271
5 votes
4 answers
60k views

Ctrl+Alt+F1 - incorrect login

I have pressed the keyboard combination Ctrl+Alt+F1, because I wanted to see the output of my commands as they were being executed, but I got the following error: incorrect login.
Why Me's user avatar
  • 51
5 votes
1 answer
7k views

How to close only one window of an application?

I know that if I get the sid through : ps -ax | grep firefox and use : kill -9 "sid" I will close all the windows of the program. How can I close only one window of an application running through ...
DOCff's user avatar
  • 153
5 votes
1 answer
4k views

Sending normal-urgency notifications via notify-send

I'm currently on 15.04 (Vivid Vervet) and I can't seem to get any notifications to show unless they're sent with the urgency set to critical, like so: notify-send -u critical "IRC" "This is a ...
almk's user avatar
  • 91
5 votes
1 answer
18k views

How do I copy top X files from a directory to another using terminal command?

I have a directory more than 1200+ files. How do I copy the top 1000 lines of that directory to another directory?
Muhammad Abdullah's user avatar
5 votes
2 answers
16k views

Windows Subsystem for Linux: /home/user (Linux Home Directory Path) to use for ConEmu Terminal?

I'm trying to set up 2 terminal location tabs to open in my ConEmu Terminal on Windows 10 (for Windows Linux Subysystem) 1. Windows Home Directory C:\Users\USERNAME or... %USERPROFILE% and 2. ...
Oneezy's user avatar
  • 241
5 votes
3 answers
4k views

Is there a way to print info/man pages to PDF?

I would like to see info or man pages in PDF format so the formatting displays correctly. I see texi file can be converted (with texi2pdf) but I don't find any texi files with locate. In this case, I'...
userDepth's user avatar
  • 2,010
5 votes
1 answer
2k views

Access to logs of startup and shut down

My question is inspired by project rawhen This project used the command last -R -F reboot (163rd line in source code) to see periods when computer was running. You can see in docs, that this command ...
Daniel's user avatar
  • 387
5 votes
1 answer
603 views

Daily Download limit

I'm looking for a way to create a daily internet limit for my Ubuntu Server. All outbound traffic leaves Eth2, a usb dongle, this is prepaid and the kids eat it quickly. I need to divide my prepaid ...
A.Adverse's user avatar
  • 195
5 votes
2 answers
506 views

How to avoid messages from applications which I ran with a &? [duplicate]

I ran dolphin like this: dolphin . & I see messages in the console like these: QPixmap::scaled: Pixmap is a null pixmap How can I keep the console clean or silent?
epsilon8's user avatar
  • 121
5 votes
1 answer
981 views

Does apt have a directory where it stores all downloads?

I was wondering if apt has a directory where it stores all downloaded deb files through it. Any insight?
NerdOfCode's user avatar
  • 2,518
5 votes
1 answer
8k views

How to download multiple torrent links using transmission-daemon?

I am using transmission-daemon on my server with the WEB GUI. I was wondering if instead of each time clicking add torrent then paste the magnet link, I could instead call it in the terminal (SSH) ...
Hamza's user avatar
  • 121
5 votes
1 answer
6k views

Difference between the results of the top command and System-Monitor,Why?

Why is there a huge difference between the outputs' of top command and the system monitor when both programs were run at the same time. Please find attached is the screen shot showing the huge ...
Ankit's user avatar
  • 6,789
5 votes
1 answer
10k views

Set desktop resolution for standard 11.10 VNC server

Is it possible to specify a desktop resolution for the built-in ubuntu 11.10 vnc server? It defaults to 640x480 when I have no monitor connected (headless), and I can't find a way to change it. Does ...
Yngvefaen's user avatar
  • 506
5 votes
2 answers
8k views

Is there a command for the "Workspace Switcher"?

I just learned about "whereis" in terminal as a way to find a command to launch a given application. However, I still can't find (a way to find) the command to launch the "Workspace Switcher" in natty ...
nutty about natty's user avatar
5 votes
2 answers
4k views

How do I start in CLI mode using a special boot parameter for the Live CD?

Sometimes, I need to test some CLI programs without touching my real installation. For that purpose, I use a Virtual Machine running off a Live CD. Now, I don't need a full-blown user-friendly ...
Lekensteyn's user avatar
  • 174k
5 votes
2 answers
3k views

How to see terminal commands generated by GUI actions [duplicate]

I am new to Linux and only know my way around because of the GUI. Is there a way to see the equivalent commands on the terminal to do the same things as using the GUI? Thanks
Brendan's user avatar
  • 51
5 votes
6 answers
19k views

Ubuntu command-line suggestion

I've been using Ubuntu 20.04 and trying to get used to it. but repeating same command in terminal is quit boring. i just want some suggestion to get rid of it and how can i get visible command-line ...
Mojaer Ahmed's user avatar
5 votes
2 answers
12k views

Auto-login to console as root - no Xserver

I'm setting up a PC for a very specific purpose. It's going to do some stuff deep underwater... round about 3km. We don't fear fish hijacking the box locally ;). I'm trying to set up a login: no ...
wishi's user avatar
  • 641
5 votes
2 answers
35k views

How to change xorg.conf file with permission?

I want to edit the /etc/X11/xorg.conf file but I can't save the file. It says "permission denied." How can I edit the file?
user avatar
5 votes
3 answers
3k views

devnagari script in terminal

When I try to write in terminal in devnagari script, the vowels are shown separated from consonants (unlike how it is written). The same is the case when I open a file containing devnagari characters ...
deshmukh's user avatar
  • 4,061
5 votes
3 answers
44k views

How to access serial ubuntu host serial port on VirtualBox guest OS

I am having a difficult time trying to access a serial port on VirtualBox. My Guest OS is Windows XP and the host environment is Linux Ubuntu 10.04. The serial modem device works perfectly in Ubuntu. ...
user avatar
5 votes
1 answer
5k views

A program/command to help translate multiple file names

I have hundreds of files with different names that I want to translate into a different language. Is there an application/CLI action that would allow me to copy all this names as in a list/table and ...
user avatar
5 votes
1 answer
2k views

Is there a way to left-click links in gnome-terminal or am I out of luck?

I'm using irssi hosted on a remote computer for IRC, and it'd be super helpful not to have to hold Control or right-click every single link (so I can avoid multiple clicks or multiple hands). At this ...
Emily S.'s user avatar
  • 107
4 votes
1 answer
3k views

What does the asterisk (*) do in grep -nri "searchString" *?

Normally while searching using grep, the command I was using was this: grep -nri "String" whereas most of my colleagues do this: grep -nri "String" * What does the latter do (the * part)?
Vishaal Shankar's user avatar
4 votes
3 answers
4k views

Does bash (or any shell, for that matter) have an 'overwrite' mode?

I'm running similar commands on (e.g.) a set of files. As an example, let's say I'm doing something like this (this isn't what I'm doing, it's just an example): > cat path/to/dir/file01.txt [...
Wilson F's user avatar
  • 445
4 votes
1 answer
37k views

Format and partition second hard drive using terminal? (Ubuntu Server 14.04)

this is my first question on here... So, I’ve installed Ubuntu server 14.04 (32 bit) on a VirtualBox virtual PC. Originally i just made it with a 32gb virtual HDD so since then I’ve created a new ...
Damien Red's user avatar
4 votes
4 answers
944 views

How can I save a part of command lines into a new file using history command?

I am a beginner of bash. I know that type history can show all command lines and .bash_history save all of them. But if I want a part of command lines (e.g., current session) and save them into a ...
SRMZ's user avatar
  • 41

1
29 30
31
32 33
70