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

learn more… | top users | synonyms (1)

2
votes
3answers
57 views

Sed - string substitution with groupings

I have a largish directory with filenames formatted like Some_Folder-(FOL001)-clean what I'm trying to do is display the pattern between the brackets at the start like FOL001 ...
0
votes
2answers
53 views

Where are netstat's -t and -u flags documented?

I use the following command to find open ports on my servers: $ netstat -ntulp I've probably found that on some random website over the years. However, I cannot find where -t or -u are documented. ...
0
votes
2answers
62 views

How do I prepare Windows NTFS drives on Linux

I'm upgrading my windows desktop hardware and doing a clean OS install. I'm using SystemRescueCD to prepare my old drives for the upgrade. Long story short, a bit of an emergency, I coudln't do this ...
0
votes
1answer
57 views

Why date +3 equals 3?

Yes, this is a minor issue, but I wonder why date +3 outputs 3 Other options like: date -3 raise an error.
0
votes
0answers
17 views

how to invoke fonts dir in ghostscript

I am trying to create a PDF out of a text file with Courier as font and trying to use gswin32c.exe on Windows, but unnable to pass parameters correctly, I think. The gswin32c.exe is the Windows exe of ...
1
vote
1answer
593 views

can't wget rpm oracle on centos linux

Forgotten how I did this last time. Tried the following 2 methods that I thought had worked for me in the past: method #1 $ wget \ ...
4
votes
2answers
258 views

What does `du - hb` do?

With du -bh I think I get the apparent size in human readable format: # du -bh 295K ./test However, I would expect the same from du -hb, but I get something else: # du -hb 301926 ./test I ...
1
vote
1answer
58 views

Why doesn't setuid on /sbin/dhclient work as intended?

I am the only user on my machine, and prefer not to type sudo every time I use dhclient. Therefore, I tried sudo chmod u+s /sbin/dhclient. However, when I subsequently run dhclient wlan0 from a ...
-1
votes
4answers
69 views

Need a command sequence that will move files from one directory to another based on a particular year? [closed]

I'm looking for a sequence of commands (one liner would be ideal) which will identify all the files created in particular year, and move the resulting files to another directory.
3
votes
1answer
51 views

Expanding comma-separated list into separate lines

I have a file with some data in this form: Prefix text: First Name, Second Name, Third-- The prefix differs by line. The number of names varies from one to several. The suffix (-- in the example) ...
2
votes
2answers
51 views

Copying recursively files with spaces

At the moment I have a set of files of the form of: /dir one/a picture.jpg /dir two/some picture.jpg What I want to do is copy and change the end to -fanart.jpg to the filename to: /dir one/a ...
1
vote
4answers
113 views

How to start line with command from output of another command

Sometimes the output of some command include other commands. And I'd like to start that command from output without using a mouse. For example, when command is not installed there is a message with ...
2
votes
3answers
51 views

How to start first command from the list printed by command 'history | grep something'

For example, I have the following output from command: loom@loom:$ history | grep MAKE 219 ../build.sh -DCMAKE_BUILD_TYPE=Debug .. 909 history | grep MAKE How to write a command, that start ...
5
votes
2answers
96 views

How can I parallelise the upload of a directory by FTP?

I need to upload a directory with a rather complicated tree (lots of subdirectories, etc.) by FTP. I am unable to compress this directory, since I do not have any access to the destination apart from ...
1
vote
2answers
63 views

How to asynchronously launch external program from cli and discard its output?

I'm writing a simple desktop initiation script which waits for disk idle, and then launches next external program (like Firefox, Skype or conky) using &, like: ps cax | grep conky > /dev/null ...
8
votes
3answers
139 views

Clear / erase a mistyped password in a terminal

One thing that annoys me using Linux's terminal is when I have to type a invisble password, like when you run ssh the terminal I was wondering if there's a way to clear/erase the invisible password ...
2
votes
0answers
28 views

Can “grub-emu” make any changes to my system?

Can "grub-emu" make any changes to my system? I understand that the command "grub-emu" opens a GRUB emulator. However, since it loads the configuration files used by the "real" GRUB, I am a little ...
1
vote
2answers
184 views

