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

learn more… | top users | synonyms (1)

2
votes
0answers
639 views

m: command not found

just tried to compile the R-language from sources but my make aborted with m -f liblzma.a make[4]: m: Command not found I eagerly searched the web but it seams it's impossible to find the command ...
0
votes
1answer
36 views

Unable to detach a USB device on Ubuntu 14.04

I was using udisks to unmount and detach usb device with following commands which works just fine on Ubuntu 10.04 udisks --unmount /dev/sdb1 udisks --detach /dev/sdb Because udisks is not available ...
0
votes
0answers
22 views

How to recover content of the file in unix? [duplicate]

I accidentally gave cat >filename instead of cat filename and my content is lost.Now I have only my file,but content is deleted.How to recover the content alone? Please help me to get back the ...
0
votes
1answer
42 views

Unix, create file based on command [duplicate]

I have a command, but I want to get the results into a .txt file I can open. How do I alter my command to allow the results to be put into a text file. I plan to transfer this .txt file to my local ...
1
vote
0answers
22 views

How to connect to wifi using nmcli with a static IP address and password?

There is info on how to connect to ethernet(eth0) with nmcli using a static IP, but nothing on how to connect to wifi (wlan0)? This sets up a connection profile but how to add the password and ...
3
votes
1answer
37 views

