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

learn more… | top users | synonyms (6)

1
vote
2answers
3k views

How to control output from crontab?

I am trying to run a test case via automation testing (sahi) , so I am running it repeatedly after 1 hour (via crontab). What I want is that whenever my test case fails i should receive the email ...
26
votes
2answers
27k views

Extract part of a video with a one-line command

If I have a video, normally avi, but could be any, and I want to create another one in the same format but just a part, the position i seconds to f seconds into the video, what is the one-line command ...
1
vote
1answer
406 views

Command line autocomplete no longer escapes special characters on certain operations

When I'm specifying arguments to the mv or cp commands at the command line and I hit tab to autocomplete the argument, it lists the argument without special characters escaped. For instance, it lists ...
6
votes
2answers
3k views

Replacement for DOS xcopy command

In DOS there's the command xcopy /s *.mp3 ..\TEMP2 How can I do this in Ubuntu? cp -r *.mp3 ../TEMP2 will copy recursively all mp3 files, unfortunately without the path because of the *.mp3 ...
2
votes
2answers
4k views

Is there any way to connect to Windows PowerShell from the terminal?

I want to access a Windows machine from Ubuntu. I don't want to connect with to the GUI (rdesktop) - instead I want to connect to Windows PowerShell from the terminal. This is because I want to ...
3
votes
1answer
144 views

cursor stops in the middle after pressing home key

In terminal i've changed my PS1. I think it maybe causing issues with allowing me to hit the home button. Normally by hitting the home button it's suppose to return to the first character on the ...
9
votes
4answers
496 views

How can I write a small script to clean every directory's files when the computer starts?

I have a guest computer for only internet usage. Some users download some files and leave them on the desktop but the computer does not have enough space for all guests and it is not allowed to put a ...
11
votes
2answers
14k views

How can I know/list available options for kernel modules?

As the question says it all, I would just like to elaborate with an example: i915.i915_enable_rc6=1 This is an option for i915 module or intel video driver. So is there any way to know or list ...
10
votes
2answers
1k views

Can a server handle simultaneous shell commands?

I'm writing a very simple browser based MP3 player in PHP. Part of this project requires that every MP3 file is converted to a WAV file. There's a function in PHP called shell_exec that allows you to ...
80
votes
7answers
236k views

How can I create a zip archive of a whole directory via terminal without hidden files?

I have a project with lots of hidden folders / files in it. I want to create a zip-archive of it, but in the archive shouldn't be any hidden folders / files. If files in a hidden folder are not ...
5
votes
2answers
328 views

Is it possible to convert a 30 second clip of an .mp3 to .wav via the command line?

Is it possible to convert a 30 second clip of an .mp3 to .wav in Ubuntu terminal? For example if I had an .mp3 that was 3:00 minutes long, would I be able to create a 30 second clip from 0:45-1:15? ...
4
votes
3answers
1k views

Did I Somehow Get Infected with Spyware or Virus?

So I Was trying to Install Ubuntu restricted Extras, and well this poped up in the terminal. www.actingcareersnow.comCasting Calls For Kids & Teens. Audition Now! Ages 9 to 29. [1] 3241 ...
9
votes
5answers
3k views

How can I convert a folder of .pngs to .jpgs while setting the background color?

I have a folder of png files that have transparent backgrounds. I would like to convert them from the command line and maintain the images' transparent backgrounds. I'd appreciate any help. Since ...
52
votes
7answers
51k views

How to easily rename files using command line?

One of the ways I quickly rename files in Windows is F2 > Rename > Tab (to next file) > Rename ... But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must ...
8
votes
4answers
7k views

How can I preview HTML documents from the command line?

I use catdoc to preview Word documents from the command line. Is there something similar for HTML? In other words I would like to do cathtml Webpage.html | less and get more or less a man page look ...
2
votes
2answers
8k views

Help on if-else in shell