Convert image with imagemagick command line convert tool

I have an image Image.png. How do I use the ImageMagick command convert to make this file into a Image.jpg file with the following requirements: File size is 200~500 kb. Resolution in not less than ...
5
votes
2answers
129 views

Processes do not respond to my signals

I have a strange behavior on my system. When I invoke a command in the shell (bash version 4.2.45(1)-release), say top or cat, the running program (the process) does not respond to Ctrl+C. I even ...
0
votes
4answers
121 views

Can I have the shell ignore the command line sometimes but not always?

For debugging purpose sometimes I access a remote Linux box via VNC. At that time someone else may be working on that same Linux box through VNC and it may happen that I do not have facility to chat ...
0
votes
1answer
40 views

How to escape spaces while using command's output in command line [duplicate]

I want to perform the following command in command line : $ md5sum $(find . -type f) But this would cause problems when it encounter files with spaces in filenames : md5sum: Kaufmann: No such ...
8
votes
3answers
176 views

If you ^Z from a process, it gets “stopped”. How do you switch back in?

I accidentally "stopped" my telnet process. Now I can neither "switch back" into it, nor can I kill it (it won't respond to kill 92929, where 92929 is the processid.) So, my question is, if you have ...
1
vote
1answer
86 views

fg a bg process because you forgot to redirect output to /dev/null

I did Ctrl+Z bg with the intention of disowning next, but I forgot to redirect, now I cant get to my terminal because the scrolling of the output (tarballed a huge directory with verbose set). How do ...
2
votes
1answer
58 views

How do I decrypt a message using openssl's CLI?

I have a message, I know the password and the cipher that was used to encrypt it, but I can't figure out how to ask openssl to decrypt it. I see the cipher in the output from the ciphers command, and ...
2
votes
1answer
54 views

Why when I enter the command “hostname” it returns something other than my computers name?

I am using a macBook Pro I enter: new-host-2:~ Justin$ hostname And it returns: new-host-2.home Why is this when it says in setting/sharing my computers name is "Justin's macbook pro" and computers ...
1
vote
2answers
169 views

How do I grep a file in a smb mount point without using mount or fstab?

I don't have permission to mount a smb share with the mount command or by using /etc/fstab, but I'm able to use the smb protocol in Nautilus (smb://10.1.1.1/share), for example ... s Is it possible to ...
0
votes
1answer
196 views

Delete all 'nohup.out' within a directory recursively

How can I delete all 'nohup.out' files within a directory recursively from my terminal? I'm using CentOS.
2
votes
3answers
110 views

Preserving color output with cut

Using bash interactively I am trying to use cut to prevent the lines from going longer than my terminal width. But when using a command with colorized output all the color gets removed by cut. For ...
0
votes
0answers
48 views

Video tools for creating presentation

I have captured video (with audio) from presentation, slides (just images), and array of times (when slides was listed). Goal is to create presentation video: big slide with small video frame at the ...
3
votes
2answers
85 views

Command prompt switches to >, what does this indicate ?

Sometime I have observed that when I type a character at the command prompt such as the one shown below I get a > . root@ubuntu:/home/heena# \ > I observed even the following works fine: ...
16
votes
9answers
1k views

How to make sure that a command is not interrupted, even if terminal is closed? [duplicate]

In Linux. Say I want to run a command and it takes too long. I just want to ensure it's done. How?
2
votes
1answer
39 views

What is the algorithm that the `iw` command uses for choosing an Access Point for a given Wifi network?

Suppose I am in an area with a lot of Wireless AP's for a particular SSID. If I run the command sudo iw dev wlan0 connect <ESSID> How does iw decide which AP to connect to? It does not seem ...
1
vote
5answers
140 views

Pass the output of previous command to next as an argument

I've a command that outputs data to stdout (command1 -p=aaa -v=bbb -i=4). The output line can have the following value: rate (10%) - name: value - 10Kbps I want to grep that output in order to ...
0
votes
3answers
101 views

How to compact a chmod UNIX command

Is there anyway to compact the follow UNIX command: chmod 755 scriptA.ksh | chmod 755 scriptB.ksh | chmod 755 scriptC.ksh | chmod 755 scriptD.ksh The above command makes every KornShell (ksh) ...
2
votes
1answer
32 views

'which' reports one thing, actual command is another [duplicate]

I am running Ubuntu 12.04, which came with Cmake v 2.8.7. I had need for a more current CMake, so I downloaded the source for 12.8.12.1, built, and installed it per directions. The last step, make ...
0
votes
0answers
20 views

Multiply 2 array index variables shell programming [duplicate]

How do i multiply 2 array index variables given the following foo=(1 2) bar=(0.1 0.2) foobar=$((foo[1]*price[1])) # this is wrong echo "$foobar" Current output : 0 Correct/Expected output : 0.4
6
votes
1answer
73 views

shebang line not working with cr-lf

Why are the shebang parts of the following elementary scripts not working: $ cat hello.sh #! /bin/sh echo Hello $ ./hello.sh bash: ./hello.sh: /bin/sh^M: bad interpreter: No such file or directory $ ...
4
votes
4answers
190 views

How to randomly sample a subset of a file

Is there any Linux command one can use to sample subset of a file? For instance, a file contains one million lines, and we want to randomly sample only one thousand lines from that file. For random ...
3
votes
2answers
326 views

Easy way to paste command line output to paste bin services?

Are there any command line tools on Linux that allow you to post output from commands or text files directly to a sharing service such as pastebin.com?
1
vote
1answer
43 views

Does cron impose some limitations to types of commands and privilege of execution? [duplicate]

I've experienced an issue where some of my scripts run perfectly fine when I call them manually, but these same scripts when called as cron jobs via cron don't seem to work at all. So my question: ...
2
votes
0answers
55 views

How can I compile minix when I make changes in libraries

I am looking for a way to compile minix. The make hdboot command seems to do nothing with the directories under /usr/src/lib. I changed only one .c file in syslib. Do I have to do make world for this ...
2
votes
2answers
89 views

Is it possible to execute the result of wget as a command?

I have 10 VPS machines and all of them have to run this one script that I need to change often, but I don't want to change it at 10 places, every time I need to make a change. I put the script as a ...
1
vote
2answers
314 views

Error Installing “ia32-libs” to run ADB and Fastboot Linux Mint 16 “Petra”

I have been trying to get adb, fastboot, avd and others to work with the latest version of Linux Mint (16 "Petra") I originally got this error when trying to run ADB: ➜ platform-tools ./adb ./adb: ...
0
votes
1answer
110 views

check internet speed from terminal? [duplicate]

How can I get the speed of my internet connection from the terminal? Is there any script or commandline application(s) available? I'm using CentOS 6.5 .
2
votes
1answer
84 views

How to connect to virtual /dev/ttyX from same machines pts terminal?

I want to get output/input from /dev/ttyX console (normally accessible directly using keys ctrl+alt+FNr, where Nr is number of /dev/ttyNr: ctrl+alt+f4 access /dev/tty4). I want to view and control ...
1
vote
0answers
121 views

Console Terminus Font Size in Slackware?

I am running Slackware 14.1 mostly from the command line on a 1366x768 monitor (using a vesa mode appropriate for the resolution, 0x34c if it matters, giving me a screen resolution of 1366x768x32 in ...
1
vote
1answer
74 views

Replace spaces and tabs at the end of the line in all files

I need to replace all unwanted spaces in all files from the current directory and from directories from the current directory (recursive search). I define the unwanted spaces the spaces and tabs that ...
1
vote
2answers
44 views

How to search for available software in repositories though CLI?

I want to be able to search all available software like one would using "Synaptic Package manager" or "Ubuntu Software Center" through Command Line.` I want a better way than pressing Tab after ...
1
vote
1answer
526 views

How to change camera info in Exif using command line

I have analog camera and I give a film to the lab where they scan it, I wanted to upload it to flickr but want to change info about camera. Right now it's NORITSU KOKI QSS-32_33 and I wanted it to be ...
1
vote
1answer
24 views

Mysql import the most recent file from a directory

I have a directory with daily backups of my entire MySQL database. I want to import the most recent backup into the database. I know to import a backup I need to use mysql -u root -ppasswordhere ...