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

learn more… | top users | synonyms (1)

3
votes
2answers
87 views

prevent a command from sending both stdout & stderr to any terminal or file

I would like to prevent my program from sending stdout and stderr to any terminals, files or devices. For this, I have three command crossing my mind, but I cannot distinguish their differences. Could ...
-2
votes
3answers
32 views

Command to print users that don't have /sbin/nologin as a shell

Given the /etc/passwd file, what is the command to print only the login names of users that do not have /sbin/nologin as a shell? Also, in my /etc directory, what can I use as a command to count the ...
0
votes
0answers
19 views

Scientific linux GUI Doesn't start

I am a new user of Scientific Linux 6. I am working on a project started by others and unfortunately the GUI stopped working. I need to find out how to troubleshoot the GUI to solve the problem. What ...
3
votes
1answer
31 views

using shortcuts to move in bash command line [duplicate]

When I use Ctrl+Left_arrow or Ctrl+Right_arrow in bash, I move backward a "word" and forward a "word" respectively. I belive, this is defined in /etc/inputrc # mappings for Ctrl-left-arrow and ...
1
vote
0answers
22 views

How to get stdout of process? [duplicate]

I started a process from the command line, but the window server died. However I see the process I started is still running. Is it possible to connect a terminal to the process to see its output? ...
3
votes
0answers
36 views

How do I permanently change the console TTY font type so it holds after reboot?

I'm running Ubuntu 15.04 64-bit Desktop Edition (A Debian based Linux). I used sudo dpkg-reconfigure console-setup from the command line to change the default console font type to Terminus. ...
1
vote
1answer
31 views

Python now thinks arguments are files: Broken emerge, pip, livestreamer and most tools using Python

For these commands (in both bash and fish): sudo emerge eix emerge eix I get this error: usage: emerge [-h] [--version] [input [input ...]] emerge: error: argument input: can't open 'eix': [Errno ...
4
votes
1answer
37 views

Print out unicode values of stdin?

I use od to print me the octal or hex of a file/stdin/string. This lets me see the ASCII, or UTF-8 encoded, values of my stdin. But we don't live in ASCIIland anymore. Is there any command that will ...
0
votes
0answers
10 views

How to properly structure a zgrep command to return the proper count of expression matches?

I am trying to search through several bzipped CSV files and return a count of emails that contain a .br domain extension. It seems straight forward enough but I have not been able to structure a ...
1
vote
1answer
22 views

Command line tool to fingerprint and tag MP3

I have a large collection of MP3 files, accumulated over the years. The collection is intermittently tagged, and many filenames are totally nondescript as well (e.g. file01.mp3, file02.mp3, etc). The ...
0
votes
1answer
24 views

Feeding audio from microphone live into python

Well, so I was reading about this raspberry pi tutorial that makes you play audio files from raspberry pi and stream them into a FM signal and something got me curious. You can stream .wav files, ...
1
vote
1answer
16 views

How do I punch a hole (FALLOC_FL_PUNCH_HOLE) in a file from command line?

There is fallocate(2) system call to make sparse files by erasing a "holes" in them. Is there a command line tool for it? Expecting something like: makehole myfile.dat --offset=10G --length=1G
0
votes
1answer
23 views

How can I add default command line parameters to an executable in a way that will also work on GUI apps? [duplicate]

I want to pass a command line program by default when I run it. myprog --foo=bar The solution I could think of was to add a custom "myprog" wrapper to my "bin" folder #! /bin/sh /usr/bin/myprog ...
-2
votes
2answers
52 views

Change file name in different path [duplicate]

I would like to know how to rename the same log file which is in different path. I mean, the log file is in /main/rel/1.2, /main/rel/1.3, /main/rel/1.4, /main/rel/1.5 etc. I want just do it from ...
2
votes
2answers
104 views

How to compare strings in two files

I have two text files, one file contains entries such as Id Value 1 apple 2 orange 3 mango 4 banana 5 strawberry 6 papaya In other ...
12
votes
6answers
1k views

What is the difference between find . and find . -print

