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

learn more… | top users | synonyms (1)

2
votes
1answer
83 views

When should you use subshells vs `xargs`?

Many simple commands using xargs could be rewritten as commands using subshells. For instance, here is something I was using earlier today, to concatenate the ten largest binaries in /usr/bin, written ...
3
votes
2answers
50 views

Pipe / direct image / video output to foreign server

I am working on a Project that involves taking the output from a Webcam which is in either jpg or h.264 format, and outputting it to a foreign server (HTTP / FTP would work, I am open minded). What is ...
-2
votes
1answer
117 views

What is the difference between egrep, fgrep, find and grep commands? [duplicate]

i am new to linux console, however i know i can use grep to find files however i am wondering what the particular difference between these common commands ? They all seems to be equal in meaning to ...
2
votes
1answer
67 views

Copy files based on date/time from subset of directories

I'm teaching a class where (~80) students are submitting assignments that I can access via webdav, organized by student in directories named by their unique identifier. The students are split into ...
2
votes
3answers
5k views

CentOS 6 - nameserver entry in resolve.conf resetting after restarting network services?

In /etc/resolv.conf, I've changed the nameserver line to a new IP address. After saving and exiting, I run service network restart. I then go open /etc/resolve.conf again and see that the IP address ...
7
votes
2answers
697 views

Is there a correct way to list the subdirectories of the current directory?

I can find the subdirectories of a directory by ls -d -- */ or ls -l | grep "^d" but both of these seem indirect, and I would imagine that there would be a standard way to find just the ...
1
vote
2answers
34 views

Slight change to command to compile C++ program causes error

This morning , I was trying to compile a C++ program using the following command on the command line g++ -o foo.cpp foo I spend about an hour trying t to resolve why I kept getting undefined ...
2
votes
1answer
102 views

Running a process multiple times at the same time

I have a c++ program with opencv library which takes an image as input and perform pose estimation,color detection,phog. When I run this program from the command line it takes around 4-5sec to ...
9
votes
2answers
182 views

How can I redirect `time` output and command output to the same pipe?

Suppose I have a binary called foo. If I want to redirect the output of foo to some other process bar, I could write ./foo | bar. On the other hand, if I wanted to time foo, and redirect the output ...
0
votes
1answer
41 views

Installing fonts via terminal

I have downloaded font files in .ttf format, I want to install these fonts via the terminal, What is the command for that?
2
votes
1answer
83 views

How to connect to virtual /dev/ttyX from same machines pts terminal?

I want to get output/input from /dev/ttyX console (normally accessible directly using keys ctrl+alt+FNr, where Nr is number of /dev/ttyNr: ctrl+alt+f4 access /dev/tty4). I want to view and control ...
0
votes
1answer
26 views

Can you provide an example use for `zrun`?

I was reading the manual pages for the package moreutils but I did not understand the page for zrun. My manual page is almost the same as the die.net one: ZRUN(1) ...
140
votes
5answers
7k views

What's the difference between $(stuff) and `stuff`?

There are two syntaxes for command substitution: with dollar-parentheses and with backticks. Running top -p $(pidof init) and top -p `pidof init` gives the same output. Are these two ways of doing the ...
0
votes
0answers
16 views

Firefox remote gives Failed to send command: 500 command not parseable

The command firefox -remote "openurl("`pwd`/sphinx/index.html",new-tab)" used to work fine. It would open a tab in my currently running firefox. However, now I am getting an error: Error: Failed ...
17
votes
12answers
19k views

Efficiently delete large directory containing thousands of files

We have an issue with a folder becoming unwieldy with hundreds of thousands of tiny files. There are so many files that performing rm -rf returns an error and instead what we need to do is something ...
3
votes
0answers
67 views

How do I re-stream a filtered video stream using VLC?

I have an input RTSP stream that I want to apply the "cartoon" gradient filter to before streaming on http. I've managed to stream and apply the filter to the local playback, but the http stream does ...
9
votes
5answers
11k views

Linux ls to show only filename date and size

