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

learn more… | top users | synonyms (6)

0
votes
0answers
6 views

sh script works manually but not via cron

so I have a cronjob created using this tutorial: http://www.matt-helps.com/automatic-backup-of-mysql-database-to-s3/ It runs when I give the command sudo sh s3BucketBackupScript.sh But I can't get ...
0
votes
3answers
138 views

How can I count lines of differently named files, and write the outcome to a csv file?

I'm writing a script to analyse some data. I have several subset of files, and I would like to count the line from these files and write the result into a csv file. I'll try to do an example. I have ...
0
votes
2answers
16 views

find does not go through all files in folder structure

I want to convert a massive bunch of wmf files (120860!) to svg in many subfolders (27 subfolder with many sub-subfolders each). I have this bash script that does for i in `find -iname "*.wmf"`; do ...
1
vote
0answers
25 views

How can I run a custom script on /usr/bin/ via cronjob?

First of all: This is not a duplicated of Cronjobs made via cronjob not working which seems to be fixed by simply giving execution permissions to the script and/or adding the #!/bin/bash at the ...
0
votes
0answers
13 views

How do I use the mmv utility to move an arbitrary number of files?

I have a folder with too many files, I want to move some of the files to a subdirectory -- without a script. How can I move, or copy, not all files, but the only the first n number of files? For ...
2
votes
1answer
32 views

how to close/restart phpstorm from command line

The phpstorm is not responding and i want to kill the process. this is the location of instalation: /opt/phpstorm/PhpStorm-143.1770/bin. i cannot close it with the X button so please help me to close ...
0
votes
0answers
25 views

Bash - for loop help needed please

