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

learn more… | top users | synonyms (1)

0
votes
2answers
1k views

what is “an invisible whitespace character that takes up space”

One can look up Unicode Characters with Regular Expressions. On Jan Goyvaerts website I found a RegExp whose meaning I don't understand : \p{Zs} or \p{Space_Separator}: a whitespace character that ...
0
votes
2answers
460 views

'df' command doesn't list /home directory

In the book I am reading, the output of df command is shown like this: Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 15115452 5012392 9949716 34% / /dev/sda5 59631908 ...
0
votes
1answer
65 views

Syntax of DISPLAY=:0 unity --replace or DISPLAY=:0 compiz --replace

Why don't the commands have a & between the setting of DISPLAY and running unity or compiz. I understand that both work (re-starting unity or compiz), but fail to see why are they the way they ...
0
votes
0answers
159 views

Rsync seems to back up files that haven't been opened or changed

I have started using rsync to back some data on my mac to an external HD. It works really well, but I have noticed something odd. Every time I run the command, I get a list of files that haven't been ...
3
votes
2answers
9k views

what is pts/0 and (:0.0) in linux by type who am i

When I type the command: [root@degeneration Desktop]# who am i root pts/0 2013-04-12 15:08 (:0.0) What is pts/0 and what is meant by (:0.0)?
1
vote
1answer
3k views

Reading from USB serial port under Cygwin

I am actually using Cygwin, but it is my understanding that it responds to Unix commands so hopefully I am in the correct place. I have an Arduino hooked up via USB to my LapTop for data reading. I ...
0
votes
1answer
133 views

How to get the Installation path of binary and logic file in Daemon in Arch Linux

I want to know that if i install a daemon service in Arch Linux, then what will be the path of the files that will get install. also which files will be install where.
0
votes
2answers
40 views

can't update with this error messg

I got this message: not enough free disk space.... The upgrade needs a total of 31.8 M free space on disk '/boot'. Please free at least an additional 31.8 M of disk space on '/boot'. Empty ...
4
votes
2answers
2k views

greedy and lazy regular expressions (comprehension question)

I am teaching myself regular expressions, and I got stuck at »greedy« vs. »lazy« repeatings. What I found out so far is that »greedy« means that the RegExp ...
0
votes
1answer
139 views

from a laptop with CentOS 6.3 what is the command line to talk mysql server on my pc?

I have CentOS 6.3 running on my laptop which is already connected to the net. What is the command line to talk to MySQL server on my PC? Both devices are connected via my router and they can talk ...
1
vote
2answers
182 views

Can't remove same folder name twice

