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

learn more… | top users | synonyms (1)

0
votes
1answer
16 views

Read columns from file into separate variables

I need to read the following input into separate columns as variables? input.txt b73_chr10 w22_chr9 w22_chr7 w22_chr10 w22_chr8 w22_chr6 I have written the following command;but I guess it ...
-1
votes
1answer
19 views

Linux file create time [duplicate]

Hi I am new to Linux and I am searching a command that gives me the file create time in a folder. Thanks in advance
0
votes
0answers
8 views

embedded linux- to check uart in raspberry pi

Checking whether the Pi is sending and receiving UART data by installing the tool Minicom. Pi is sending serial data but is not receiving data. Whatever I type in Pi minicom is received to PC ...
0
votes
1answer
32 views

How to Move Large Number of Files to Original Directories?

I accidentally ran a command that moved the contents of all the subdirectories in my home folder to my home folder. Should I call it a loss and reinstall my system, or is there some command(s) I can ...
1
vote
1answer
14 views

Open multiple pdfs in Okular from command line

I have Okular configured that when it's already running and I open a pdf from the command line, it should open the new file as a new tab in Okular. However, if this new file is in another directory ...
4
votes
3answers
153 views

How do you extract a whole word containing substring?

If I have a file that looks like this: example.png example.jpg example2.jpg example2.png example.swf example2.swf example3.jpg example4.jpg example3.png example3.swf and I want to extract the ...
2
votes
3answers
32 views

Can the Bash shell “Ignore” Excess copy-paste text?

Say, I have a "Quick&Dirty" Perl script in a gui text editor, and I start the Perl interpreter in a terminal window which is running Bash. I can copy-paste the Perl script to the terminal & ...
0
votes
3answers
38 views

How to loop through a file and make each line a new regular expression into an awk statement?

FileA.txt: ATGCATGC GGGGGGTT TTTTT AAAA FileB.txt: asdfasdf blah2 ATGCATGC blah3 blah4 delte-me-too GGGGGGTT blah5 blah5 .... I want to compare the each line from FileA.txt and check if it ...
2
votes
1answer
19 views

How do I transfer (to a usb drive) or read a .odt file in the command-line?

Currently my computer is not allowing me to start it up properly (guessing my hard drive is malfunctional), but I've figured out that Ctrl+Alt+(F1,F2,F3,F4,F5,F6,OR F7) allows me to access ...
24
votes
1answer
1k views

