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

learn more… | top users | synonyms (1)

2
votes
1answer
16 views

extract bounding box dimensions for TrueType font

On Linux, I can easily extract the height / width / ascent / descent dimensions of Xorg fonts via xlsfonts, e.g. $ xlsfonts -ll -fn 9x15 | egrep 'bounds|max' bounds: width left right ...
0
votes
1answer
56 views

Diff: slightly different filenames, same file

I'm using diff -rq to compare directories on a Mac OS X 10.6 server. In folder1, we have 'filename'. In folder2, we have'filename.archive' because folder2 is created by a file sync app that also ...
0
votes
1answer
43 views

Need to know how to start some GUI programs from terminal to use XMoand

I'm training myself to use XMONAD or something of the sort, but in order to do that, I need to know, from terminal, how to open the following programs: Bluefish Editor Settings (I'm using Ubuntu but ...
1
vote
1answer
33 views

Converting unix command to windows [closed]

I have been provided a command to use in unix, however, I want to perfrom the same operation in windows. Is it possible ? It's a network configuration command that apparently interacts with a server ? ...
0
votes
1answer
28 views

elif command is throwing error [closed]

Hi is the below elif command correct? elif [[ "${FILECOMMAND}" = "" ] && [[ -f ${ZIPFILE} ]||[ -f ${ZIPFILE3} ]]] I am getting an error when I run it.
1
vote
1answer
96 views

How to round floating point numbers in shell?

How do I correctly round IEEE 754 floating point numbers on the command line? I want to specify the precision of the output number - the count of fractional digits. Rounding 6.66 to precision 1 ...
0
votes
2answers
76 views

how to run rm in background in terminal

I have the following command to delete files in a folder that are 15 days or older: find /var/www/App/app/var/sessions* -mtime +15 -exec rm {} \; what is the best way to speed this up and run it ...
15
votes
3answers
591 views

Why don't shell builtins have proper man pages?

All shell builtins share the same manual page: BUILTIN(1) BSD General Commands Manual BUILTIN(1) NAME builtin, ! etc. Then there is a little text describing ...
6
votes
4answers
207 views

Strip Filenames and Rename

What rename command can I use which will delete the present filenames in a directory and replace them with alphanumeric filenames? Such as gg0001, gg0002, et cetera? And I'd like the command to work ...
3
votes
1answer
81 views

Estimate the size of the extracted files before extraction a `tar.gz` archive?

Before using tar to extract a .tar.gz archive, it is possible to get an estimate of how large the extracted files are in total?
1
vote
1answer
45 views

How to access Flash drives in CLI mode?

I have fedora 20 64bit and for unknown reason I cannot boot on graphical mode. I have very important files for my project there. How can I copy those files to my USB flash ? How can I find my USB in ...
1
vote
1answer
62 views

Simplest way of hashing passwords with multiple different hash algorithms [closed]

I have a large list of plaintext passwords stored in a file pwds.txt and would like to obtain the hashed version of these passwords under various different hash algorithms. I want one file for each ...
6
votes
3answers
332 views

how do I remove all files in a folder except just some specified files?

I want to remove all files in a directory while leaving just some specified files, they don't have anything in common by name. How could I achieve that? For example, the file names I want to keep ...
3
votes
1answer
316 views

How to grep the output of cURL?

I need to retrieve the expiry date of an SSL cert. The curl application does provide this information: $ curl -v https://google.com/ * Hostname was NOT found in DNS cache * Trying ...
0
votes
1answer
32 views

Background a process and execute something with one command

Probably it would be easier to do just with a script, but I wonder why can't I do that with one command. What I have tried so far: $ (ls >/dev/null &) && echo $! 3135 $ (ls ...
1
vote
1answer
121 views

How To Send Terminal Commands To Remote Server After Connecting Via putty? [closed]

In order to listing all batch files and finding the required file from a directory, I am using windows script to connect to the linux server. I can able to connect by passing necessary parameters but ...
3
votes
3answers
50 views

How to see manpage of previous command?

For example if I did a curl -F 'clbin=@some-image.jpg' https://clbin.com. How do I man curl easily?
0
votes
0answers
15 views

Output of `iw list`: phy_x corresponds to what interface?

