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

learn more… | top users | synonyms (1)

3
votes
1answer
16 views

Why does BASH process substitution not work with some commands?

On occasion process substitution will not work as expected. Here is an example: Input: gcc <(echo 'int main(){return 0;}') Output: /dev/fd/63: file not recognized: Illegal seek collect2: ...
1
vote
1answer
9 views

How to create a deterministic tar.gz using git-archive?

Creating a git repository for testing. ~ $ mkdir somefolder ~ $ cd somefolder/ ~/somefolder $ git init Initialized empty Git repository in /home/user/somefolder/.git/ ~/somefolder $ echo test > ...
0
votes
2answers
40 views

What are the meanings of different Unix commands? [on hold]

I am running Ubuntu 14.04 on my machine. I am new to Linux and feeling lost when I see different command line commands (or what exactly are they called?) like sudo, apt-get, mkdir, -R, -n etc. while ...
0
votes
1answer
23 views

Using find -exec and having trouble with redirecting standard error

I have an individual.sh script that pipes standard error to a grep command, like this: FOUND=$(tesseract "$i" out -psm 0 |& grep -ci 'Orientation in degrees: [^0]') If I run the script like ...
2
votes
1answer
21 views

Confused about piping commands from find to commandX?

I have a script, run.sh, that looks like this: #!/bin/bash FILES=$(find corpus/ -type f) for i in $FILES do ./individual.sh $i done It runs without problem. I want to do away with the run ...
3
votes
3answers
46 views

Sorting directories by last modified date/time of the same-named contained file