What is the difference between: find . and find . -print What does -print actually do? $ find . . ./hello.txt ./hello ./hello/txt ./hello/hello2 ./hello/hello2/hello3 ./hello/hello2/hello3/txt ...
3
votes
3answers
42 views

Is there any way to edit pipes while a process is running?

I sometimes work with processes that: Are slow to start up Run for a while Log a lot of information to standard out For instance, imagine that this is a large web application. Now suppose that, ...
4
votes
3answers
80 views

Adding vertical space after command in bash

How to add vertical space after each command in bash? Looking for a wee bit of vertical space, not a full line. 1/4 or 1/3 of the line height should do it. [edit] The space to add is only after the ...
1
vote
1answer
99 views

How to tell the sizes of files and folders, sorted, and in MB, GB, instead of a long integer? [duplicate]

On a Mac, using Bash, I tend to do du -sh * to tell the sizes of files and folders in the current directory, in MB and GB. But if I want to sort them by the sizes, I might do du -sh * | sort -g ...
0
votes
0answers
23 views

Configure ldap client without yast

I'm configuring an LDAP client in a large number of Suse servers. The only way that I know to do this is using Yast, and this way is slow. I can't find another way. Anyone know another way to do ...
1
vote
0answers
11 views

Is it Possible to globally set the java hs_err log Location?

I know when executing a jar using the command line option -XX:ErrorFile=[location] allows you to change where the hs_err log files are placed. I am wondering: is there is a place I can globally ...
1
vote
0answers
19 views

Program like vnStat that filters for only external (Internet) traffic

I've been using vnStat to monitor the ethernet interface on a Linux computer, but found that it includes all local traffic. I do many file transfers from within the subnet which far exceeds the ...
1
vote
1answer
21 views

How to change configuration of detox (dash instead underscore)?

I found, best to this moment, a solution when changing all those annoying filenames in large quantities, making them readable and easier to manipulate with in command-line. So I found, among many ...
2
votes
1answer
20 views

Updatedb unrecognized option '--localpaths='

I am attempting to update a single directory I created. I'm using updatedb so it will be found by the locate command. Command used: updatedb ...
3
votes
0answers
30 views

Can't login via telnet in ddwrt

I have a Gateworks laguna 2388 router with dd-wrt firmware installed in it. It was working fine till i change "http_passwd" nvram attribute. I wanted to change the web GUI password via telnet. So I ...
0
votes
0answers
20 views

Create complex installation script for Linux (Centos)

For deployment of a complex system I would like to create a script that runs all compilations and set up. I am looking for an existing product that interpret installation scenario and performs all ...
1
vote
2answers
48 views

How to redirect output from file to stdout?

I'd like to rip the titles from a bunch of word documents. All the CLI tools I've tried for converting .doc to text lose the title... but Abiword's conversion to RTF preserves it, eg: $ abiword ...
4
votes
4answers
212 views

Make tail not modify the charset of the terminal

