The command-line is the interactive interface to your shell.
3
votes
2answers
103 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 ...
1
vote
2answers
278 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 ...
6
votes
3answers
551 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
104 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
137 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. ...
1
vote
2answers
214 views
Splitting RGB raw file into 3 files, one for each channel?
I need to convert an RGB raw file into 3 files containing each the red, green and blue channel. I have not been able to find a UNIX command line to help me with this task.
0
votes
1answer
366 views
Cannot execute binary file on Mac OS X Lion 10.7.5
I want to execute phylocon on a mac OS X lion but after changing the path and making the file executable, I get the error 'cannot execute binary file'. But the steps that I took to running the command ...
17
votes
5answers
691 views
Difference between “. myscript” and “./myscript” [duplicate]
I am confused by "one only dot - space - shell script name" (like . myshellscript) and "path to shell script" (like ./myshellscript) commands.
What for they are? I noticed the command . myshellscript ...
0
votes
1answer
67 views
NSLookup how to interpret output
Hi can someone help me to understand what this NSLOOKUP command's output
[x]$ nslookup sample.abc.com
Server: 161.43.32.162
Address: 161.43.32.162#53<-- ???
Name: sample.abc.com
...
1
vote
1answer
31 views
Is there a command line tool for validating RDF files?
I am looking for a substitution of the W3C RDF Validator, as it is broken, in addition I want something a bit more automated, such as a command line tool.
I have been using xmllint for checking XML ...
0
votes
1answer
97 views
'ss' command for checking sockets not found
I get an error when I try to execute this command on Red Hat Linux.
$ ss -s
-bash: ss: command not found
It is supposed to be for checking socket statistics. How do I execute this?
2
votes
3answers
187 views
Keeping program GUI front-end and CLI functionality separate
In Linux a lot of programs have a CLI version and a GUI front-end. I read somewhere that this follows the linux philosophy and is good practice. Of course it's true from a developers perspective to ...
1
vote
0answers
140 views
Processing shell script options with awk
I'm looking for way to process shell script arguments that is cleaner and more "self documenting" than getopt/getopts.
It would need to provide...
Full support of long options with or without a ...
13
votes
5answers
606 views
How to display numbers in reverse order using seq(1)?
I have iterate over numbers in various order. I am able to display them in increasing order, even with steps like:
$ seq --separator="," 1 10
1,2,3,4,5,6,7,8,9,10
$ seq --separator="," 1 2 10
...
1
vote
1answer
106 views
Why is my mmv command not overwriting the files?
I have a batch file that, among other things, uses the command mmv to rename some files. The relevant line is like this:
mmv "$BASEDIR/files/*.txt" "$BASEDIR/files/#1.strings"
In essence it works, ...
0
votes
3answers
138 views
How to print the percentage of disk use from `df -hl`
I know that df -hl outputs a list of all my partitions with its size, usage as a percentage, and space available.
If I wanted to output just the size and usage as a percentage of sda2 and sda3, for ...
2
votes
1answer
68 views
Message appears after every command completed
I am very new to Linux. Having said this, I had a friend go on my RHEL machine and he somehow added a few random lines in a file, which will post every time I have completed a command. I am not sure ...
2
votes
2answers
73 views
A command line utility to visualize how fast a file is growing?
I want to grok how fast a particular file is growing.
I could do
watch ls -l file
And deduce this information from the rate of change.
Is there something similar that would directly output the ...
-1
votes
3answers
109 views
Limit find results in SSH
I using a line like this to search for a bunch of files:
find . -name "page.php
The results are hundreds of lines and I can't see it all. (I'm trying to just copy/paste it into excel to analyze ...
0
votes
1answer
91 views
Untar Without Top-Level Directory
I have a tar (websites.tgz) that contain a bunch of Drupal websites that are tarred up starting with 'htdocs'
I need to untar them into
/local/htdocs/web1
/local/htdocs/web2
and so on. But I ...
2
votes
8answers
135 views
grepping dotfiles with -R correctly?
From time to time I need to find a culprit in an unknown dotfile and instead of trying to figure out which package is to be blamed (e.g. xfce4 or thunar?) and what is their naming convention (.app vs ...
3
votes
5answers
167 views
Regex match in CLI
Is there something like a logical for the cli? I want to achieve this
mv -t newfolder *.(png|jpg)
so that alls jpg and png files are moved into newfolder. I know it could be done with
mv -t ...
3
votes
5answers
418 views
Editing RTF files in text mode
I have a bunch of CLI-only computers (I have not bothered to set up a GUI yet). I'm comfortable enough in the CLI to not NEED a GUI for most things. However, as a student, turning in Plain-Text ...
-2
votes
3answers
146 views
Determine whether a particular file is compressed
How to know in Linux whether a particular file is compressed or not using a command?
2
votes
3answers
133 views
Howto recursively create PDF thumnbails on linux command line
I am able to use ImageMagick to create a thumbnail of the first page of a PDF using:
convert -thumbnail x80 95.pdf[0] thumb_95.png
This works fine and generates a thumb_95.png file.
I have tried ...
1
vote
2answers
180 views
Fast tool to generate thumbnail video galleries for command line
I use gframecatcher to generate thumbnail video galleries, i.e. something like this:
However this is a GUI tool and I want to create recursively a gallery for every video in a directory structure, ...
1
vote
1answer
62 views
What does the number mean in a man page? [duplicate]
Possible Duplicate:
What do the numbers in a man page mean?
If I typeman ls, I seeLS(1) in the top left and top right corners of the manpage.
I also see programs on the internet being ...
1
vote
3answers
123 views
How to send many commands to shell and wait for the command behind ends
Hello I have around 20 commands and I have to send all of this to Unix shell, and copy the result, but I don't know how to do it.
I am not sure about what shell I have, because it is a small program ...
1
vote
2answers
139 views
How to use tail -f with grep to show surrounding lines
I would like to see the output in a logfile greped by only one domain but also the following two lines.
Example:
tail -f /var/log/apache2/modsec_audit.log |grep mydomain.de
this shows all lines, ...
3
votes
2answers
90 views
Avoiding temporary files in zsh [duplicate]
Possible Duplicate:
Shell programming, avoiding tempfiles
Say I have the file data.txt, and the command cmd.
cmd takes one argument, a file. Or, you could use stdin.
Now, say data.txt is ...
1
vote
2answers
140 views
“watch” command not found in Cygwin? [duplicate]
Possible Duplicate:
Cygwin has no watch command?
I am in the process of learning Unix commands; I started a few days back. I read a post here and tried to use the watch command, but my ...
3
votes
3answers
626 views
User-friendly command to list all users on Ubuntu system?
Is there a user-friendly command I can use to list users in a console on an Ubuntu system?
When I cat /etc/passwd I get a hard-to-read list of users. It would be nice to see an alphabetized list, ...
1
vote
1answer
89 views
View all user's printing jobs from the command line
I'm running Fedora 17, Gnome (3?), and using bash from terminal. Whenever I run lpstat I only get a list of my jobs, but every time I go to retrieve my jobs from the printer, somebody else is ...
5
votes
4answers
263 views
Compute average file size
I am looking for a handy one-liner for computing the average file size in a directory.
What I want is:
size of all files / number of files in directory
2
votes
1answer
227 views
Help me parse this `find` command
Following command tells me the length of mp4 video files:
find -type f -name "*.mp4" -print0 | \
xargs -0 mplayer -vo dummy -ao dummy -identify 2>/dev/null | \
perl -nle ...
2
votes
2answers
234 views
Averaging output of dstat
I need to average upload and download speed using dstat -n. How can I add all the received and sent data sizes that appear after dstat -n, so that I can add them and find average upload and download ...
0
votes
0answers
140 views
Do you know any good replacement for bluez-simple-agent?
I'm using an old bluez version (3.36) and I need a bluetooth agent. I saw that there is bluez-tools but it requires a higher version of bluez. So, are there any other agents out there? I would preffer ...
2
votes
1answer
98 views
How can I remaster a text-based linux distro?
So I have a Ubuntu minimal install, it is exactly the way I want it when I want to have a fresh install, with the included settings, packages, etc.
It has no desktop, it is completely CLI.
What is ...
3
votes
2answers
147 views
Please explain the -f option in pgrep
man pgrep says the following about -f option:
-f The pattern is normally only matched against the process name.
When -f is set, the full command line is used.
What does it ...
2
votes
4answers
280 views
How do I know what service is running on a particular port in linux?
I am trying to run weblogic server on my linux machine and I am getting the following error :
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to ...
3
votes
1answer
795 views
How to make a Desktop “shortcut” that opens the terminal but under a different directory than the default home?
Objective
I am looking for an easy way to consistently run a terminal that automatically opens to a specific directory. Is there a way to do that without changing the default directory?
Preferably I ...
3
votes
3answers
81 views
Filesize difference of same name folders
Two different folders, have the same name but they have different filesize. Is there any linux command that can compare two folders and tell me the diff in filesize at the same time?
0
votes
2answers
134 views
Remounting HOME
I have my "/home" partition formatted as ext4 and mounted at "dev/sdc1" and occasionally have a strange problem coming up that looks a lot like this bug that I found here.
A little more than half way ...
1
vote
2answers
125 views
Change command name in Linux [duplicate]
Possible Duplicate:
creating abbreviations for commonly used paths
I'm new to the Linux platform. Is there any way to rename the commands available in Linux.
For example, I use the clear ...
3
votes
1answer
165 views
Pausing rsync via bash script?
Is there a way to pause rsync via command line, if it transfers data for over X minutes? I'm working on using it as a backup and would like it to pause every once in a while to prevent the hard disks ...
1
vote
2answers
74 views
How can I see output from a command progressively?
I have fired an ls -1 command that runs and displays a long list of values. When the command ends I can not see the output which is outside the screen vertical length. How can I see those previous ...
0
votes
1answer
49 views
How to find the command line for tinymce
I have installed the packages tinymce and tinymce2. It's an HTML Editor.
sudo apt-get install tinymce tinymce2
but when I launch the command tinymce the system tells me there's no such command. ...
1
vote
2answers
333 views
ALT+F2 doesnt work in Linux Mint Mate
I am trying to install Sublime Text 2 on Linux MINT (Mate) from this tutorial. http://community.linuxmint.com/tutorial/view/907 and I'm stuck on:
Next , to create a menu icon press Alt+F2 and type:
...
3
votes
2answers
93 views
Make copies of a single directory to multiple directories with different names
I'm trying to replicate a single directory (with sub-directories) to a bunch of new directories based on a list. For example I can:
mkdir Fred Barney Thelma Louise Foo Bar
How would I copy a premade ...
1
vote
3answers
106 views
Rerunning the same command with a different parameter
I know that I can run the following command
ls Some{File,Folder}
And it is equivalent to running this:
ls SomeFile SomeFolder
(I also use it a lot for things like mv place_{a,b})
However, I was ...



