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

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

Is it possible to attach `kinit` to the first attempt to `ssh` without a Kerberos ticket?

My university uses Kerberos-based authentication for login to our unix servers. One way to get passwordless login is to run kinit, type my password, and then run ssh@host. For this setup, I do the ...
3
votes
1answer
82 views

What code runs when I type “sudo service nginx start”

I am having this problem: http://stackoverflow.com/questions/10939072/add-nginx-as-a-ubuntu-service-stop-and-reload-doesnt-work I am trying to understand if my code to start nginx is point to the ...
0
votes
0answers
27 views

What do the number in the file metadata mean [duplicate]

I typed ls -l in the terminal to get the file metadata of all files in the current folder What do the circled number : 1 & 2 represent in regard to the file metadata ???
1
vote
0answers
25 views

Set memory allocation for applications in Ubuntu [duplicate]

I have an application running under Ubuntu that tries to consume all available memory. Is there a way to specify and restrict the allocations available for a given application?
2
votes
2answers
279 views

Booting from command line

I have a desktop version of #! installed on my laptop. I am quite new to Linux, but learning more everyday. I would like to know if it is possible to choose on start-up to boot into the Desktop, as ...
14
votes
3answers
16k views

How can I use ffmpeg to split MPEG video into 10 minute chunks for YouTube upload?

There is often a need in the open source or active developer community to publish large video segments online. (Meet-up videos, campouts, tech talks...) Being that I am a developer and not a ...
3
votes
1answer
97 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
31 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
26 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
39 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 ...
1
vote
1answer
74 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 ...
2
votes
3answers
54 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 ...
2
votes
1answer
40 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 ...
4
votes
2answers
474 views

how does time command work

So when I type time <some_program> I have nice CPU time measurement. But exactly how is this achieved? Also does this have any performance impact on the some_program?
1
vote
1answer
34 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 ...
2
votes
2answers
91 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 ...
17
votes
8answers
5k views

How do I split a flac with a cue?

I've got a full album flac, and a cue file for it. How can I split this into a flac per track. I'm a KDE user, so I would prefer a KDE/QT way, I would like to see command line and other gui answer's ...
1
vote
1answer
290 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
133 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 ...
4
votes
3answers
65 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 ...
20
votes
2answers
529 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 ...
12
votes
6answers
633 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, ...
1
vote
1answer
61 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 ...
2
votes
0answers
53 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 ...
1
vote
1answer
28 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 ...
5
votes
2answers
142 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 ...
51
votes
8answers
2k views

Remember a half-typed command while I check something

I often find myself in the following position: I've started typing a long command at the bash prompt, but half-way through I find out I need to check something with another command. This is a problem ...
-2
votes
2answers
28 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
50 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
45 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 ...
3
votes
4answers
105 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
253 views

Simultaneously move long list files to new location

I'm using a wonderful program called ExifTool to recursively rename a large batch of files. Here is example usage: $ exiftool -r -ext JPG '-FileName<CreateDate' -d %Y%m%d_%H%M%S.jpg . Error: ...
1
vote
1answer
52 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 ...
4
votes
6answers
2k views

Getting cpu usage same every time.

When I execute following command to get cpu usage , I get nice + user cpu usage. top -b -n1 | grep "Cpu(s)" | awk '{print $2 + $4}' Output: 14.5 Here I am getting problem is that the output ...
1
vote
0answers
39 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 ...
2
votes
1answer
39 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
2
votes
1answer
43 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 ...
93
votes
14answers
29k views

How to do integer & float calculations, in bash or other languages/frameworks?

Using echo "20+5" literally produces the text "20+5" What command can I use to get the numeric sum, e.g. 25 in this case. Also, what's the easiest way to do it just using bash for floating point, ...
0
votes
1answer
36 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: ...
3
votes
1answer
27 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 ...
3
votes
2answers
1k views

How can I automate sending mail using a script?

I have in the past heard of using nail for this task, but I can't seem to find it for my distribution (Ubuntu 11.04) in any of the repositories. What program can I use to one-off emails from a shell ...
4
votes
3answers
417 views

How to create a bounded queue for shell tasks?

I have 1000 gzipped files which I want to sort. Doing this sequentially, the procedure looks pretty straightforward: find . -name *.gz -exec zcat {} | sort > {}.txt \; Not sure that the code ...
0
votes
0answers
66 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 ...
1
vote
1answer
101 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 ...
17
votes
2answers
598 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" ...
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
61 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 ...
-1
votes
1answer
36 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
14 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
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 ...