How can I use ls in linux to get a listing of filenames date and size only. I don't need to see the other info such as owner or permission. Is this possible?
5
votes
3answers
8k views

How to use /dev/fb0 as a console from userspace, or output text to it

So I have a Palm Pre (original P100EWW) model that I enabled developer mode on, and installed a Debian Squeeze chroot. Works great. I have plans to use this for ANYTHING (bittorrent peer, web ...
1
vote
4answers
174 views

Terminal-based spreadsheets and wordprocessor?

Are there any (good) terminal based (ie. runs in a VT, not in GUI/X) spreadsheets or wordprocessors for Unix/Linux? Can anybody remember the name of such programs which were popular before (eg. ...
2
votes
1answer
47 views

Understanding two flags and a dollar sign in a CURL command

I right clicked a post request in Chrome and selected Copy as cURL I got a cURL command that includes the following --data-binary $'------WebKitFormBound I am used to seeing cURL requests that ...
3
votes
2answers
75 views

Where does Cinnamon store its Desktop Art settings?

Running Linux Mint 16 right now, Cinnamon 64-bit. I'm trying to find out where Cinnamon stores my desktop settings. Precisely looking for where the desktop image settings are stored and want to figure ...
2
votes
2answers
56 views

Parsing of command line options

For I school project, I have to implement a shell/terminal app. But I am wondering how are command line options parsed, because it appears abit weird to be. For example for the command paste (and I ...
0
votes
1answer
57 views

How to format a CF card by a terminal command?

I want to know the command for formatting a compact flash card from the terminal.
4
votes
2answers
133 views

Dump process's stdin and stdout

I have two processes, let's say Parent and Child. Parent launches the Child and communicates with it through child's stdin and stdout. Parent <-> Child These processes use text protocol and I ...
32
votes
6answers
56k views

How do I copy a folder keeping owners and permissions intact? (Beginner Question)

So I was going to back up my home folder by copying it to an external drive as follows: sudo cp -r /home/my_home /media/backup/my_home With the result that all folders on the external drives are ...
0
votes
1answer
91 views

Bring up shutdown menu of Cinnamon via command line

How can I bring up the shutdown menu of Cinnamon via command line? Note: I don't want the user menu. This menu for switching or logging out a user is brought up via Ctrl+Alt+Del.
8
votes
3answers
176 views

If you ^Z from a process, it gets “stopped”. How do you switch back in?

I accidentally "stopped" my telnet process. Now I can neither "switch back" into it, nor can I kill it (it won't respond to kill 92929, where 92929 is the processid.) So, my question is, if you have ...
2
votes
0answers
581 views

Example xfreerdp usage with clipboard plugin

FreeRDP 1.0.2 has an updated their parameter syntax for "better interoperability with Windows." I had a problem using the old syntax where the clipboard plugin only worked the first time I pasted, ...
2
votes
2answers
52 views

rsync on a very large directory

I'm trying to rsync a partial clone of mavencentral using rsync. The problem is, due to ridiculous network policies, I can only have the copy running during business hours. The process will be cut ...
2
votes
4answers
112 views

Create an ASCII art table from tabular data

Given perhaps comma- or tab-delimited input, I'd like to present a series of appropriately padded columns to stdout, so I can easily scan columnar information which would otherwise present rather ...
3
votes
7answers
387 views

Batch renaming of files [duplicate]

I have a directory full of images: DSCN4749.JPG DSCN4750.JPG DSCN4892.JPG ... And I would like a one-liner to rename them to (say). dscn4749.jpg dscn4750.jpg dscn4892.jpg ... How do I do this? ...
5
votes
1answer
3k views

Configure wireless network from the command line

I know I can use ifconfig to configure my ethernet network interfaces. But can I also configure my wireless network interfaces using ifconfig. (It seems to be listed as eth1 in ifconfig output, why is ...
1
vote
0answers
19 views

Multi-file simultaneous downloader with live statistics for all files

(I recently asked the question "Console download accelerator that downloads *multiple* files simultaneously" and learned about lftp, an excellent program which can download multiple files ...
3
votes
1answer
51 views

Expanding comma-separated list into separate lines

I have a file with some data in this form: Prefix text: First Name, Second Name, Third-- The prefix differs by line. The number of names varies from one to several. The suffix (-- in the example) ...
9
votes
5answers
2k views

How do I recursively check permissions in reverse?

There's a command, I think it comes with apache, or is somehow related to it, that checks permissions, all the way down. So if I have /home/foo/bar/baz it will tell me what the permissions are for ...
0
votes
0answers
103 views

change the panel font color of the numix theme

So I loved numix and I installed it in lubuntu 13.10 and now, when I apply it, it does into show the name of the minimized app. it does not even have option to edit.
1
vote
1answer
65 views

Tips for debugging WiFi on the command line?

I am running Ubuntu 13.10 on a Thnkpad X1 Carbon. My Wifi card is Centrino Advanced-N 6205 [Taylor Peak] I normally connect to open WiFi networks using the commands sudo iw dev wlan0 connect ...
0
votes
3answers
41 views

Get contact information of system administrator from the terminal

Do any of the common Unix/Linux platforms provide a way to query the system administrator contact information from the command line. Obviously a system admin might not include this information when ...
0
votes
1answer
37 views

Uniq won't remove duplicate

I was using the following command curl -silent http://api.openstreetmap.org/api/0.6/relation/2919627 http://api.openstreetmap.org/api/0.6/relation/2919628 | grep node | awk '{print $3}' | uniq ...
1
vote
2answers
61 views

Why the duplications in the command line output

Entering the following command prints duplicates as shown below. Not all lines print twice but some do. What gives? XXXX:~ XXXX$ man -k pid pid(ntcl) - Retrieve process identifiers ...
2
votes
3answers
42 views

How to get a list of applications associated with a file using command line

File associations usually are made in the desktop environment, but how to get a list of applications associated with a file using command line? Something like: $ getassoc foo.pdf <CR> $ ...
2
votes
4answers
85 views

Incrementing a variable each time the system boots up

The idea is to initialize a variable and set it to 0. Then create a script that executes on boot and increments that variable by 1 each time the system boots up again. Sounds simple enough right?
1
vote
1answer
80 views

configure gsm connection using nmcli

I have a system without X display and I want to use nmcli to configure my cell modem to connect to a certain apn. I can get it going with this modem just fine on Ubuntu (with X) and I would like to ...
2
votes
1answer
64 views

Getting the value of the clipboard

Is there a command to output the current value of the clipboard? Example (this command doesn't exists, it's just an example of what I'm looking for: cat clipboard > Hello world! Also, if the ...
76
votes
12answers
23k views

How to have tail -f show colored output

I'd like to be able to tail the output of a server log file that has messages like: INFO SEVERE etc, and if it's SEVERE, show the line in red; if it's INFO, in green. What kind of alias can I ...
6
votes
4answers
824 views

View permission / owner of full directory tree

I remember doing someting like "XXX /home/user/dir/child/file" and it returned the owner and/or permission of: /home /home/user /home/user/dir /home/user/child /home/user/child/file But I don't ...
2
votes
4answers
495 views

How to use ifconfig to show active interface only

By default ifconfig will show me all available interfaces , but what if I just want to display active ones? Like, en0 only in below. en0: ...
0
votes
2answers
68 views

How can I concatenate all files in a directory together in one command line operation? [duplicate]

I have 1000 csv files in a directory. I would like to concatenate them all together in order. They are named img_size_1.csv to approx img_size_1000.csv This answer is close but assumes a list file. ...
1
vote
3answers
539 views

Set homepage or start page from command line for Firefox or Chromium

On http://susestudio.com/, there's an option to enter custom command line scripts, and I want one to change the default homepage. Also, is there any way to set a browser full screen?
29
votes
3answers
16k views

How to tell gzip to keep original file?

I would like to compress a text file using gzip command line tool while keeping the original file. By default running the following command gzip file.txt results in modifying this file and renaming ...