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

learn more… | top users | synonyms (1)

5
votes
1answer
338 views

Example value for a nautilus (file manager) connect to service custom location

I am looking for an example for a nautilus (file manager) connect to service custom location. $ nautilus Activate connection editor: File>Connect To Server...> I am looking for an example ...
6
votes
2answers
768 views

Viewing foreground process using ps

I can see the background process using ps. But Is there a way to view the foreground process? For example, $nohup process1 & then ps -ef | grep "process1" would display the process ...
17
votes
4answers
13k views

Usage of dash (-) in place of a filename

For a command, if using - as an argument in place of a file name will mean STDIN or STDOUT. But in this example, it creates a file with the name -: echo hello > - How can I make - in this ...
11
votes
2answers
745 views

What are the characters printed when Alt+Arrow keys are pressed?

When I press AltUp, A printed to terminal screen. Same thing happened when I pressed AltDown but B is printed instead. Other characters that I realized; AltLeft = D and AltRight = C What is the ...
5
votes
4answers
995 views

recursively chmod

I was trying to chmod folders and files with: find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; But I was wondering: How to do it in one line using find and excluding the ...
4
votes
0answers
73 views

why . and .. are listed when ls -a command executed? [duplicate]

When I execute the ls -a command, all files and folders in that directory listed, as well as . and .. are listed too. Why is that? Are they a file or folder?
5
votes
2answers
213 views

Combining multiple process substitution

Suppose you tried something like this: $ paste ../data/file-{A,B,C}.dat and realize that you want to sort each file (numerically, let's suppose) before pasting. Then, using process substitution, ...
0
votes
0answers
913 views

IBM V7000 scripts for monitoring

Hello (I'm no hard core coder:), I try to develop a script to do some very basic monitoring on an IBM SVC. My goal is to get some information about the nodes and my quroum status and then send ...
3
votes
1answer
201 views

Confirm before exit the command-prompt

I am trying to have a confirmation message every time I type exit command in the command-prompt. To do this, I have tried to use trap in .bashrc file but it seem like trap is not a solution as it run ...
-1
votes
1answer
56 views

delete file with name --help.tgz [duplicate]

I have file with name --help.tgz. I want to delete but don't know how. I tried rm "--help.tgz", rm \-\-help.tgz and it did not work. How can I delete a file with such name?
2
votes
6answers
757 views

sort ls output by users

On Linux, is there a way to sort ls output by users? What I try to achieve is something like this: user_a   file1 user_a   file2 user_b   another_file user_c   this_file user_c ...
0
votes
4answers
132 views

concatenating multiple files with multiple headers

Im trying to concatenate multiple files with multiple headers to have one file with all the information in it for example. File 1: Numbers 1 2 3 Letters A B C File 2: Numbers 4 5 6 Letters D E ...
2
votes
1answer
99 views

zsh - check arguments of a command before executing it

Question: Is there an easy way how I can teach zsh to check the command line before executing it? I know that I can completely wrap a specific program with an extra script, but this is not what I want ...
5
votes
3answers
2k views

Count number of lines of output from previous program

I'm trying to count the number of lines of output a certain program produces. The problem is, the program takes a long time to run, and I want to display the output to the user. Is there a way to ...
1
vote
0answers
109 views

rsstail Not Printing Output

I've installed rsstail 1.8 on my linux box and everything seems to be going smoothly, knock on wood, except for the part where rsstail isn't printing the streams. Running the command, I see that it's ...
4
votes
3answers
270 views

Why should 'Character Classes' be preferred over 'Character Ranges' In Shell (Bash)?

The Linux Command Line (Book - page count 47) says: ... you have to be very careful with them [character ranges] because they will not produce the expected results unless properly configured. For ...
2
votes
1answer
344 views

Alternative to xxd for QNX

I was just introduced to xxd today. See link. I am very familiar with the QNX hd and odcommands, both of which will take input and create a hex dump (or octal dump if you like). See hd and od. What I ...
0
votes
1answer
170 views

finger and who commands usage

I know that the finger command used to display information about local and remote users. finger --> display users log in on local machine, even if remotely. finger @hostname --> display users log in ...
0
votes
1answer
88 views

(e)grep and atomic grouping [comprehension question]

I am trying to understand the correct use of »atomic grouping« a.k.a. »independent subexpressions« a.k.a. »non-backtracking subpattern« [this are the terms I found ...
1
vote
2answers
894 views

cannot mount .img file - “not a directory” error

I try to execute the following command on an ubuntu 12.04 system: sudo mount minix203.img -o loop -t minix /mnt/myminix/ in order to mount an .img file with minix partition; and get the following ...
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 ...
1
vote
1answer
278 views

Safely convert unicode strings to printable characters

I have many HTML files containing mixed unicode strings like \303\243 and printable characters like %s. What I'd like to do is converting the unicode strings into printable characters in a safe way. ...
2
votes
2answers
41 views

Start Repl/CLI in Background and Feed Commands

Lets say the python repl takes a long time to start up, is there a way to start it up in the background so I can create an alias and feed it commands like python-current "command to run".
0
votes
2answers
309 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
58 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
138 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
7k 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
2k 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 ...
10
votes
5answers
1k views

How to find files with 100% NUL characters in their contents?

What is the Linux command-line command that can identify such files? AFAIK the find command (or grep) can only match a specific string inside the text file. But I want to match whole contents, i.e. ...
0
votes
1answer
114 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
38 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 ...
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 ...
1
vote
2answers
157 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 ...
1
vote
2answers
168 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 ...
7
votes
3answers
6k views

Command Line Tool for monitoring Java Heap

Is there any command line tool for monitoring the heap size usage of Java in CentOS?
2
votes
2answers
2k 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 ...
2
votes
5answers
206 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 ...
20
votes
5answers
14k views

Split pages in pdf

I have a scanned pdf file which has scanned two pages on one virtual page (page in pdf file). The resolution is with good quality. The problem is I have to zoom when reading and drag from left to the ...
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
226 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 ...
10
votes
2answers
555 views

Highlight the three last updated files in ls output

Is there any way to overload or wrap the ls command so that it will highlight / underline / otherwise make obvious the last three modified files? I know that I can simply ls -rtl to order by reverse ...
7
votes
6answers
1k views

Colourful terminal or console?

I love colors in my console, and I wonder if there is any way to get a terminal (I guess only a software is able to do that) printing almost everything in colors. Of course there is the --color=auto ...
2
votes
2answers
215 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), ...
12
votes
4answers
60k views

How to determine Linux kernel architecture?

uname -m gives i686 and uname -m gives i686 i386 output in Red Hat Enterprise Linux Server release 5.4 (Tikanga) machine. I need to install Oracle Database 10g Release 2 on that machine. So, how can I ...
18
votes
5answers
4k views

Command line friendly spreadsheets

Does such a thing exist? Text-based spreadsheets that display well in a CLI environment. I'm aware that I could cat foobar.csvand do as I please, but it isn't particularly practical or attractive. I ...
6
votes
3answers
4k 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 ...
5
votes
3answers
9k views

How do I periodically run a command with very short intervall and get the return?

i need to call a specific command in an interval of about 5 sec. How would I setup a daemon/process running in the background or something similiar to do that? I looked at cronjobs, but the minimum ...
1
vote
2answers
105 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 ...
4
votes
1answer
279 views

Is there any way to have console (rogue) mode programs take over only part of the terminal screen?

I like the command line because it preserves the context of what I'm doing. But if I use a "rogue" mode program like vi or less, the whole screen gets taken over. Is a middle way possible, where the ...
8
votes
5answers
236 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 ...