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

learn more… | top users | synonyms (1)

3
votes
1answer
137 views

bash command line editing (Emacs shortcuts)

When writing a command on the bash command line, I can use CTRL+w to delete a word backwards, or ALT+d to delete word forwards. The problem is, that these two shortcuts are not exactly complementary: ...
1
vote
0answers
74 views

List/query Open X11 Display Connections?

I am hitting this bug: NEWT errors when closing sketch on Linux · Issue #1651 · processing/processing · GitHub, when using Processing on Linux (Ubuntu 11.04); my messages are: X11Util.Display: ...
0
votes
0answers
46 views

Bluetooth profile info in linux

As Bluetooth device has a number of Bluetooth profiles. when want to do communication is Bluetooth device, first pair Bluetooth device and then starts sending data using Bluetooth. In Linux, ...
1
vote
1answer
293 views

Pass bash script arguments in double quotes to php cli script

I am trying to pass arguments to a bash script and then to a php script, I have literally looked at 30+ links, and tried over a dozen examples, and I for whatever reason have not been able to get the ...
1
vote
1answer
54 views

Loading input from a file in lex

First of all, I was not sure whether to post this question here or on stackoverflow, but here's my question anyway. Besides using input redirection, i.e. ./code < inputFile.dat, is there any way I ...
2
votes
1answer
56 views

How to change the color of all highlights in a PDF file?

I want to change the color of every highlight in a PDF file (without having it do for every highlight manually). Preferably with a command line command. Here is an example PDF with a highlighted ...
2
votes
3answers
96 views

Tar compress folder without specifying the filename

Is it possible to use tar to compress a folder without giving the filename of the archive to store in? Normally you use: tar -zcvf prog-1-jan-2005.tar.gz /home/jerry/prog I want to do something ...
1
vote
1answer
39 views

log into a machine through another, with (de)compression at the ends only [duplicate]

I have looked all around but couldn't find the answer to a very simply question: I would like to log into machine C from machine A, passing through machine B. However, B is slow, so I would also like ...
4
votes
3answers
103 views

Why does export -p exclude $_ variable?

As far I know, there are 3 ways to see exported variables: $ export -p | wc -l 50 $ env | wc -l 51 $ printenv | wc -l 51 As you can see, export -p misses single variable. It's a $_ one: $ diff ...
1
vote
1answer
316 views

Exit of “> ” mode in Unix shell

In sh (not Bash), how would we abort execution of command when the prompt is in > mode? For example, when entering a string with quotes only at the beginning, it makes the prompt look like >, ...
1
vote
7answers
180 views

what are some uses of .(single period) & ..(double period) in the shell command line

The single period . means current working directory The double period .. means parent of the current working directory I can only think of . being used in relative pathname etc cd ./bin/usr How are ...
20
votes
2answers
632 views

How do I move all files output from a command?

I have this grep command to find files without the word Attachments in them. grep -L -- Attachments * I want to move all the files that are output from that command. How do I do that in bash? Do I ...
1
vote
1answer
377 views

Try to disable console output, console=null doesn't work

as mentioned above, I want to to completely turn off the console output, but putting console= or console=null in the kernel command line doesn't change a thing. When I enque quiet to the kernel ...
5
votes
2answers
322 views

Search/grep ftp remote filenames

I have already seen How to perform GREP on FTP? - that question implies that a grep in the remote file contents is needed; and as such, the answer is that the ftp protocol does not support that ...
1
vote
1answer
69 views

Adding pass completion to fish shell

I'm trying to get the CLI password manager pass to work in my fish shell with auto completion. I've already found the necessary file on GitHub, yet am having trouble finding out where to put it, or ...
-2
votes
2answers
34 views

I don't have writing access to a subdirectory in /

I have a server running under Debian wheezy. I want to create a directory in /. I can't without running sudo mkdir myDirectory. Once in /myDirectory, I can't write anything or create a repertory. I ...
2
votes
2answers
96 views

What is the bash syntax for extracting the values from multiple instances of the same argument?

I want to use multiple instances of command line paramater such as the -d option used by PHP for passing PHP options. I am currently using the getopts command in bash. With PHP invocation it would ...
0
votes
1answer
93 views

Custom command wget without response

I have an arduino with an ethernet shield that is controlling a relay, which control the lights. I usually just use the phone to send a http get request from a widget in tasker, but I would like to be ...
2
votes
0answers
58 views

Why does the kernel boot faster with less memory allocated?

This is not a important question, I'm just curious. Something strange happened, which isn't quiet clear to me: In the kernel command line, the amount of the memory can be set statically with the ...
3
votes
4answers
182 views