So I have the below script and it works as expected (it SSH's to 40 hosts, goes to a specific file looks for a specific word with a date of yesterday, puts a . at the end of the line and then mails ...
85
votes
7answers
599k views

How to install Chrome browser properly via command line?

I am trying to install chrome browser via command line. I tried this: $ apt-cache search chrome browser The results show that the proper term is "chrome-browser," so I tried that: $ sudo apt-get ...
6
votes
5answers
5k views

Why do I get “Directory not empty” when I try to remove an empty directory?

I have this empty directory, but I keep getting the following error message: Cannot remove test: Directory not empty I know this question has been asked plenty of times but none of them helped. I ...
0
votes
1answer
23 views

One single command to update everything in Ubuntu? [duplicate]

I know that there are three command to update and then upgrade the whole system, these are: sudo apt-get update # Fetches the list of available updates sudo apt-get upgrade # ...
0
votes
1answer
32 views

How to change command line prompt name and add path of current directory after name? [duplicate]

Currently my command line prompt looks like this nuve@nuve-Inspiron-5547:~$ but I want to change it Azer's Terminal:"Path of current directory". How can I do this? I need exact code line to add to ...
-4
votes
0answers
41 views

How to put a date as one argument [on hold]

I have a decryption program "ELF" that takes in a string as an argument and an encrypted text with a calendar image, when i try to input the encrypted text NXIS24CuEq@uEq@uEq@u into the program I just ...
2
votes
0answers
33 views

ls output not compact anymore

I wanted to ask about the ls command in lubuntu 15.10. Now there is a new line for every entry. I know from other distributions that there is also an output style where ls outputs the content of ...
64
votes
7answers
89k views

How to add Android Studio to the launcher?

I'm trying to install the android studio so that I can launch it from a launcher instead of via terminal. Android Studio -> Tools -> Create Desktop Entry doesn't do antything Can someone give ...
2
votes
2answers
77 views

replace a string by variable in a file using bash script

through bash script, I am trying to find a value-number- from a text in a file, then make a new variable then replace it with a string in that file for example. in a file in /root/test.txt , i have a ...
0
votes
1answer
28 views

How to change file types?

I changed the permissions of some directories and the files within them, so now when I list them, most are highlighted green or have names that are green. Some of the files used to be blue or white, ...
0
votes
1answer
16 views

Bash script not working with crontab [on hold]

I own a raspberry pi that runs raspbian jessie. I'm using this raspberry with motioneye as a system surveillance. Motioneye records files to a sd card but i want to delete older files in folder ...
0
votes
0answers
21 views

How to improve bash scripting from 1 long line to a better method? [migrated]

I have a script that open up terminal and open up 5 tabs, execute a certain command, and go to a certain working directory. #!/bin/sh gnome-terminal --tab --title="Zookeeper" --profile Hold -e "sh ...
0
votes
1answer
29 views

format old Linux version and install new one [on hold]

My desktop has Ubuntu 10.04lts operating system. I wish to remove it and install a new Linux flavour. Can anyone please tell how it is done? Thanks in advanced P.S. I don't wanna lose my data. Not ...
2
votes
3answers
222 views

Searching for specific magic byte in an ocean of files

I want to know how I can search for a specific file type: I have entered a SSH server and I am trying to search for a .jpg file, but the owner of the server (my teacher) has removed all extensions. I ...
0
votes
0answers
23 views

How to autorun a ruby script in Ubuntu?

I'm using rvm and running ruby 2.3.0. which ruby returns /home/ubuntu/.rvm/rubies/ruby-2.3.0/bin/ruby The script location is: /home/redline/sinatra-aggregator/server.rb. I've tried all sorts of ...
5
votes
4answers
17k views

How to create shortcut for a command in terminal?

I want to create a shortcut for a command in terminal. Like for a command "ssh user@123.45.7.123", I just want a command "user" and the above command will run. Is this possible, and if so how can it ...
2
votes
2answers
5k views

Why am I not able to send an email from command line

This is what I did (as per a few discussions on this website) mail -s "hi" addressee@email.xyz < test.txt Where text.txt has the message. I checked to see if mail did exist and it does at ...
0
votes
0answers
7 views

Postfix- sending mail from shell Error

I've configured postfix. Somehow I'm getting this warning while executing following command. echo "hi" | mail -s "test_sub" "receiver_email_ID" It prompts me these warnings: send-mail: warning: ...
1
vote
1answer
67 views

How can I make sure a program is killed when VPN is running?

There is a program that I need to not have running whenever my VPN is running. I don't want to resort to closing it manually every time, because I might forget sometime. I would like to guarantee ...
1
vote
0answers
17 views

How to create users using a csv file created with LibreOffice Spreadsheet?

I am trying to create multiple users and a group all at once to help me learn linux, but im running into trouble. (Mainly I have no clue what i am doing.) groupadd Avengers: useradd Hulk: useradd ...
0
votes
0answers
10 views

Can I use a hexadecimal value rather than ANSI colors in gnome-terminal? [duplicate]

I would like to have specific colors for my PS1 prompt, but those colors do not match my theme. I would like to keep the theme consistent for vim and other programs; however, I would like to change ...
4
votes
2answers
538 views

How can I bulk-add a file's creation date to the filename?

I have generated a time-lapse series of images and have named them sequentially {0000..9999}.jpg This isn't great for browsing the whole set as it's harder to tell when a given image was taken from ...
0
votes
1answer
20 views

Is there anything like Microsoft's taskkill in Terminal? [duplicate]

Is there anything similar to MS Windows' command-line tool taskkill for Ubuntu's command line?
0
votes
1answer
216 views

./xampp-linux-x64-5.6.14-0-installer.run command not found

Hi all i'm trying to install xampp on my ubuntu 15.04 i've downloaded the .run file and i've collocated it on my Desktop with terminal for first i've moved to the desktop with: cd Desktop then ...
2
votes
1answer
23 views

./run.sh: line 1: java: command not found

I'm trying to install worksnaps client so I can start working on a project. I'm running Ubuntu 14.04 LTS 32bit system. Installation and Configuration for worksnaps are simple : Download the ...
163
votes
5answers
833k views

Change folder permissions and ownership

I would like the user to have full rights on this folder (as well as all sub-directories and files in it): ~/.blabla currently owned by root. I have found numerous posts (in this forum and ...
1
vote
2answers
31 views

How to rename a partition [duplicate]

I have partitions that I would like to rename. What are the terminal commands to do this?
28
votes
5answers
38k views

Shutdown from terminal without entering password?

I have desktop edition of Ubuntu. I like the Terminal so that that I prefer to shutdown my computer with the shutdown command. However when I type shutdown now it prompts me to enter my password.Is ...
46
votes
5answers
117k views

How do I save terminal output to a file?

How do I save the output of a command to a file? Is there a way without using any software? I would like to know how.
67
votes
9answers
75k views

Is there bittorrent software that runs in a terminal?

I want to deploy it on my vps server, so I can download resource quickly. I want this function a lot, because some resource are in foreign country, so use this could reduce my time.
0
votes
1answer
32 views

Why is rsync copying directory structure when my find result only shows me files?

I have an annoyingly complicated find command I've cobbled together that I pipe to rsync with the intention of copying files and syncing new versions. I'm trying to write something that is efficient ...
15
votes
3answers
17k views

Prepend current git branch in terminal

How can I configure the terminal to display the current git branch? I'd like to see the second line rather than the first: andy@bob:~/my_projects/project_x$ (master)~/my_projects/project_x$ I ...
4
votes
1answer
49 views

How to quickly get the reason for the most recent update of a package from the command-line?

Is there a command-line command I can run to quickly determine the reason for a package update? Ideally, a command that dumps a set of URLs to all of the relevant information. For example (it's a ...
0
votes
0answers
21 views

Ubuntu 15.10 slow stepper scrolling in terminal

Upgrade to 15.10, the stepper scrolling in GNOME Terminal is unresponsive, requiring between 4 and 7 clicks to scroll one line. I use a theme with scrollbar steppers (the arrows either end of the ...
-3
votes
0answers
19 views

Starting ubuntu from scratch [on hold]

Please I need assistance on how to proceed in ubuntu after successfully log in. I want to know how to proceed after entering my user name and password.
1
vote
2answers
146 views

How do I check if a certain application is running by its file name?

How do I check if a certain application is running by its file name? Or if that's not possible, then by its command line? I know "pkill" has the option "-f" but I don't need to kill it, just check. ...
51
votes
8answers
54k views

How do I make my terminal display graphical pictures?

This is a quick mockup I copy and pasted together. I imagine this being super cool and useful. Does something like this exist already?
13
votes
5answers
4k views

Is there a way to create multiple directories at once with mkdir?

If I wanted to create multiple directories (on the same level) and then feed it a comma seperated list of directory names (or something to that effect)?
4
votes
2answers
27k views

How to access a folder through the terminal

I'm trying to follow this answer in getting my wireless to work. However I'm incredibly new at the whole Linux thing, and there is a part in there that I really just don't understand: Go to your ...
0
votes
0answers
12 views

ubuntu server share folder inside vm to other vm

I have VMs(Ubuntu server and Windows7) How do i able to make ubuntu server share folder to Window 7 ? and window 7 is able to seeing shared folder from ubuntu server ?
2
votes
0answers
13 views

Changing Xscreensaver's Video Player from mpv to VLC

The official documentation for xscreensaver gives an example of how to play videos as a screensaver: Install mpv and add something like the following to the `programs' preference in your ...
0
votes
2answers
33 views

How do I access my Bash History? [duplicate]

I am fairly new to Linux and I need to find a way to show the contents of my Bash History via the command line, and unfortunately I can't seem to find anything that works, or that I can understand. I ...
59
votes
10answers
390k views

How do I run .sh files?

Whenever I open a .sh file, it opens it in gedit instead of the terminal. I can't find any option similar to Right Click → Open With → Other Application... → Terminal. How do I open this file in the ...
10
votes
2answers
17k views

Maximum terminal resolution in ubuntu server virtual box guest

I have a VM machine running ubuntu 14.04 (guest) on a Win7 host. I currently have the resolution of the server set to 1024*768 by adding this GRUB_CMDLINE_LINUX_DEFAULT="splash xvga=1024x768x24" ...