ESC + { : What is it and where I can know more about it?

I was play around at the bash prompt, and pressed ESC followed by { , after which , the shell showed all the files for completion, in a fileglob string. Eg : If I had typed bash C followed by ESC+{ , ...
1
vote
1answer
22 views

Linux yum Commands that are Equivalent to these Ubuntu apt-get Commands [on hold]

I'm using an AWS EC2 instance and I'm trying to switch from an Ubuntu instance to a Linux (Amazon Linux AMI) instance and in doing so I need to figure out the equivalent apt-get to yum commands and ...
-1
votes
0answers
62 views

Understanding {1},{2},{3},{4}… parameter to parallel [closed]

DISCLAIMER: I am using Mac OSX. The bash script is in a different directory from the files that require processing. From here my struggle begins… HELP 1: I have multiple files each housed ...
0
votes
0answers
29 views

augtool saving failed

I am trying to set some parameter using augtool but getting strange error Linux$ sudo augtool set /files/etc/abrt/abrt-action-save-package-data.conf/OpenGPGCheck no error: Failed to execute command ...
0
votes
0answers
5 views

How can I change the password of a LVM setup in Fedora?

Using CLI, how can I change the password of a LUKS/LVM setup in Fedora (2x), where x can be 1,2, or 3? Note: The physical LVM2 volume spans over two partitions on two drives (/dev/sda3 and ...
0
votes
1answer
38 views

Split string into array and print each element on a new line with commandline

I'm having a String which is seperated by commas like a,b,c,d,e,f that I want to split into an array with the comma as seperator. Then I want to print each element on a new line. The problem I'm ...
0
votes
0answers
18 views

How to execute shell script in remote windows machine [duplicate]

I have a shell script which will be useful to download the jars from ftp and copy it in a particular location and do some deployment stuffs.. I need to run the script in remote Linux and windows ...
0
votes
4answers
55 views

grep match multiple substrings and pass or fail on missing

I have a nginx -V 2>&1 | \ grep -qi 'nginx/1.9.10\|ngx_pagespeed-release-1.9.32.10\|openssl-1.0.2f\|modsecurity-2.9.‌​0' \ && echo "has the stuff we need" \ || echo "missing ...
-4
votes
0answers
28 views

Finding Parent of a path in Unix [closed]

I have a query of: $unix_linux/stack_overflow/20160201 This is a sample file name. Is there a way to find its parent? I tried . find but I want to find this specific folder for this date. Not a list ...
1
vote
4answers
94 views

What command would I use to find out how much total space my hard drive has left?

What's a single command I can run that shows me the total amount of space free on a hard drive? I don't want to do any math, I just want a command that shows me the total free space on my hard drive.
-1
votes
2answers
44 views

GUI gone after apt-get upgrade on clean install, Ubuntu Wily-

I was pointed here from AskUbuntu because my question was about an unsupported Ubuntu derivate, here is the copy-pasted question: I upgraded my fresh install of Netrunner 17 Horizon (Ubuntu-based, ...
0
votes
1answer
16 views

Possible to prevent multitail from closing “finished” command windows?

Assume a multitail call like the following: multitail -s 2 -l "long-running-command" -l "short-running-command" Now, I would like to have both windows remain open, even after they are finished. ...
0
votes
0answers
28 views

How can get the screen command to work properly?

I'm trying to work out how to use the Unix screen command. I'm using Zsh on Mac OS 10.11.3. So far, nothing is working as described. (I don't have enough reputation to link to the tutorial I'm ...
0
votes
1answer
34 views

How do I execute command to avoid interference from the shell [duplicate]

Sometimes a same command is provided by shell-builtin as well as other file/package. Example: $ type -a printf kill printf is a shell builtin printf is /usr/bin/printf kill is a shell builtin kill is ...
0
votes
1answer
17 views

get command line agrument by variable in shell script

I want to get the arg of a command from a var that has the index in it of the arg that I want. Something like this # command in terminal, `foo -r -f value_wanted` index="3" var=$"$index" echo $var ...
0
votes
2answers
93 views

What does this command mean?

lines=$(grep '^[^:]\+::' /etc /shadow) What does this whole command mean? What does '^[^:]\+::' mean? if I put if else statement like: if [ "$lines" == "" ]; then Will it display (which is ...
0
votes
1answer
16 views

umask permissions that result in no change

I am having a really hard time understanding how umask works. How is something that is 666 masked with 001 still 666 ?
1
vote
1answer
25 views

Using terminal to reset icon cache - which method?

I've been trying to find out how to reset the icon cache on my MacBook, and two methods seem to always be suggested. However, the two approaches differ slightly in the third line. Method 1 sudo find ...
0
votes
0answers
31 views

What audio players can start playing an Audio CD with one command?

I want to know about players that can start playing an inserted Audio CD if started with a command line. That command can then be used to create a specialized launcher/icon/desktop file or an entry ...
3
votes
2answers
99 views

The discrimination between short and long option is only `-`?

On Unix system, options begin with - is short option, while options begin with -- is long option. Is my understanding right?
-2
votes
1answer
33 views

What does the -p option do exactly with the cp command?

So I am trying to understand what is the significance of the -p option for the cp command. I opened the manual of the cp command and it says -p same as --preserve=mode,ownership,time stamps. But ...
0
votes
2answers
23 views

usermod question about option e

after reading the man pages I am unable to find an explanation of what this does (the tack e option) usermod -L -e 1 username -e 1 does this mean one day after the linux epoch, jan 1 1970? How ...
3
votes
2answers
195 views

How to write contents of a file to new file removing repeated lines [duplicate]

For example, a file file1.txt contains Hi how are you hello today is monday hello I am fine Hi how are you After the processing of file1.txt it should write to file2.txt and contents ...
1
vote
2answers
47 views

How do I remove text blocks within a log file? [closed]

I have the following log: 2016/01/20 00:00:16.035 [T114BaseServlet] ... Blah Blah Blah 2016/01/20 00:00:16.036 [ApplicationState] ... Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah ...
1
vote
1answer
53 views

get first CLI argument after the options in shell scipt

I have a script I class like so gitploy up -t 2.0.0 test_repo. I pull out the "action" up right away, then I need to be able to get the test_repo before I process the options. I don't want to lose ...
0
votes
1answer
28 views

Unix Command Line Create Text File and Transfer Locally

I have a file located in unix command line using 'SecureCRT'. I want to get this file's data in excel so I need a .txt file. I have 'WinSCP' installed aswell. After I do "more [file name]" it ...
0
votes
1answer
37 views

grep for numbers over 10

I'm looking through a file for specific kernels. I want everything from 3.8. to 3.17. egrep 3.[8-17] is kind of the thing I want but that obviously doesn't work. How do I grep using the example ...
-1
votes
0answers
20 views

sed search and replace is not working for below XML

My input is: <TransactionMode modified=\\'1\\' type=\\'int\\'><![CDATA[2]]></TransactionMode> <ClientCharacterSet modified=\\'1\\' ...
3
votes
5answers
158 views

Command line method to find repeated word typos in English text

Updated: Added third, multi-line sample to test solutions with From the command line, is there a way to check a file of English text and find repeat-word typos, in order to help correct them? To ...
3
votes
5answers
38 views

List available man page sections for an application

I am thinking about the man page sections 1 = user commands, 2 = system calls etc. Is there a way, a command that will tell me what sections are available to read besides running something like man ...
1
vote
3answers
23 views

Shutdown PC after suspending terminal process (apt-get upgrade)

What's going to happen if I shutdown my PC after suspending a terminal process (with Ctrl+Z)? In my case, it's sudo apt-get upgrade. The upgrade file size is 250 MB, it takes far more time downloading ...
0
votes
1answer
23 views

Why is echo not working for mt valgrind command?

So I have my makefile working great, except that It doesn't create the valgrind.out file and I don't know why. So the console succesfully prints out that my executable file line is created but not ...
2
votes
1answer
38 views

Execute a command after each output line from ping command

I am trying to build a one-line command to monitor when my Internet connectivity drops. I'd like it so that if I run ping www.google.com indefinitely (one ping per second), if the word "timeout" ...
2
votes
2answers
39 views

Autocomplete from grep output

How might I more easily use a filename found by grep as an argument to vim: $ grep -r foo * lib/beatles/john.c lib/pantera/phil.c lib/pinkfloyd/roger.c lib/pinkfloyd/richard.c ...
1
vote
3answers
52 views

Type and the speed of CPU using the lscpu command

I want to determine the type and speed of my CPU so I executed the CPU command, However, I have some confusion, so from my output I can't really determine what is my CPU type and my speed is 1600 ...
3
votes
2answers
108 views

What are the keyboard shortcuts for the command-line?

I'm talking about the keyboard shortcuts that you use in command-line/terminal. Example: Ctrl+c that kills the process, Ctrl+d that logout, Ctrl+z that send process to background... etc. I've tested ...
3
votes
2answers
62 views

How can I type a command to execute when the current command completes?

I have a function (not) that displays a notification. Hence, I can use it to show when a command is complete. sleep 5; not However, sometimes I forget to add ;not. In OS X's terminal (a few years ...
2
votes
4answers
94 views

Moving and renaming hundreds of .jpg files, all named 5003.jpg

So here's the deal, my girlfriend wants me to transfer all of her photos off from her iPhone onto her laptop (on which we are running Ubuntu 14.04). All of the dedicated programs I tried to do this ...
1
vote
2answers
20 views

linux bash if statement inside for loop [duplicate]

I am attempting to iterate through 1-30, say hello #number for each except for number 10. This is what I have which is not working for i in {1..30}; do if [i != 10]; then echo "hello $i"; fi; done ...
3
votes
1answer
27 views

How do file managers split off opened programs?

I'm challenging myself for the next few weeks to use a terminal emulator as my main file manager. I've run into a question: how do I open a file (e.g. an Inkscape .svg) in it's GUI program from the ...
2
votes
1answer
46 views

How do I turn entire stdin into a command line argument verbatim?

Attempt 1 xargs -I '{}' -0 -n 1 myprogram --arg '{}' --other-options But that does not preserve zero bytes. Also the program may run multiple times. But instead of failing in case of zero byte ...