In a linux terminal (CentOS) I am using the command tail --follow=name my-rolling-file.log in order to see the logs of my application. Sometimes in the log there is some binary data dumped (I dump ...
0
votes
2answers
35 views

Auto Delete Inactive files after x

Is there a way I could delete certain folders after x amount of days of inactivity? I was thinking of using cron but that wouldn't take the inactivity part into consideration. Is there any Debian ...
1
vote
3answers
99 views

Bash long string, no word splitting?

I want to tidy up some script with long commands, so that for example: { somecheck || somecomand "reallyreallyreallyreallyreallyreallylongstring" } &> /dev/null & becomes something like: ...
4
votes
2answers
73 views

Expand wild cards in command before executing it

Suppose I want to type something like this: rm build/* tmp/* I am about to run it but I want to expand the wildcards before executing so I can verify what is about to happen. How can I do this? ...
0
votes
3answers
41 views

is it possible to create a macro-like user defined shell command?

Is it possible to run a single shortened command that would in turn initiate multiple longer to type commands? for instance, $ kontact & rekonq when passed to my terminal opens two ...
0
votes
1answer
31 views

how to open sets of programs simultaneously with command line

I recently learned here how to open a program from the command line. my question is, how can i make a set of programs open simultaneously with one command entered?
3
votes
1answer
121 views

Initiating programs from command line

Silly question, but hopefully some easy rep for someone. I am new to the linux/open source community, and I find it very feature rich, but often confusing. I am trying to configure a speedy ...
0
votes
1answer
53 views

-bash: auto: command not found

I'm going to config my network interfaces and run this command: auto eth0 but it returns -bash: auto: command not found. It seems I've missed something which I don't know. Any idea? What should I ...
1
vote
1answer
65 views

Running every command through another

I'm setting up a system in which any external command that does something with real effect must be crypthographically signed before before the system will execute them. The restrictions are in place ...
1
vote
0answers
44 views

Can't run php cli at webuser but will run as root

I am running a Magento application on a Nginx server. nginx + php-fpm running as webuser:www There are some function in the shell directory of Magento which run fine as root and the import run fine ...
-1
votes
1answer
41 views

Replace mutiple strings with different values in a file using unix [duplicate]

I have a file in which the data is like below, 01,0000000,xxxxxxx/ 02,xxxxxxxx,yyyyyy/ 03,test1,41203016,,/ 01,0000000,xxxxxxx/ ...
0
votes
1answer
35 views

What is the email matching regex in basic regex for grep?

I created a text file and put some email addresses in it. Then I used grep to find them. Indeed it worked: # pattern="^[a-zA-Z0-9]+@[a-zA-Z0-9]+\.[a-z]{2,}" # grep -E $pattern regexfile but only as ...
1
vote
2answers
37 views

Merge lines in file together from regex to “lineify” multiline log log files

Stadard unix command line tools (grep, cut, sed etc.) all work one line at a time. And nearly always, this is great. However I am trying to parse some postgresql slow query logs. Each entry has some ...
1
vote
1answer
45 views

How to copy a directory with only specified type of files?

I got a git directory with plenty of python files(and some special file like .git). I'd like to copy only these python files to another directory with the directory structure unchanged. How to do ...
0
votes
0answers
23 views

command line tool group chat utility under linux

I am working on mac osx Yosemite. I want to reach to a user under a certain IP address. (It might be local network or thru internet). I want to do it thru terminal using the default tools that ...
1
vote
1answer
45 views

cfdisk or fdisk?

While reading the man page for fdisk I came across this interesting text: There are several *fdisk programs around. Each has its problems and strengths. Try them in the order ...
9
votes
2answers
260 views

How to access the second argument from the last command in the history ?

I am starting to learn some Regex, therefore I use this command repeatedly: grep pattern /usr/share/dict/american-english Only the part with pattern changes, so I have to write the long expression ...
0
votes
1answer
31 views

How to shutdown Linux parted magic from terminal?

Once in a while I have to use parted magic to restore superblocks. I tried to execute in the terminal: shutdown -h now telinit 0 Both did not work, what else might be possible to shutdown Linux via ...
17
votes
2answers
2k views

How did this '&' at the end of my command, make the script SO fast?

While solving some CTF challenges online, I came across a situation where I needed to bruteforce a server. This is the code I wrote: #!/bin/bash for i in {0..9}{0..9}{0..9}{0..9} do echo ...
2
votes
2answers
70 views

Can I recover my .bash_profile from an open Terminal tab?

I'm actually using a Macbook Pro, and am quite new to non-Windows OS' (I know, for shame!), and I've made the mistake of overwriting my bash profile, instead of appending to it... (n00b!). What I do ...
2
votes
1answer
63 views

how to get the full command line args passed to a process on unix/linux systems? [duplicate]

I am looking for a reliable way to get the full command line args passed to a process even when these are very long. I do know about ps -f -p <pid> and /proc/<pid>/cmdline, both of which ...
1
vote
3answers
134 views

How to perform grep onto the output of ldd properly ?

# ldd /usr/bin/ffmpeg linux-vdso.so.1 => (0x00007ffffc1fe000) libavfilter.so.0 => not found libpostproc.so.51 => not found libswscale.so.0 => not found ...
2
votes
1answer
42 views

How to tell xargs which argument to choose ? [duplicate]

When xargs redirects the first commands output into the second command's argument and there is no choice about which argument for which element of the output, then there is only one way, for instance: ...