Please help me writing a shell programming using if else, all possibile code using [[ ]], [ ], (( )). I tried but it does not work (you can check my previous question Arithmetic binary operators -gt, ...
6
votes
2answers
8k views

How can I permanently change the text size for gnome-terminal?

I just wanted to ask... It seems that you need to press Ctrl + - (ctrl plus the minus sign) in order to get better resolution (smaller text) when running terminal. But I was wondering if there was a ...
8
votes
1answer
2k views

How to set Guake as preferred terminal emulator for “Run in Terminal”?

I've recently installed Guake and like it a lot. I'd like to set it as my preferred terminal application. That is, when I right-click on a bash script file, click "Open", and choose "Run in Terminal", ...
2
votes
1answer
858 views

Can I launch Tomboy Notes over ssh

I have a few machines running Ubuntu and often I need to run an application from one machine on another. So I use ssh to do this as I already have it set up and it is simple to do. For example ssh ...
1
vote
2answers
1k views

Change super+t to open a terminal

I'd like to change the super+T that opens the trash to open the terminal, as i see the Ctrl+Alt+T un-needed because i hardly use the trash as much as i use the bash
6
votes
2answers
2k views

Why won't the terminal display new lines?

For example, when I type following command, echo line | (cat >/dev/null; vi) even wrapped in another shell, sh -c 'echo line | (cat >/dev/null; vi)' and returned from Vim, now it won't ...
11
votes
5answers
7k views

Command line archive manager / extracter

I keep forgetting all the corresponding extract commands for every compression format. So I was thinking about writing a script that merely maps file extensions to the appropriate extract command. ...
15
votes
2answers
26k views

Environment variables when run with 'sudo'

As example to my question, my ~/.bashrc file contains this lines: export LD_LIBRARY_PATH=/opt/intel/mkl/lib/ia32:$LD_LIBRARY_PATH export LD_PRELOAD=/opt/intel/mkl/lib/ia32/libmkl_core.so so that ...
21
votes
8answers
12k views

Is there a web based terminal/ssh client?

I'm at a public place, windows computers galore (library). I'm sshing into my ubuntu server box somewhere else. I open command prompt and remember that I read "you will be banned from using the ...
2
votes
2answers
852 views

Arithmetic binary operators -gt, -lt give error but work in a shell script

I wrote this simple script it works too but shows an error clear echo Enter 1st number read n1 echo Enter 2nd number read n2 echo MUlti is `expr $n1 \* $n2`; if [$n1 -lt $n2] then echo $n1 'is ...
1
vote
1answer
1k views

Help with compiling error

I already compiled I already compiled libfreenect for natty and now I am trying to install kinect mouse: https://github.com/Ooblik/Kinect-Mouse/ But when I type make I receive an error... This is ...
2
votes
2answers
739 views

Use `less` to view BIG (multi-gigabyte) CSV files [closed]

I have a big (multi-gigabyte) CSV file, which I am viewing with a puny computer. I would like to view my file using less or some command like it which doesn't have to read the whole file at once to ...
53
votes
2answers
63k views

Connect/disconnect from VPN from the command line

I have two VPNs setup on my Ubuntu machine, one using vpnc and one using PPTP. These were both setup using the GNOME network manager interface and work great. However on occasion I need to access this ...
2
votes
2answers
7k views

How to open an URL from command line to Firefox and “switch to tab”?

Firefox 5.0 has the option to "switch to tab" if the requested URL or search terms point to an already open URL (great thing by the way). Now, to open a URL from command line to Firefox a mere ...
3
votes
3answers
144 views

Command for taking all files in sub directories and putting them in parent directory

I have a directory that contains around 100 subdirectories. I want to take all the files from this directories and add them to the first directories then delete them all. Is this possible?
5
votes
1answer
3k views

How can I get colors in TTY working correctly?

I use vim a lot and it occurs to me that most of the time I don't even really need a GUI, since I'll only use my computer to take notes in VIM. The problem is, though, is that colors don't show up ...
16
votes
3answers
42k views

What is the difference between 'su -' , 'sudo bash' and 'sudo sh'?

I would like to know what is the difference between su - sudo bash sudo sh I cannot login as root while doing su - because I do not have the root password - I mean I have my user password with ...
0
votes
1answer
287 views

How to run application that is located on file system but not installed?

Recently my friend 'installed' testdisk for me on my laptop and used it to show me some stuff with it. But now I would like to launch it again and I do not know how to do it. I have tried to go ...
5
votes
1answer
4k views

How to remove files modified between particular dates?

As in the topic: I would like to remove files in a directory that have been modified in a particular date range. How can I do this ?
4
votes
2answers
2k views

paste selected text: switch right and middle click

Is there a way of choosing between right and middle click for pasting? There are ways of for disabling it, I want to change the behaviour How do I disable middle mouse button click paste?
1
vote
0answers
115 views

Removing terminal username and path information? [duplicate]

Possible Duplicate: Hide current working directory in terminal In the terminal, you are present with the following: <user>@<machine>:<path>$ How can I modify this so ...
0
votes
2answers
127 views

Bash - CP difficulties

cp -r /opt/lampp/htdocs/codeigniter_2.0.2 /opt/lampp/htdocs/test/ That command is making this: /opt/lampp/htdocs/test/codeigniter_2.0.2 and I need only the content of codeigniter_2.0.2 inside test. ...
1
vote
1answer
644 views

Create terminal to command

I have to create several projects with a folder structure, in those folders will be some files. Every time I have to create a project, I have to create a folder, copy folders and files from another ...
6
votes
2answers
864 views

How do I get “ruby” to do what “ruby1.9.1” does?

I want to start off by saying... I really don't need to be using 1.9.2. I understand that you don't ever, ever use Python 3.2, so if the common advice is that I should use 1.8, I'll do that. But don't ...
0
votes
2answers
271 views

APT user guide and where can I find it?

I am trying to get hold of the APT user guide to browse some of the more advanced options other than just apt-get etc. however whenever I type man aptI get a message telling me manpage is not loaded. ...
140
votes
4answers
584k views

How do I rename a directory via the command line?

I have got the directory /home/user/foo and I want to rename it to /home/user/bar. How can I do this in a terminal?
7
votes
2answers
6k views

How to log memory and cpu usage of an application?

Similar to question How to log CPU load?, I would like to log memory of a process. The process I want to log, is killed on a remote server, and I want to find out the CPU load and the memory usage ...
3
votes
2answers
3k views

What's the command for ssh to find files which *.png and download them

I was connected my OpenSSH, but What's the command for ssh to find all files which are *.png and get them at the same time, recursively
1
vote
2answers
244 views

How can I have one screen session per user and set it as the login shell?

How can I set screen so it runs automatically any time a user logs in using a CLI interface? If there is already a screen session running for that user, I would like any new logins to attach to that ...
2
votes
2answers
1k views

What is a quick way to connect two or more pdfs together using the command-line?

I have a few pdf files (e.g., small1.pdf, small2.pdf, small3.pdf) that I'd like to be able to join together to form one larger pdf (e.g., large.pdf). What is a good option for doing this on the ...
11
votes
2answers
2k views

In the terminal, how can I repeat a command multiple times on different files?

In the terminal, I want to use ffmpeg2theora to convert all the .MOV files in a certain directory to .ogv files. However, the following does not work: ffmpeg2theora *.MOV Is there a good way to ...
1
vote
1answer
3k views

what is the yakuake alternative for unity desktop?

is there any alternate for yakuake for the unity desktop, when i log in unless i'm in KDE, i cant open yakuake. sudo apt-get install yakuake returns nothing on unity, while on KDE it installed ...
4
votes
2answers
1k views

Store frequently used terminal commands in a file

Okay, so I want add a command to my Desktop (Or any convenient location), and whenever I run it I want it to clone the HTML5 boilerplate. $ git clone git://github.com/paulirish/html5-boilerplate.git ...
0
votes
0answers
98 views

How to do create an auto mounter? [duplicate]

Possible Duplicate: Additional file system and mount at boot time? I am new to ubuntu and I need some help here. I want to mount the file systems using auto mounter. How to create a new ...
1
vote
3answers
158 views

Accessing other partition from the command-line immediately on startup

My other hard drive partition (i.e., the Windows partition) is located in /media/OS. However, I don't seem to be able to access it from the command line when my machine starts up in Ubuntu. I have to ...