I have 2 interfaces wlan0 and wlan1. When I want to see the modes that support my cards I do iw list and I see phy0 and phy2. How do I know what information corresponds to what card? In other words, ...
0
votes
2answers
39 views

can I use logical operators to remove all files that matches with one and/or other pattern in a single line?

I want to remove .txt or .csv files in a single line. What I have in my directory tachomi$ ls file1.csv file1.sql file1.txt file2.csv file2.sql file2.txt I only want .sql files so I want to ...
2
votes
1answer
78 views

shutdown program doesn't terminate after scheduling a shutdown

I'm having a bit of trouble with my home server (running Debian 7.7). When trying to schedule a shutdown, the following occurs: serverbox:~ $ sudo shutdown -h +10 Broadcast message from ...
0
votes
2answers
30 views

One SSH session one script multiple terminals no X [closed]

I have read other posts asking the same question in the answer was, run your script and have it like this: #!/bin/bash xterm -e command The problem is that I don't have X installed on that server, ...
1
vote
1answer
41 views

Adding files to .tar from directory

Is there a way to add files to .tar file in one directory from an another directory? And at the same time list the content of the tar to see if its added. I only found ways to add files if its in the ...
1
vote
1answer
31 views

Checking permission for files

Is there any way to check/find files and directories that only I created and check their permission?
0
votes
0answers
29 views

iw dev <iface> connect <essid> doesn't connect

I am trying to connect with the by the command line to the Wifi I have up on my AP with hostapd and no password and it's not working, the command doesn't have any effect. My AP doesn't have password ...
1
vote
1answer
20 views

Maintain the path in installable UnixAPI

I am developing an API in Unix environment for virtual machines. Most of the modules are developed in python. I have few questions on this. Inside the API I am using absolute path like ...
0
votes
1answer
38 views

Make python module as an installable API

I am developing an API in Unix environment for virtual machines. Most of the modules are developed in python. I have few questions on this. I want to make this as an installable API, I mean to ...
3
votes
2answers
134 views

Basic steps to develop python API in Unix environment

I am developing an API in Unix environment for virtual machines. Most of the modules are developed in python. I have few questions on this. I have the file extension as abc.py. I would like to make ...
2
votes
1answer
56 views

How to run a program that has its own command line within a shell script program

I need to write a shell script to automatically run a set of files through an existing program ~1000 times. The program I'm trying to run them through is accessed through command line as follows, then ...
0
votes
1answer
19 views

How do I immediately put a drive to sleep (without changing its power setting configuration)?

Within GNOME's "Disks" utility there is the option to immediately put a drive into sleep / standby, which spins down the platters. I would like to do this on my servers before pulling hot-swap drives ...
2
votes
1answer
28 views

Saving a list in a specific format

Is there any way I can save a list in a output.txt, but without using the text editor to make so that: before each output there should be the command used that made the list ( list -l, for example ...
1
vote
2answers
27 views

ls for decreasing order in combination with another command

I know there is the ls -r command for listing in a decreasing order. But is there any simple way to do it with a combination with another function by only using ls and not its arguments?
1
vote
2answers
55 views

What can I do if bash stops echoing?

One of the applications I use at work sometimes screws with my bash and so I don't see my own input anymore. I.e. $ echo foo foo $ becomes $ foo $ I incorrectly tried to run stty -echo which ...
1
vote
3answers
51 views

How to access temporary file straight after creation?

I've script which is connecting to remote host via SSH, creates temporary file and executing the following command: Calling system(mysql --database=information_schema --host=localhost < ...
0
votes
1answer
131 views

grep: input file 'X' is also the output

I use ubuntu 14.4, and attempt to redirect the output of grep command to a file, but I keep getting this error: grep: input file 'X' is also the output I've searched for this issue and just found ...
5
votes
1answer
74 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: ...
2
votes
1answer
78 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
170 views

What are the meanings of different Unix commands? [closed]

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 ...
2
votes
1answer
31 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
1answer
108 views

What is the purpose of those special characters in the sed command?

I found this bash command that creates a directory tree in your console window. I find it quite useful, but I don't really understand how all of the special characters work. Could someone help break ...
3
votes
3answers
116 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
69 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
36 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
45 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
97 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
80 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
132 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
vote
0answers
71 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
66 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
143 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
98 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 ...