Questions about using the command-line interface (CLI).

learn more… | top users | synonyms (6)

1
vote
3answers
533 views

Using a Fork Bomb to prevent interactive shell on root

This question makes two assumptions: My root user's interactive shell runs bash .bashrc is only called on interactive shells If I append the generally known fork bomb (:(){ :|: & };: - do not ...
2
votes
2answers
294 views

Accessing a nameless folder via terminal

I have a thumbdrive which I use to plug in at print shops to get my printing done. The first time it got infected by a Windows malware "Gamarue", I copied out files using Ubuntu and formatted it, no ...
0
votes
0answers
32 views

Load a LAN shared prolog file in ubuntu

I am trying to load a prolog file in ubuntu on my PC which is shared on LAN by a remote PC. I tried the following command swipl -s //ServerName/sharedFolder/prologFile.pl I am getting 'script file ...
1
vote
1answer
66 views

sudo doesn't request a password after installing PiNet

After installing PiNet on my Ubuntu machine, I noticed that sudo is no longer prompting me for a password. This is still the case after rebooting or after running sudo -k: $ whoami thang $ sudo ...
2
votes
2answers
13k views

How to change ubuntu's server date and time via command line?

The Ubuntu server's current date and time is different from the time zone date and time. I have tried using: sudo date "30 Sep 2015 4:43:42" to change it but it did not change the date and time, ...
0
votes
4answers
87 views

What is the best way to have output of multiple commands in one console?

I working to improve my programming environment and now I need to have output of multiple commands (coffeescript/sass compilation and unit tests) in one console. This can be achieve concatenating ...
1
vote
1answer
34 views

help needed understaning ls format meaning

I hit l this evening while compiling some things, and got some unexpected output. $ l l3* lesson03.cpp lesson03.o look.png readme.txt so then I looked at alias: which lists l as: alias l='ls -F'...
0
votes
0answers
154 views

A progress bar for diff in terminal?

How can one experience a progress bar when using the diff command on folders(recursive and brief(-r and -q))? I am trying to free up some space, and have run into some problems. Yet I have noticed ...
1
vote
3answers
1k views

Passing contents of file on the command line for c++ program [duplicate]