I have a folder called - bin , then I remove it by rm bin , re-create it and when I want to remove it again by rm bin the shell promts - /bin/mv: cannot move `bin/' to ...
2
votes
2answers
3k views

Sending a file as the body of an email

I want a utility that does something like this: email --subject="xxx" --body=body.txt --to=to_address@hostname.com (using pre-configured sender information for e.g. gmail). Note that body.txt is ...
1
vote
2answers
192 views

How to strip directory structure with command line (or script)

I have a large collection of files packed into a two-level directory structure with many, many, many folders. In other words, I have a folder with a great many subfolders in it. There are no ...
2
votes
5answers
272 views

Create and open file with one command?

I want to create a text file and open it in a text editor with a single command. I know touch file.txt creates a file and open file.txt opens the file, but is there a way to do this with a single ...
0
votes
3answers
3k views

Regular Expression for finding double characters in Bash

I am looking for a regular expression that finds all occurences of double characters in a text, a listing, etc. on the command line (Bash). Main Question: Is there a simple way to look for sequences ...
8
votes
3answers
1k views

How do you send command line apps directly to the background?

I already know that pressing ctrl+z stops the app, then I can send the app to background with the bg command, but that means there is a brief preiod of time that the app is stopped. How do I send the ...
3
votes
4answers
1k views

Transparently run wine programs

When I want to run a wine program I have to type e.g. $ wine ~/.wine/drive_c/Program\ Files/TextAloud/TextAloudMP3.exe Would it be possible to run directly TextAloudMP3? I mean not only from command ...
13
votes
6answers
1k views

Can a Linux command have capital letter(s)?

Can a Linux command have capital letter(s)? I know it's supported but i want to be sure if it's a "problem" or considered "not a good thing"?
1
vote
1answer
281 views

Unix Date command not working for few servers

I am trying to execute date command in unix server for yesterday. The commands tried are : date --date ="1 day ago" date --date ="1 days ago" date --date ="yesterday date --date ="-1 day" These ...
7
votes
6answers
9k views

Getting cpu usage same every time.

When I execute following command to get cpu usage , I get nice + user cpu usage. top -b -n1 | grep "Cpu(s)" | awk '{print $2 + $4}' Output: 14.5 Here I am getting problem is that the output ...
2
votes
2answers
251 views

How to target multiple selections with xclip

When copying text to the clipboard, xclip provides several selection targets: -selection specify which X selection to use, options are: "primary" to use XA_PRIMARY (default), ...
1
vote
2answers
778 views

What is the difference between the whatis and apropos commands?

CentOS 6.3 / RHEL 6.3 Can someone please explain the difference between the whatis command and the apropos command? I noticed that both appear to be installed by default and I'm not sure what the ...
6
votes
3answers
7k views

How do I remove all sub-directories from within a directory?

This question is kind of a phase II to the first question I posted at here I have a directory that contains a bunch of sub-directories, .zip files, and other random files not contained within a ...
1
vote
2answers
111 views

Cross Unix Command Reference

I am looking for a website that contains a reference between how to do things on the command line in different unix OSs. I have seen such site before, I am just unable to find it. I know such site ...
8
votes
5answers
245 views

store command before pressing ctrl+c, revive afterwards [duplicate]

Sometimes I type a lengthy command in my command prompt and then notice that I need to check something before actually pressing return and executing the command. I press ctrl+c, execute the new ...
8
votes
1answer
10k views

command to zip multiple directories into individual zip files

I have a single directory that contains dozens of directories inside of it. I'm new to command line and I'm struggling to come up with a command that will zip each sub-directory into a unique ...
1
vote
2answers
792 views

Executable located in location A how to run it in location B?

So, I've an executable in my debian server and this executable located in /home/human/ExecuteIt, still i cant figure it out how to run my executable in another location. In my case it is ...
2
votes
1answer
228 views

Command to list contents if directory, or do output contents if file?

Is there any command to list the contents if passed a directory, but output the contents if it's a file? For example, often when I am navigating the directory structure I will start typing into the ...
4
votes
1answer
4k views

Better way to copy multiple directories to new directory

Is there a better way on the command line to essentially accomplish the following but with a single command cp -r css/ ar/ cp -r images/ ar/ cp -r js/ ar/ cp -r backups/ ar/ I've just been ...
1
vote
1answer
396 views

Slackware Console Resolution when Dual Booting with Another Distro's GRUB2?

I am tweaking my new Linux Installs on a new home-built machine. I installed Linux Mint 14 first followed by Slackware 14 and Arch Linux on separate partitions. I don't think it matters, but the ...
2
votes
1answer
105 views

Chain commands with Control + C interrupt

I am trying to execute a program which loops indefinitely, and so must be forcibly interrupted. After executing the program, I want to delete it. I can do it in several steps: ./MyProg Control + C ...
4
votes
2answers
94 views

Where does the yanked text on commadline get stored?

When you delete characters on the command line using readline commands (e.g. Ctrl-U, you can paste using Ctrl-y, but where does it get stored? It does not seem to use X11 clipboard at all.
0
votes
2answers
902 views

access a command line via a web browser

2 questions: Question 1 My job blocks ssh which means that I cannot ssh to my home server. However, they do allow https out. Is there a package out there for ubuntu that will allow me to connect to ...
1
vote
2answers
83 views

Configure bash to execute command with last argument when no argument was provided

I would like to configure bash so that when I execute command (preferably from a list of commands, not any command) without an argument, it takes the argument of previous command. So, for example I ...
4
votes
4answers
10k views

Move all files with a certain extension from multiple subdirectories into one directory

Suppose I have a bunch of zip files in several directories: Fol1/Fol2 Fol3 Fol4/Fol5 And I want to move them all to a common base folder. How would I do this?
2
votes
1answer
2k views

How to monitor other nodes to get RSSI?

I need to measure RSSI between two peers of nodes in same network. If I have these two information: SSID for their network. IP for the target node to get the RSSI regarding it. So I found this ...
5
votes
1answer
4k views

How to get UUID for a USB drive?

I want to mount my USB to a mount point which holds the UUID name. But I don't know how to express this in a command line! Can someone help me how to do it? I have searched and found that I have to ...
2
votes
1answer
230 views

Grepping number in a file

I have this command $ cut -f2,3 AIS2F1 | grep [2-9][0-9]* | cut -f1 So my second and third fields are something like this Ben 434 Me 12 you 56 So, I thought that the logic should be to cut ...
2
votes
3answers
2k views

Why does Firefox refuse to die despite killing it with pkill -9?

I am issuing the following command to kill Firefox on my Red Hat Linux box: [subhrcho@slc04lyo ~]$ pkill -9 -f firefox [subhrcho@slc04lyo ~]$ However, when I try to invoke Firefox through ...
4
votes
2answers
146 views

printing .cpp file from command line using emacs

The goal is to print a set of *.cpp files on a network printer, but... in a way that the (color) printer prints the files like they appear in the c++ editor including the colors and highlighting. And ...
1
vote
1answer
42 views

Can one move a relpath in one command?

This question is similar to one I asked recently, but the answers to that question, for the most part, do not extend to this one, AFAICT. The main difference between the two questions is that the ...
2
votes
2answers
706 views

Can one copy a relpath in one command?

I find myself doing this often enough that I wonder if there's a standard Unix way to do it: % mkdir -p /TARGETDIR/relative/path/to % cp ./relative/path/to/somefile /TARGETDIR/relative/path/to In ...
19
votes
6answers
649 views

Why is aliasing over standard commands not recommended?

For example, a common alias I've seen in the ~/.bashrc file (or equivalents) is alias rm='rm -i' However, I've seen people recommend against this because the alias might not exist on another ...
0
votes
0answers
432 views

running matlab command line in screen — can't type after reattaching

I'm logging in via ssh to a more powerful computer, on this I start a screen session with screen -S mine and then open a matlab command line via matlab -nodesktop -nodplash and then run within matlab ...
5
votes
8answers
2k views

Run a command on all subfolders

If you have a series of subfolders (like from a to z) and want to run a command on each one of them (like rm *.pdf or ls *.pdf), how do you do that? The "manual" approach would be cd a, rm *.pdf, or ...
3
votes
2answers
277 views

Digging through huge gziped log files

From time to time I need to dig through huge log files (several GB unpacked) to debug a specific error. Now, vim is OK for browsing through the file, but when I need to find something in the file ...
7
votes
2answers
26k views

How to display open file descriptors but not using lsof command

Hi I have read Here that lsof is not an accurate way of getting the number of File Descriptors that are currently open. He recommended to use this command instead cat /proc/sys/fs/file-nr While ...
14
votes
3answers
10k views

How to cause kernel panic with a single command?

Is it possible to cause a kernel panic with a single command line? What would be the most straightforward such command for a sudoing user and what would it be for a regular user, if any? Scenarios ...
4
votes
3answers
433 views

Is a command's stdout to the terminal being logged?

I am interested in learning whether a command's output to the terminal is logged somewhere. Since that can be a bit too generic, what about cat (and ccat) in specific? If I use cat on a file, will ...
1
vote
3answers
170 views

Is there a linux distro, that is not installed, but runs from the browser?

I remember hearing about something similar. My constraints are: It may not be installed on the machine It may not be booted via USB or LiveCD What I need, in decreasing order of priority: 0. ...