Is it possible, using grep, find, etc, to sort a list of directories by the last modified date of the same-named file (e.g., file.php) within? For example: domain1/file.php (last modified 20-Jan-2014 ...
1
vote
1answer
27 views

Start a background process from a script and manage it when the script ends

I'd like to run and configure a process similarly to a daemon from a script. My shell is zsh emulated under Cygwin and the daemon is SFK, a basic FTP server. For what matters here, the script ...
2
votes
1answer
19 views

PHP CLI and Bash - change behaviour of PHP keyword

Our hosting providers have installed 3 versions of PHP onto our linux box and when I SSH into it the command php points to use/bin/php which is version 5.2, the command php-5.4 points to ...
1
vote
2answers
26 views

Replace text/string with new line

I have had a requirement where I need to move data to a new line based on a text: Input :61: 456 B66666 :61: 878 N78777 :61: 534533534 BNNN Output :61: 456 B66666 :61: 878 N78777 :61: 534533534 BNNN ...
1
vote
1answer
21 views

How to set size of mate-panel via command line (not via dconf)?

When I install Linux Mint (Mate, Qiana) I like to make Mate panel more wide (or may be "higher"). Default it is near 20 pixels. I make it, for example, 45 pixels. I can easy set it by right button ...
1
vote
2answers
36 views

Add test user to the sudoers file, to run ifconfig

I would like to see the ifconfig file with test user (under Linux Debian) that's why I have used the sudo task, but the terminal said that: test is not in the sudoers file. How can I take the test ...
0
votes
2answers
56 views

Command Line only UNIX/Linux OS [closed]

I want a command line only UNIX/Linux OS. I want the download of the OS to be below 80MB. I want minimum software.
-1
votes
0answers
35 views

Practical usage of pushd, popd, man, less, and cat in bash [closed]

So i am learning more advanced usages of bash/cmdline due to work teaching me some programming and im trying to wrap my head around some of the following bash cmd's and their purposes. I have been ...
1
vote
0answers
61 views

How to pass commandline arguments larger than 131k? [closed]

I want to get data out of a Virtualbox VM. You can define variables (called guestproperties) via commandline, which can be accessed from both the host and the VM. The amount of data for such a ...
0
votes
1answer
38 views

Scale cpu frequency in CLI?

I am using cpufreq to scale my CPU frequency. But I do that by clicking cpufreq icon on the panel of Ubuntu 12.04. If without a mouse, how can I show and scale CPU frequency by running commands in ...
3
votes
1answer
105 views

What are the bash shell length limitations for here-docs?

What are the length limitations for using here-docs as part of bash command lines? I am finding that short here-docs work fine, but when they get longer there is some point or structure after which ...
1
vote
3answers
90 views

How to enter foo-* folder without actually using wildcard or shell expansions?

Short story I'm looking for the command to enter first found foo-something directory like: cd foo-* but without using wildcard (or other special shell characters). Long story As part of the ...
1
vote
1answer
26 views

Redirect output to stdout and pipe to a binary

I have a nice PS1 line in my .bash_profile, and I want to copy it to another machine. So I want to view it AND copy it to my clipboard. I can't figure out how to string the commands to do this ...
0
votes
1answer
71 views

How do I use vim on the command line to add text to the middle of a file?

I am trying to write a command along the lines of the following: vim -c "XXXXXX" myFile Instead of the "XXXXX" I want to supply some commands to vim to add some text to an arbitrary point in the ...
0
votes
0answers
17 views

What is the command-line equivalent to 'mintupdate' for Linux Mint?

Linux Mint has a nice GUI-based Update Manager with selectable update tiers. The defaults are for levels 1 through 3 our of a possible 5 levels. However, I often handle administrative tasks for a ...
1
vote
2answers
56 views

What is/are the advantage(s) of running applications in backgound?

I really don't know what are the advantages of running applications in the background. Something like Application & via command line. Why exactly do we run applications in background and when ...
0
votes
1answer
42 views

What does “./” do? [duplicate]

I've got absolutely no idea what this does and if I search something like "linux ./ command", Google just seems to ignore those two characters as they're puntuation. If someone can give me a simple ...
0
votes
1answer
34 views

How to move system clock time forward/backward?

I know commands for setting specific time and/or date, but can't find ones which move the time relative to the current time. What are the commands to move the time forward/backward x ...
1
vote
1answer
73 views

Linux split separate files on disk but see as one

Is there is a functionality in Linux that allows you to reference multiple files as one? For example: linux.txt.0, linux.txt.1, linux.txt.2, linux.txt.3 can be seen as separate files or as linux.txt ...
0
votes
3answers
86 views

Can dash replace bash as my default shell?

From what I read, dash can be made as a shell by using the command ~$ chsh shirish Password: Changing the login shell for shirish Enter the new value, or press ENTER for the default Login Shell ...
1
vote
1answer
47 views

Linking a static library when compiling a C program

I'm linking *.a file with *.c file, so I have used the following command: gcc abc.c -l ad.a (here abc is the C source file and ad is the static library file) then after executing the following ...
0
votes
1answer
39 views

How can I convert this excel file so that it is not only one row?

I've got an Excel file, shown in the picture below, and available for download here. What I need is to extract the variables under Item (Column B) and the values in column G. As a start, I tried ...
0
votes
1answer
31 views

What is (and how to perform) action listing?

After performing a series of actions in Linux's terminal, I am supposed to perform a "listing" of them. I couldn't find it online. All I can guess is that I am supposed to make the terminal print out ...
1
vote
0answers
17 views

How to abort/cancel a running command in initramfs?

When I invoke a long-running command, e.g. du, I don't see a way to abort/cancel it (Strg/Ctrl+c doesn't work), other shells/ttys aren't available. Am I completely doomed after having started a long ...
0
votes
2answers
42 views

Copy a file in Nautilus and use it in a shell command line

Suppose I click on a file in Nautilus. How can I copy the full address to the clipboard, and then easily paste it into a shell command that I'm typing in a terminal?
0
votes
1answer
71 views

Scripts to E-mail Myself a File

The following command e-mails myself a file: sudo mail -a FILE_ADDRESS -s "Subject of E-mail" myemail@gmail.com Question: How do I turn this command into a one-liner, so that I could just type ...
0
votes
2answers
45 views

Access USB drive on Ubuntu server

I'm currently using a Ubuntu 14.04 server with command line access only. My .html files are on my Windows and I want to transfer them. What is the path in my Ubuntu server to get into my external ...
0
votes
1answer
101 views

Kali linux throws ' isolinux.bin missing or corrupt ' error