I have the following program (let's call it program.cc): int main() { int x, y, sum; std::cout << "A program which adds two integers\n"; std::cout << "Enter 1st integer: "; std::...
5
votes
4answers
261 views

Read the table after a specific line and count occrences with awk

I have a table somewhere in a big log file which looks like this example: ---------------------------- CARTESIAN COORDINATES (A.U.) ---------------------------- NO LB ZA FRAG MASS ...
3
votes
1answer
209 views

Installing Plotmtv

I'd like to install plotmtv. For this reason I used simply the command sudo apt-get install plotmtv but I get an error message saying that the package is missing, it is not available or it is ...
2
votes
1answer
73 views

Error While compiling U-Boot

/bin/bash: arm-linux-gcc: command not found /bin/bash: arm-linux-gcc: command not found dirname: missing operand Try 'dirname --help' for more information. Generating include/autoconf.mk /bin/bash: ...
4
votes
1answer
220 views

How can I copy and combine several .txt lists in alphabetical order?

I have several .txt files containing contact lists from different phones, how can I combine these while avoiding duplicates in alphabetical order using the terminal? example: contacts1.txt: John ...
2
votes
1answer
214 views

How can I use the previous command's output?

I was trying to remove all files in a folder with the .class extension, so I made a small shell script. Can anyone tell me why it isn't working and offer a solution for my problem? The script: #!/...
11
votes
1answer
298 views

What does _expand do?

I was working with the shell, and by mistake I autocompleted with tab after writing _e, which resulted in _expand. What does this command do? I couldn't find an explanation online, the only ...
1
vote
1answer
42 views

MAUI Keyword Extraction : Command not found

I am trying to run MAUI for keyword extraction. However, when I run this command: java -Xmx1024m -jar maui-standalone-1.1-SNAPSHOT.jar train -l data/docs/fao_train/ -m data/models/...
0
votes
1answer
188 views

How to create an alias that will open file in Brackets?

New to this whole Linux thing, and creating alias' in Mac seemed a little easier! Anyway, I'm trying to create an alias that will open the desired file within Brackets, or Sublime... etc. I don't ...
3
votes
1answer
34 views

Overriding cd builtin to source env settings, possible to use with autocd?

I am currently overriding the builtin cd command to source an environment file based on the environment currently being built. My main question pertains to how cd runs when I have shopt -s autocd ...
3
votes
6answers
922 views

Find all files with specific extensions that contains a string

I'd like to know how could i find all files whose extension can be .xml and .py that contain the string "Jason" under a path "./" recursively? Or how could i exclude .po from the search?
2
votes
1answer
920 views

How can I find world writable files and folders and set the sticky bit?

I want to do the following: Need to find all world writable files and folders from / root. If found, I need to check whether the sticky bit is set or not. If the sticky bit is not set, then set it. ...
0
votes
1answer
84 views

Sequential renaming of files

I found an answer for zero-padding numerical filenames which works fine for renaming filenames as follows : 1.jpg > 00001.jpg 2.jpg > 00002.jpg . . . 9.jpg > 00009.jpg That uses the ...
3
votes
1answer
62 views

How can the executable name of a program listed in a Dash search be determined? [duplicate]

Searching on the dash, I can see the program listed as "Personal File Sharing". How can I find the executable name of this program such that it can be launched in a terminal?
3
votes
3answers
324 views

Deleting duplicate lines in text file…?

Complete noobie question --- How can I delete duplicate lines in a text file via command prompt? For Example- I have a 10MB text file and I want to keep only one line of "My line", but somewhere in ...
3
votes
0answers
124 views

Run python script from a launch file not in the same directory [duplicate]

I would like to run a Python script by double-clicking a launch file, but the script is not in the same folder as the launch file. The information is going to be recorded in a CD (kind of ...
0
votes
2answers
99 views

using the command line in ubuntu 14.04 LTS

How do I use the run command (I assume it is used on the terminal). for example, I received an instruction to run /opt/COMODO/post+setup.sh -- then, after that i would do etc/init.d/cmdavd restart......
0
votes
1answer
475 views

root privilege is not working on chmod in android adb shell

shell@android:/system/etc/wifi # shell@android:/system/etc/wifi # ls -l -rw-r--r-- root root 326 2013-12-19 14:37 p2p_supplicant.conf -rw-r--r-- root root 282 2013-12-19 ...
1
vote
1answer
72 views

Different environment variables depending on gui or shell

The environment variables of a program differ on whether it is started from a terminal or from the desktop (by clicking on its icon). For example: I use bash and have specific variables set in my ....
2
votes
0answers
98 views

virtualenvwrapper creates envs in ~/.virtualenvs? (with questionmark) -> leads to issues

I have installed Ubuntu 14.04 a few weeks ago, and start and learn Python/Django. At the beginning I installed virtualenv and virtualenvwrapper via pip, and worked like a train. Yesterday I messed up ...
0
votes
1answer
34 views

Changed user name in CLI. But even after rebooting, user name is the same [closed]

Changed user name in CLI. But even after rebooting,user name is the same in GUI. Why it didn't get changed..? Shall we try to change in GUI mode itself? The users are common to both CLI and GUI right?
42
votes
4answers
3k views

What's the difference between <<, <<< and < < in bash?

What's the difference between <<, <<< and < < in bash?
5
votes
2answers
6k views

loop through all files in a folder [duplicate]

I'm writing a script to get all files within a folder(including sub-folder): #!/bin/bash function loop() { files=`ls -1Fd $1` echo "$files" | while IFS= read -r file; do if [[ "$file" == */ ]]; ...
3
votes
2answers
201 views

Adding the tar '-z' (gzip) parameter at the end of 'tar -cvpfz …' doesn't work as expected

I was using the answers from Copy files without losing file/folder permissions question, when I ran across this interesting and unexpected behavior. Using tar cvpfz target.tar.gz dir1 works perfectly,...
1
vote
3answers
222 views

Cannot get “alias” command to work at al

Running Ubuntu 14.04 LTS I open a terminal, and type a simple alias command, but then it doesn't work: ~> alias ge='gedit &' ~> ge ge: command not found I've also tried adding aliases to ...
3
votes
1answer
100 views

Does passing passwords as plain text arguments reduce WiFi network security?

This app uses the command line to create a WiFi access point with this command: create_ap wlan0 eth0 MyAccessPoint and you can also make a WPA + WPA2 network with this command: create_ap wlan0 ...
-1
votes
2answers
83 views

difference between sudo su - and su - [duplicate]

I have tried in Google but couldn't get exactly what I need. Could somebody explain the difference between sudo su - & su - Thank you.
0
votes
2answers
128 views

Can the terminal calculate combinations?

I would like to know if the ubuntu terminal can calculate different combinations (like nCr in math). But I don't want just the number of possible combinations but the combinations themselves. Update: ...
0
votes
1answer
98 views

Startx take me root@hostname prompt with high video but no gui

I have Ubuntu 14.04.3 LTS trusty on a PowerPC. When I first login, I got a prompt user@hostname I then run sudo startx It runs through the whole procedure but instead of getting the GUI desktop I ...
0
votes
1answer
68 views

Gnuplot script bash problem

I have wrote this script in bash for f in $FILES do echo "Processing file... $f" # take action on each file. $f store current file name B=$(basename $f) filename="${B%.*}" mkdir $BASEDIR/$...
0
votes
0answers
20 views

How to convert .pdf files to .epub using terminal [duplicate]

I want to convert pdf files into epub files using terminal commands.
1
vote
1answer
179 views

How to make work such a command: “$ sudo php -v”?

I have installed and working PHP53 from source. PATH is set in ~/.profile like this: export PATH=$PATH:/usr/local/php53/bin $ php -v # works good BUT: $ sudo php -v # sudo: php: command not found ...
2
votes
3answers
345 views

Why doesn't `bc` utility exit with `^C`

I was using the bc utility recently and Ctrl+C cannot be used to exit the program. Ctrl+C's interrupt signal is returned with the message use quit to exit. I can use EOF (Ctrl+D) or quit to exit. I ...
0
votes
3answers
199 views

Why won't my cp command copy whole directories? [duplicate]

I've tested the cp command, and it will only copy individual files. For example, I typed cp followed by the exact filename, then typed the directory and the file got copied. However, when I typed the ...
1
vote
1answer
62 views

How to get to terminal? [duplicate]

I am a novice, using Ubuntu 14,04. I have tried to install Skype, and it does not work. I need it installed, but I read all the suggestions, and they all refer to using some sudo commands in what I ...
0
votes
1answer
98 views

MAAS - CLI or API for deploy

we have installed MAAS, however we are not able to find any information / documentation how to deploy ready node's through API or CLI? We are only able to deploy node's through MAAS API. Is there a ...
2
votes
3answers
183 views

Is there a way to run a bash script unattended?

I'm still pretty new to the Linux world now that I've completely the made the switch because of my experiences with Windows 10. I gave it a shot, but it's just not as good as I would have expected ...
0
votes
1answer
57 views

Problem on terminal of Ubuntu 12.04 LTS [duplicate]

I installed Ubuntu 12.04 LTS in Windows 8.1 using vmware workstation. When I open a file in the terminal using vi filename.c, the arrow buttons will not work properly, pressing up arrow prints A, down ...
2
votes
1answer
213 views

batch rename zip files based on contained file names

I've got a directory with 15000 zip files. I'd like to rename all files which, when unzipped, contain a file of the form YYYYMMDD_IPC.csv where YYYYMMDD happens to be a date but for the purposes of ...
1
vote
1answer
66 views

I am not able to change directory to local disk using terminal even though ls is listing them

It is showing directory doesn't exist again and again here is what I am getting v4_adi@v4:/media/v4_adi$ ls F drive Local Disk1 v4_adi@v4:/media/v4_adi$ cd F Drive bash: cd: F: No such file or ...
1
vote
1answer
95 views

Install es40 emulator from source code on ubuntu 14.04.3

I try to install es40 emulator on Ubuntu 14.04.3 I unpack zip package Then excute "sed -i -e 's/\r$//' configure*" to clear my code for unknown character in my configure file and then excute ./...
1
vote
0answers
97 views

Rsync to exclude folder and include certain extensions

Creating a cron job for a nightly back-up. I have the code working in two permentations, but each does something I don't want it to do. Here are the contents of my filter list: - .*/ - $* - ._* -...