The command-line is the interactive interface to your shell.

learn more… | top users | synonyms (1)

4
votes
3answers
347 views

What's the quickest way to find duplicated files? [duplicate]

I found this command used to find duplicated files but it was quite long and made me confused. For example, If i remove -printf "%s\n", nothing came out. Why was that? Besides, why they used xargs ...
-4
votes
1answer
48 views

Is the value of a variable lost after a command is executed?

There is a functional difference between using: n=$1 shift And using: n=$1; shift in bash and zsh: the value of n is lost after the shift is executed in the first example. But both have the ...
0
votes
3answers
114 views

Help with tr command

Assume that the file ft has 25 lines of text. Explain the command: tail -15 ft | tr "a" "A" > ft and tell me how many lines the file ft has after the execution of the command. I understand that ...
0
votes
3answers
45 views

Get the file with the maximum month year

I have a requirement to get the file with the maximum month year. We have files in a directory as below: Zmx_0416_control.txt Zmx_0316_control.txt Now from these files, I need to get the file ...
20
votes
2answers
4k views

copy (to X clipboard) shortcut in .tmux.conf

In order to copy text to X clipboard in tmux, what I currently do is: go selection mode with prefix[ start selection with space (using mode-keys vi btw) select the text and press enter copy tmux ...
10
votes
5answers
16k views

How to remove blank lines from a file in shell?

I want to remove all empty lines from a file. Even if the line contains spaces or tabs it should also be removed.
0
votes
1answer
3k views

IBM V7000 scripts for monitoring

Hello (I'm no hard core coder:), I try to develop a script to do some very basic monitoring on an IBM SVC. My goal is to get some information about the nodes and my quroum status and then send ...
0
votes
0answers
25 views

CLI connection from Raspberry Pi3 to bluetooth in solar PV inverter

I am new to bluetooth & trying to learn more so I can connect to my inverter. We have been able to use various command-line tools to: - scan & find my bluetooth mac address. - browse the mac ...
3
votes
1answer
66 views

command line tool to reserve code high light in output file?

For example, when using ack to search code in source files, the output is high lighted. But if you pipe the output into a local file, you lose the code high light. Do we have a command line tool to ...
7
votes
1answer
2k views

What do I need to add a virtual IPsec adapter?

I'm trying to set up an IPsec connection manually from the console with iproute2. What I need is a virtual interface (at best, a virtual IP address could also be sufficient) that IPsec-transforms ...
0
votes
2answers
18 views

Website is active but domain name not showing on WhoIs lookup from Linux command-line

I am trying to lookup the WhoIs entry for the following domain: anorien.csc.warwick.ac.uk However, while typing the URL directly into the browser displays a web-page, when I type: whois ...
12
votes
4answers
25k views

How to write text into the first line of a file?

I've been looking around sed command to add text into a file in a specific line. This works adding text after line 1: sed '1 a\ But I want to add it before line 1. It would be: sed '0 a\ but I ...
2
votes
3answers
38 views

Show character at position in a file

I would like to print the character at a given position using only the command line. E.g.: <command> 5 Would output a if the 5th char of that file was a. Since I am dealing with big files, ...
1
vote
2answers
19k views

Access USB drive on Ubuntu server

I'm currently using a Ubuntu 14.04 server with command line access only. My .html files are on my Windows and I want to transfer them. What is the path in my Ubuntu server to get into my external ...
2
votes
1answer
26 views

Is there any way to detect file type and open it with GUI in terminal in Fedora? [duplicate]

For example , there are two files a.ppt and b.jpg . And I can call a magic method to open them appropriately just like : magic_method a.ppt magic_method b.jpg And it open libreoffice writer and ...
1
vote
0answers
23 views

What command is gimp using to print?

All programs/commands I attempt to print certain PDFs with (lpr, lp, Okular, Evince, Xpdf) print solid black pages. The one exception is Gimp, which allows me to import PDFs one page at a time and ...
0
votes
1answer
42 views

Tried to install Nvidia drivers, now I can only boot to tty [duplicate]

I'm on Fedora 23. I followed this guide and got all the way up to the "2.7 Reboot to runlevel 3" step. I did that step then rebooted and now I can only boot into tty. I tried to continue on with ...
0
votes
3answers
39 views

Using grep and looking for unique occurrences [duplicate]

I have a text file of this type, and I would look for any lines containing the string Validating Classification and then obtain uniquely the reported errors. I do not know the types of possible ...
3
votes
3answers
189 views

How to list available packages in a specific repository on Debian?

Is that possible to list available packages in a specific repository on debian jessie using the command line?
111
votes
8answers
520k views

How do I zip/unzip on the unix command line?

How can I create and extract zip archives from the command line?
2
votes
1answer
61 views

Create a file of fixed size with specific contents

I want to create a file of fixed size (1G, 10G, 100G etc) with a single random word of length within the specified limit on every line. I basically want this to run a benchmark which will sort the ...
7
votes
4answers
10k views

Unzipping a batch of files

When I try unzip filename.zip it works. However, I need to unzip a series of zip files. Why are: find . -name "*.zip" -print0 | xargs -0 unzip or ls *.zip | xargs unzip not working? In ...
5
votes
4answers
38k views

Fix “firefox is already running” issue in Linux

I am trying to open Firefox in CentOS, but I'm getting the following message: Firefox is already running but is not responding and Firefox doesn't open. I tried this in command line: kill ...
4
votes
4answers
434 views

Run the same command multiple times in background

How is it possible to run multiple commands and background them using bash? For example: $ for i in {1..10}; do wait file$i &; done where wait is a custom binary. Right now I get an error: ...
7
votes
1answer
3k views

List of modified files of the past 24 hours

Is there a reliable way to have a system that mails me the list of files that were modified in the past 24 hours inside a set of directories? (like /home/*/public_html/* and /home/*/*domains/*)
0
votes
1answer
1k views

How to boot GUI on a fedora 21 server through the command line

I am trying to install a GUI onto my fedora21 virtual machine. The only problem is due to the nature of work i am doing it needs to be done through the command line( i am using a program called ...
50
votes
13answers
123k views

What is the fastest way to view images from the terminal?

The terminal is very fast and convenient way to quickly access directories and files (faster than find and click on the directory). One thing that it cannot show in text-mode is "pictures". What ...
55
votes
9answers
141k views

How to overwrite target files with mv?

I have a ton of files and dirs in a subdirectory I want to move to the parent directory. There are already some files and dirs in the target directory which need to be overwritten. Files that are only ...
0
votes
3answers
773 views

How to stop Rainlendar from hiding on the Linux Mint desktop?

Rainlendar is a great tool to keep events and tasks on the desktop (I did not find a better solution yet). The problem is that the application completely hides if you press: The "Show Desktop" ...
0
votes
0answers
64 views

Running a batch script remotely using rdesktop

I have a setup that implies calling rdesktop on a remote machine which is accessed through ssh: user@192.168.1.110:~$ ssh user@192.168.1.120 -X and then running rdesktop as: user@192.168.1.120:~$ ...
1
vote
0answers
16 views

Splitting correctly avi file

I'm trying to split an avi file as follows. avconv -i file.avi -vcodec copy -acodec copy -ss 0 -t 10 out.avi and this works (It creates a chunk with first 10 seconds of the video). The problem is ...
64
votes
11answers
76k views

How do I convert an epoch timestamp to a human readable format on the cli?

How do I convert an epoch timestamp to a human readable format on the cli? I think there's a way to do it with date but the syntax eludes me (other ways welcome).
1
vote
0answers
39 views

How do I go about downloading 100,000 torrents?

I want to download a large number of torrents on Ubuntu, while keeping a positive ratio on the torrent tracker. Since various torrent clients won't support that many active torrents (from what I ...
-1
votes
3answers
47 views

How to swap two words with sed and with multiple delimiters?

Just letters are accepted in words, any other characters are delimiters. I want to exchange the first word with the third word. sed -E 's/([A-Za-z]+) [^A-Za-z] ([A-Za-z]+) [^A-Za-z] ([A-Za-z]+)/\3 \2 ...
2
votes
2answers
65 views

“ls” command stuck trying to list a stale mount point. How do you kill/stop it?

When working with remote filesystems such as sshfs or smbfs, it is command that they become stale due to network problems. To check if the mount is stale or not, I usually use the command ls to see if ...
3
votes
1answer
2k views

How to access u boot environment from linux?

How can I access and change the u-Boot env variables in linux. Using the u-boot/tools/env directory in u boot directory: u-boot$ make env Which created the executable file fw_printenv. I copied ...
3
votes
4answers
50 views

Search within a search

I've gotten used to using grep for my command line searches and wanted to know how to successfully do a search using the result of another search. Here's my attempt, where I am looking for 'tool' ...
3
votes
2answers
760 views

Jingle CLI client / Jitsi replacement / VOIP

I am looking for a Jingle client for the command line. Currently, I use Jitsi, but my dreams of not needing the GUI for more than just web-browsing are not realized due to my reliance on this ...
-1
votes
3answers
28 views

Write in a part of a document the current time? [closed]

How can you write the current time from terminal in a document? In a specific place of the document, I mean.
1
vote
3answers
96 views

Why 'cat' can't read content of pdf files?

When tried the command cat < 1.pdf it printed a very large output, which was totally incomprehensible to me. The content of 1.pdf was abc. The output was like this: ...
1
vote
2answers
24 views

Wait for program in a clean way (e.g. in a different terminal window)

If you want to execute one command and then another one after the first one finish, you can execute command1 & which prints the PID of the process executing command1. You can then think of ...
19
votes
12answers
20k views

How can I “cat” a file and remove commented lines?

I'd like to know if there is a way that I could cat file like php.ini and remove all lines starting with ; For example, if the file contained this: ; - Show all errors, except for notices ; ...
1
vote
1answer
37 views

How to organize files in Linux/Unix shell?

I would like to try to organize my documents, and I was told that I can do this using the linux/unix cygwin terminal. I searched for the command in google but all I ever did find was organizing the ...
0
votes
1answer
52 views

How to run a command on remote host from a service?

I have a service in '/etc/init.d'. In that service, I run a command on a remote machine using ssh as a user. Currently I do this in the following way: sudo -u user bash -c "ssh user@172.21.6.70 ...
0
votes
0answers
24 views

Multicore benchmark

I'm looking for a way to benchmark a multi-core CPU. I found this #!/bin/bash echo "scale=$1; a(1)*4" | bc -l The first argument is number of digits to calculate. Now we can run in parallel (4 ...
1
vote
5answers
14k views

How to copy a file from a remote network to the local desktop

So I used SSH to remotely login to another computer on a network. I have many files that I would like to copy over to my local desktop. I am trying to follow this How-to : However, I think one ...
2
votes
2answers
61 views

What is happening after kill -CONT <PID>?

I have suspend a process through kill -TSTP <pid>. Then tried to continue it with kill -CONT <pid>. But After completion of process, control is not returning to bash. Why this is ...
2
votes
0answers
383 views

m: command not found

just tried to compile the R-language from sources but my make aborted with m -f liblzma.a make[4]: m: Command not found I eagerly searched the web but it seams it's impossible to find the command ...
2
votes
1answer
40 views

How can I merge 2 disk images into one with 2 partitions?

I have 2 (relatively small) disk images for qemu (raw format) containing different filesystems (say fat and ext4). I want to put them into an usb stick as two different partitions so that I can plug ...
3
votes
1answer
50 views

free command output: gentoo (redhat?) vs debian

I noticed there is a difference between outputs of free command: On debian: $ free -h total used free shared buffers cached Mem: 4.0G 3.4G ...