How to sort a list of files by time, given only the filenames

Given a list of file names, how can I sort it by file modification time? The resulting output needs to look exactly like the input with the exception that the data has been sorted accordingly. Here ...
2
votes
2answers
281 views

Command Line Photo Organiser Like Shotwell but to run on headless server

Does anyone know of a program (or even bash script) that can take photos from various folders and then consolidate them into one place and organise them into a directory structure by date in the way ...
1
vote
1answer
61 views

What is the Command to check the history of the command executed which should based on the user who accessed it [closed]

I am looking for the command or script to meet the following requirement. I wanted a history of all the users who connected to my machine and what commands they execute in there session and at which ...
2
votes
1answer
68 views

uname shows duplicate architecture

Why does uname show x86_64 three times? This is Ubuntu 12.04.4. $ uname -a Linux seedbox 3.2.0-59-generic #90-Ubuntu SMP Tue Jan 7 22:43:51 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
1
vote
0answers
94 views

Character encoding issue with my linux install?

I just installed Ubuntu 12.04.4 64 bits, all seemed to be ok, when I started to work on console I noticed: that I couldn't get some accented characters typed in to the console, for example, if I ...
3
votes
1answer
33 views

Script to dripfeed files

I need to write a script that will check a directory for a given file type, say *.mov, and move up to, say, 50GB worth into another directory. The purpose being that we have a huge bunch of files that ...
2
votes
1answer
47 views

Looking for a “undo” for file with holes (GNU)

Linux supports sparse files aka 'file with holes' Note following commands alias mystat='stat -c "%n: %B*%b blocks %s bytes"' dd if=/dev/zero bs=1024k seek=4096 count=0 of=file-with-holes ls -l ...
12
votes
6answers
761 views

Subtract 1 from all file names (rename them) in a directory.

I have a directory which contains image files with names like image1.jpg image2.jpg image3.jpg ... Unfortunately, the image names must be zero based, so image1.jpg should be image0.jpg, ...
0
votes
0answers
460 views

rsync multiple files to multiple directories

I need to move a large number of files that need to go to different directories i.e. file1.mpg to /mnt/s3/directory1/file1.mpg file2.mpg to /mnt/s3/directorya/file2.mpg file3.mpg to ...
0
votes
1answer
84 views

What is the reconnection policy of “persist” switch on “pon” command from pptp-linux package?

I use to establish a connection to my VPN PPTP server by typing: pon MyVPN persist I wanna know the reconnection timing details, but I have not found documentation enough about it. Specifically: ...
17
votes
2answers
618 views

^x^y unix trick for all instances in last command?

One of my favorite Unix tricks is ^x^y, which will take the last command and replace the first instance of "x" with "y". However, I'm wondering if a similar trick works to replace all instances of "x" ...
1
vote
1answer
457 views

usbhid can't find input interrupt endpoint

I have Scientific Linux 6.5 installed. From the beginning (on this computer) I constantly see this line jump in between all starting commands during the start up of the system (when I press esc to see ...
-1
votes
1answer
39 views

How to enable someone to SSH to my server from Windows? [closed]

I want someone from windows to log in into my server using SSH, so he can edit files and install things. Is there a step to step how to do it? I need to: Create his user account. Configure it, ...
2
votes
1answer
17 views

Retrieve system commands without reading sources

Sometimes I wonder how Linux programs achieve certain results knowing that they internally use system calls (system() or exec() in C programs). Given a working binary I wonder if it is possible to ...
2
votes
1answer
193 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 ...
25
votes
4answers
2k views

python vs bc in evaluating 6^6^6

I am evaluating the expression 6^6^6 using python and bc separately. The content of the python file is print 6**6**6. When I execute time python test.py, I get the output as real 0m0.067s ...
-2
votes
1answer
790 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
80 views

Start scrolling command prompt when filled until a particular fraction

I'm using the default terminal command prompt on Ubuntu 12.04. When I'm doing something on the prompt (as opposed to editing in VI) the scrolling starts when the text reaches bottom of the screen. I ...
2
votes
1answer
242 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 ...
3
votes
2answers
90 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 ...
1
vote
2answers
45 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
267 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
276 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
39 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) ...
1
vote
1answer
112 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?
3
votes
0answers
142 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 ...
115
votes
5answers
21k views

I deleted /bin/rm. How do I recover it?

Just for fun, I thought I would use this command on my Raspberry PI running Raspbian: sudo rm -f /bin/rm I thought I could just reinstall coreutils: I was wrong! apt-get install --reinstall ...
2
votes
1answer
114 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
5answers
654 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. ...
3
votes
2answers
342 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
80 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 ...