I downloaded Kali Linux from this link, I have a 32 bit OS, so I guessed ISO 32 Kali Linux is the suitable for me (they did not clarify in the website based on what we choose the type). Then, I ...
1
vote
3answers
65 views

Securely passing user input to command

I have a daemon daemon running in Server A. There, there's an argument based script to control the daemon daemon_adm.py (Server A). Through this script I can insert "messages" to daemon coming from ...
1
vote
1answer
34 views

View timestamp for CUPS print jobs

I'm looking for a way to view the timestamp of a job in CUPS. I've searched the man pages and can't seem to find it. The long term goal is to have a script that parses the time from the jobID and ...
5
votes
1answer
205 views

combining find with other commands: when to use -exec and when to use pipe? [duplicate]

I've learned to use the find command by itself to find files and directories however when it comes to doing something with the files/folders I'm confused. Given the following command: find . -type f ...
2
votes
1answer
36 views

w command for the other network hosts

While the who command refers to the local machine, rwho shows the same informations about all the known hosts of the local network. Similarly, w shows informations about the users on the local ...
3
votes
5answers
181 views

How to create a simple .txt (text) file using terminal? [closed]

I'm just trying to review basic terminal commands. Having said that, how do I create a text file using the terminal only?
24
votes
8answers
2k views

Dealing with file names with special first characters (ex. ♫)

I have recently come across a file whose name begins with the character '♫'. I wanted to copy this file, feed it into ffmpeg, and reference it in various other ways in the terminal. I usually ...
2
votes
2answers
28 views

How-to overwrite directory on multiple places with 1 source directory

So today I encountered one of my PHP files was outdated so I've got to overwrite the phpthumb directory on the entire server. Multiple websites use this folder on multiple unknown locations, so how ...
2
votes
1answer
183 views

How to remove file log with file name

Assume, I have log files with this name format. NameLog.log.2014-09-27 NameLog.log.2014-09-28 NameLog.log.2014-09-29 NameLog.log.2014-09-30 NameLog.log.2014-10-01 NameLog.log.2014-10-02 ...
2
votes
0answers
36 views

Open a program (VLC) and move it to the foreground

On a Mac, specifically, when I use the VLC command line to open a video file, it opens in the background by default. How can I instead move it to the foreground whenever I run the command to open a ...
6
votes
3answers
630 views

Is w command safe for users?

Some applications allow to pass password as an argument. For example: mysql --user=user_name --password=your_password db_name Is it safe? Besides the fact that typed password would be saved in bash ...
0
votes
3answers
25 views

Assigning files key words to easily find them later

Suppose I have a file. This file is stored in some complex location (within a hundred subfolders), but I nevertheless use it a lot. Is there some way to assign this file a set of keywords (i.e., "my ...
7
votes
1answer
90 views

How to filter any part of description or option from manpage

I want to get output of any desired description or option from a man page. Example: I want to get the description for the autoclean option from the apt-get man page: Please suggest a command, ...
1
vote
0answers
15 views

Control iPhone music from linux command line

Is this possible? Could one, for example, send a command to an iPhone which tells it to start playing a certain song?
1
vote
1answer
14 views

A quit command weaker than windowkill?

Typing in xdotool getwindowfocus windowkill currently terminates the active window and bypasses any safeguards like "would you like to save your work?". Is there a weaker command than windowkill I ...
2
votes
4answers
75 views

How can I disable lightdm auto-login from the command-line when isn't possible to get a GUI session?

Suppose auto-login to a session is active in Ubuntu. So there will not be an opportunity to select a session (e.g gnome, unity, kde, etc). But if the environment is corrupted there is no way to escape ...
0
votes
1answer
24 views

Installing Xcape (a newbie question involving the “make” command)

I executed the minimal building directions of xcape: $ sudo apt-get install git gcc make pkg-config libx11-dev libxtst-dev libxi-dev $ mkdir xcape $ cd xcape $ git clone ...
1
vote
2answers
28 views

Listing folder contents during cd command

I might be mistaken here, but I was watching someone navigate using the cd command, and without actually executing it, they were able to show the folder contents of the current folder. So if I type ...