The command-line is the interactive interface to your shell.
1
vote
1answer
19 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
28 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
11 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
12 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
17 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
101 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
28 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
12 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
22 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
47 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 ...
2
votes
1answer
28 views
Dig command: Is the output guaranteed to be sorted?
Let's say I'm trying to lookup the IPs mail.yahoo.com, gmail.com and mail.google.com
If I execute:
dig @8.8.8.8 +nocomments +noquestion \
+noauthority +noadditional +nostats +nocmd \
...
1
vote
3answers
45 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
49 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 ...
4
votes
1answer
41 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
29 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
58 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
97 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
63 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
34 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
21 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
32 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
30 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
42 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
61 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
66 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
42 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
110 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
93 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
30 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
74 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
18 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
57 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
40 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
79 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
104 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
49 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
41 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
32 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
19 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
46 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
72 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" [email protected]
Question: How do I turn this command into a one-liner, so that I could just type ...
0
votes
2answers
60 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
132 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
70 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
36 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
213 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
37 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 ...