Argument list too long when running ls -d “$PWD”/* command

I'm trying to execute ls -d "$PWD"/* > formmlFileList43k.list But I get the following error: bash: /bin/ls: Argument list too long I've read using a pipe won't have such limitation, how can I ...
1
vote
2answers
55 views

Retrieve name of the active network interface only [duplicate]

How can I retrieve from the command line (or a shell script) only the name of the active network interface, in Linux? If there are several active interfaces, I want just one (selected arbitrarily).
0
votes
2answers
22 views

how would I convert this interface block into a command

I tried this: ifconfig br0 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0 network 192.168.0.0 gateway 192.168.0.1 up But it did not work I am trying to use all of these parameters: ...
0
votes
2answers
61 views

How do I find a range of numbers in the content of file and move files containing the range of numbers to another directory?

Okay so I have about 90 files, each with a body like 187942 78.9 I want to filter files that has the values between 70 to 90 on the second column and move them to another directory. I'm ...
0
votes
0answers
39 views

How to split a A4 Letter page pdf into 2 4x6 pdfs

I get pdfs in A4 Letter size in portrait orientation, they have 2 sections top and bottom each 4x6. Right side of pdf is blank. I need to spit them into 2 pdfs 4x6 or 2 pages of the same pdf.. Ive ...
1
vote
1answer
28 views

Packages and the like for configuring new systems [closed]

I'm faced with the prospect of moving from a server which has been configured previously with loads and loads of the sorts of tools you forget about day-to-day as you do various tasks (I'm talking ...
0
votes
1answer
71 views

Create a symbolic link in the current directory

I have got a question were I have to create a symbolic link named "new" to file /test/test1/test2. The current command I have is this: ln -s /test/test1/test2 /new I am not if there is a specific ...
0
votes
1answer
71 views

Downloading an attachment from Inbox using the command-line

Please help me figure out the right program to use to solve the following: Everyday I have a report emailed as a PDF attachment to my inbox. The subject is the same, and it is from the same email ...
0
votes
2answers
39 views

How to pick a random element from the output of a command?

if I have sth. like echo 1 2 3 4 5 6 or echo man woman child what do I have to put behind the pipe to pick out one element of 1 2 3 4 5 6 or man woman child ? echo 1 2 3 4 5 6 | command 3
1
vote
2answers
63 views

how to move all files from a pipe into a directory ?

I performed a file-command on all elements in my Desktop directory: ~/Desktop > file * then I grepped all the lines who have the string "image" in the description: ~/Desktop > file * | grep ...
0
votes
0answers
25 views

Uninstall package from command line in unbootable system

I messed up my Raspbian Jessie system by installing upstart, and now it gets hung up while booting. Now I'm trying to get back to a bootable system by uninstalling it. I used these directions to get ...
-1
votes
3answers
82 views

Shell scripting : want to login on some server, which are in same domain and execute command and exit

I have 10 unix servers, I want to log into them one by one, execute 4-5 lines of code, save the output and exit. For Example: 10 serves: Intially at xyz server Login in server 1 --> execute 4-5 ...
3
votes
2answers
161 views

Why the defined path is used as file name when I transfer files through scp to a Windows host?

When trying to copy a file from Linux (Raspbian to be precise, though I don't think it matters) to Windows using SCP: scp a.txt {user}@{ip}:\C\Users\{user}\a.txt The file is copied, but to ...
0
votes
0answers
29 views

SSH Automation - Dynamically execute Script over SSH [duplicate]

Is there any tools do dynamically control with a local script a ssh session. So I can control the key pressed, wait some time, control the output. Something like AutoIt for Windows in the Linux/SSH ...
3
votes
3answers
117 views

Using /dev/random, /dev/urandom to generate random data

I'm looking for ways to use /dev/random (or /dev/urandom) from the command line. In particular, I'd like to know how to use such a stream as stdin to write streams of random numbers to stdout (one ...
4
votes
1answer
38 views

I am stuck connecting to the internet via a usb wifi stick

I am trying to set up a an internet connection through a usb wifi sticker in Linux. Here's the sequence I tried: iw dev This returns the name(?) of the Interface that I want to connect to: phy#0 ...
0
votes
1answer
32 views

command line in su - and background

I am writing a simple unix script to automate reading of a log file. The following does not give any output to the terminal. It just asks for the password for buser and then it just hangs. I ...
22
votes
8answers
1k views

Clipboard for copying and pasting files in command line?

In Bash, suppose I visit a directory, and then another directory. I would like to copy a file from the first directory to the second directory, but without specifying the long pathnames of them. Is it ...
0
votes
2answers
76 views

How to use cd command in su command?

In the below script the cases aserver and bserver work fine. But in case "cserver" above, after su - gsxuserp, I need to perform the following three options with the same user. cd .. cd ...
0
votes
3answers
199 views

Help with tr command

Assume that the file ft has 25 lines of text. Explain the command: tail -15 ft | tr "a" "A" > ft and tell me how many lines the file ft has after the execution of the command. I understand that ...
12
votes
5answers
956 views

How to list all files in a directory with absolute paths

I need a file (preferably a .list file) which contains the absolute path of every file in a directory. Example dir1: file1.txt file2.txt file3.txt listOfFiles.list: ...
1
vote
0answers
39 views

Get uptime for multiple VM's

Is it possible to get the uptime for other VM's that are on the same cluster without the need to ssh?
0
votes
2answers
76 views

Using Both Grep and Cut

I want to grep the output of tcpdump and cut some part of it but the command below is not working. tcpdump ... | grep -i --line-buffered "..." | cut -d'&' -f1,2 Do you know what is the problem? ...
0
votes
2answers
113 views

rmdir dir gives error 'Not a directory'

I have what looks to be a directory directory dir2, I once moved it from another directory dir1 to back it up and created a new dir1. Now I suddenly saw it again, realized I didn't need it and did rm ...
1
vote
1answer
36 views

Process list as a background process

abhigenie92@ubuntu:~$ (sleep 2; echo $BASH_SUBSHELL ;sleep 2) 1 abhigenie92@ubuntu:~$ (sleep 2; echo $BASH_SUBSHELL ;sleep 2)& [1] 3297 abhigenie92@ubuntu:~$ 1 [1]+ Done ( ...
2
votes
1answer
41 views

Use multi-threaded make by default?

Is there any way to have make use multi-threading (6 threads is ideal on my system) system-wide, instead of by just adding -j6 to the command line? So, that if I run make, it acts the same as if I ...
30
votes
3answers
4k views

Why is the password I entered not visible?

Below is an image of the process I took to create a user on bash in Linux. I understand that the password shouldn't be displayed for security purposes, but what I mean is, why do asterisks (or the ...
0
votes
1answer
28 views

copy a directory into multiple directories

I have structure like A directory dir_a/dir_b and dir_c/dir_d to dir_z or some other 100 names. now I need to copy dir_b into dir_d and all other sub-directories in dir_c. And a part from that ...
-1
votes
1answer
42 views

Accidentally moved file to `,` (comma)

I logged in as a root user and when moving a file, instead of: mv myfile . I entered mv myfile , And now my file is gone but I am not sure where to. Where has it moved to?
1
vote
2answers
104 views

Command to simulate keyboard input

Is there a command that exists that can simulate keypresses? I want to pipe some data to it to make it type into a GUI program for me.
1
vote
1answer
35 views

Stop ImageMagick from rotating image on append

I took two photos with my phone, one horizontal and one vertical, and they show up fine in Eye of Gnome. When I try to glue them top-to-bottom with ImageMagick's convert: $ convert img1.jpg img2.jpg ...
-4
votes
1answer
63 views

What does “|” between arguments in cat command do?

I understand what the "cat" command does. I.e. cat file1 file2 > file3 Will put the contents of file1 and file2 in file3. (If I am not mistaken) But what exactly does: cat file1 | file2 > ...
3
votes
2answers
46 views

Is it possible to display directory contents automatically while typing command?

I'm new to Linux. I wonder if it is possible to make terminal display directory contents automatically while I typing a command with directory arguments? For example, if I want to do cp ./fileA ...
1
vote
1answer
69 views

Rename multiple files in multiple directories to the name of the directory plus 1

I have been attempting to rename a bunch of files to their directories. I have multiple directories with spaces and no spaces /The Dark Tower. In it are multiple titles with file names with spaces ...
3
votes
3answers
159 views

cannot move file because of & in name

Trying to command mv foo&foo.jpg images/ but get command not found, then if try and rename the file it won't let me.
2
votes
2answers
253 views

Getting Public IP address of EC2 instance from outside using AWS-cli [closed]

I am trying to make use of Amazon's elasticity and bring instances online and off using the AWS cli. But as you know, every time you offline a system, and bring it back to life, it comes with a new IP ...
0
votes
1answer
33 views

Share apps across multiple Linux distributions?

I have a triple boot of Ubuntu, Haze OS, and Kali Linux, and I would like to run an app installed on another operating system from my Primary OS. Like running chrome installed in Ubuntu while using ...
0
votes
2answers
103 views

Linux server terminal - rows of tildes, can't write commands?

I'm pretty new - came across this problem. My webserver terminal is looking weird, there are some code echoes and then rows and rows of tilde. Where I type would be at the green square, but nothing I ...
1
vote
3answers
53 views

How shell processes the content of command line in order to execute?

How shell processes the content of command line in order to execute? Command first and then option and arguments. Dividing command line into segments. Processes from beginning to the end.
3
votes
1answer
54 views

Unable to get NAT working via iptables PREROUTING chain

So, not concerning ourselves with the WHY, and more so with the HOW, I'd like to see if anyone knows where I'm going wrong here. Basically, I'd like to forward all packets headed for port 80 on an IP ...
3
votes
2answers
98 views

How can I CTRL^C out of a password prompt?

Say I started a su command, and I want to cancel it. Control+C doesn't work for su like it does for sudo... I have to finish the prompt (either by getting the password wrong enough times or by ...
11
votes
2answers
2k views

Need something that is faster than “wc -l”

For a really big file like 1GB wc -l happens to be slow. Do we have a faster way calculating the number of newlines for a particular file?
0
votes
1answer
26 views

Delete file returned by “mpc search” with single command

using the mpc search command I can find a the filename of a song like so: mpc search title 'Two Weeks' The output would look like this: Grizzly Bear - Two Weeks.mp3 Since I also know the location ...
2
votes
2answers
124 views

Avoiding plain-text password in http_proxy

I am behind a corporate firewall, which brings lots of pains in the area of proxies. There are two main approaches I've found to work: Use Cntlm at the cost of not being able to connect (from the ...
13
votes
4answers
731 views

Monitor hard disk activity

In a Ubuntu 14.04 server I am experiencing a massive hard disk activity which has no apparent justification: it comes as a burst, it lasts a few minutes and then disappears. It consumes system ...