The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
311 views

Does SerNet compile Samba 4 with CUPS support? (How to tell in general?)

I have SerNet Samba 4.0.9 installed on CentOS 6.4. How can I tell if it was compiled with CUPS support?
13
votes
1answer
16k views

How can I execute local script on remote machine and include arguments?

I have written a script that runs fine when executed locally: ./sysMole -time Aug 18 18 The arguments "-time", "Aug", "18", and "18" are successfully passed on to the script. Now, this script is ...
3
votes
1answer
220 views

mount --no-canonicalize?

Neither man nor info page provide more information on this than: mount --no-canonicalize Don't canonicalize paths. The mount command canonicalizes all paths (from command line or fstab) ...
1
vote
1answer
167 views

useradd --no-log-init [comprehension question]

TLDR: How is useradd --no-log-init actually used [in GNU/Linux [Debian]? I read the command's man and info page about this option as: »user will not be listed in the lastlog and faillog files ...
2
votes
1answer
317 views

difference between useradd -b and useradd -d

Can somebody please explain to me the exact differences between useradd -b and useradd -d in [Debian] Linux? Both seem to work quite similar to me, but then I spot differences that confuse me.
0
votes
1answer
131 views

wc - setting a terminating character

I've got that far: wc --files0-from=FILE lets one get the word count of a list of files. Each entry in this list mus be terminated with an ASCII NUL character. Question: A way to set a terminating ...
4
votes
2answers
3k views

syntax of ls --hide= and ls --ignore=

ls --hide and ls --ignore provides the possibility leave out files defined through regular expressions set after the --ignore= part. The latter makes sure that this option isn't turned off via -a, -A. ...
0
votes
1answer
657 views

How to autologin with XDM?

How to autologin a specified user with xdm? I know it's possible with other display managers but I wasn't able to figure out how xdm has to be configured to autologin a certain user. Is it possible? ...
30
votes
7answers
4k views

why does ls -d also list files, and where is it documented?

when specifying ls --directory a* it should list only directories starting with a* BUT it lists files AND directories starting with a Questions: where might I find some documentation on this, ...
3
votes
1answer
253 views

Understanding grep --label=

I am looking for an explanation how grep --label=LABEL works: Maybe somebody can give me an example [or two] on what --label= is for. I understand what grep and zgrep are supposed to do – the ...
1
vote
2answers
97 views

mount defaults and various filesystems

I read on the man page defaults Use default options: rw, suid, dev, exec, auto, nouser, async, and relatime. Do the options set depend on a mounted filesystem or not?
1
vote
1answer
581 views

mplayer -msglevel all=-1 doesn't make it completely silent!

I'm trying to open mplayer to play video without any terminal output using this: mplayer -msglevel all=-1 /path/to/video also: mplayer -really-quiet /path/to/video but it doesn't make it ...
2
votes
1answer
264 views

Simpler processing of shell script options

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 ...
8
votes
3answers
7k views

getopt, getopts or manual parsing - what to use when I want to support both short and long options?

Currently I'm writing a Bash script which has the following requirements: it should run on a wide variety of Unix/Linux platforms it should support both short and (GNU) long options I know that ...
5
votes
1answer
851 views

In the usage string of my custom shell script, shall I also display --help and --version?

I'm currently developing a shell script, called up, which shows a usage string on the commandline when called with --help. The output looks like this: $ up --help usage: up [-n ...
20
votes
2answers
640 views

What is `--` called?

Recently I got to know of -- that is double-hyphen which is used to tell a command that the option list has ended and what follows should not be considered as a option. So, grep -- 'search_word' * ...
4
votes
2answers
9k views

How can I detect that no options were passed with getopts?

I have this code - #getoptDemo.sh usage() { echo "usage: <command> options:<w|l|h>" } while getopts wlh: option do case $option in (w) name='1';; ...
1
vote
1answer
352 views

What is the canonical way to implement order independent options in bash scripts? [duplicate]

Possible Duplicate: How do I handle switches in a shell script? Most common shell commands allow the user to specify options in any random order. Positional Parameters like $1 as commonly ...
0
votes
1answer
389 views

How does “options” in shell scripting work?

I found some code in one of the answers here and accommodated it to my needs but now I have two questions: Q1: how can I display the options text after the code in case statement finishes? So the ...
5
votes
1answer
240 views

Handling filenames that contains a hyphen, within a script

I have few files that was incorrectly encoded, during extraction, file names now become something similar to -a -b, Now I'm trying to fix this issue with: convmv -f ENCODING -t utf8 --notest * But ...
3
votes
2answers
666 views

Is it possible to disable verbose in the middle of running?

I am running a program fls (from the Sleuth Kit) with option -v for verbose mode. However it takes too long, and the program is still running since yesterday. I guess it will run faster without ...
4
votes
1answer
2k views

What does Linux's “nointremap” option do?

Ubuntu 12.10 alpha 2 works perfectly on my new 11" 2012 Macbook Air, but only when I boot with the "nointremap" option. Supposedly this is not good to use as a permanent solution. What exactly does ...
2
votes
2answers
635 views

How to change a firefox option on a quick way (via shortcuts, command line,..)?

In Firefox we have two options at Firefox->Preferences->Preferences->Fonts and colors->Colors menu, Use system colors and Sites can use other colors. I would like keep the first one ...
6
votes
3answers
681 views

What's the purpose of `rm -P`?

I was reading the man page for rm when I came across this option: -P Overwrite regular files before deleting them. Files are overwritten three times, first with the byte pattern 0xff, then ...
5
votes
2answers
3k views

Download list of files if they don't already exist

If I have a list of URLs separated by \n, are there any options I can pass to wget to download all the URLs and save them to the current directory, but only if the files don't already exist?
2
votes
2answers
1k views

List of available command options?

I'm currently setting up my first web server without a control panel and so far things are going pretty good! I was just wondering if anyone could direct me to somewhere that explains all of the ...
5
votes
3answers
2k views

Remove many many many files from a folder

I have a folder with 137795 files in it. I need to delete all of them. When I run rm * I get -bash: /bin/rm: Argument list too long. How do I get past this error?
4
votes
1answer
141 views

If I'm logged in as root, how do I restart mysql or apache with options?

I know the commands to restart/stop/start, but when I try to pass options it doesn't seem to work! CENTOS 6, MySQL 5.14 service mysql restart service httpd restart Then I tried this: ...
3
votes
2answers
698 views

Getopts option processing, Is it possible to add a non hyphenated [FILE]?

I'm using getopts for all of my scripts that require advanced option parsing, and It's worked great with dash. I'm familiar with the standard basic getopts usage, consisting of [-x] and [-x OPTION]. ...
2
votes
2answers
1k views

How to find every symbolic link on a server?

I need to find every symbolic link on the server. The version is AIX 6.1. man find says -L Follow symbolic links But find -L is not a proper usage. Usage: find [-H | -L] Path-list ...
2
votes
1answer
1k views

Altering the default boot option on CentOS

I recently installed a copy of CentOS onto my main hard drive (I now have Windows 7 and CentOS). Whilst installing CentOS, I accidentally set it to be the main boot option, so when I start my PC I ...
16
votes
2answers
13k views

tar cvf or tar -cvf ?

I have learned to use tar without '-' for options, like tar cvfz dir.tar.gz Directory/ but I recently came accross the slightly different tar -czvf syntax (I think the 'f' must be the last option in ...
1
vote
4answers
351 views

What is this Bash line supposed to mean?

find . -name "*.html" -exec grep -l somethingtobefound {} \; I was just wondering what the keywords "-name" "-exec" "-l" "{}" "\" and ";" were supposed to signify. Also, I commonly see ...
5
votes
4answers
504 views

How can I create a empty file whose name begins with a dash? [duplicate]

How can we create a empty file with the unix name -stuff. It means the name start with -. I tried with touch -stuff but it didn't work.
22
votes
4answers
4k views

Single dashes `-` for single-character options, but double dashes `--` for words?

Where did the convention of using single dashes for letters and doubles dashes for words come from and why is continued to be used? For example if I type in ls --help, you see: -a, --all ...
9
votes
4answers
6k views

How do I handle switches in a shell script?

Are there some built-in tools that will recognize -x and --xxxx as switches, and not arguments, or do you have to go through all the input variables, test for dashes, and then parse the arguments ...
3
votes
1answer
3k views

How to run a specified codeblock with getopts when no options or arguments are supplied?

So I am writing a script that mixes options with arguments with options that don't. From research I have found that getopts is the best way to do this, and so far it has been simple to figure out and ...
5
votes
2answers
80 views

Handling an option-like filename in the shell [duplicate]

Possible Duplicate: How do I delete a file whose name begins with "--"? Due to mismatched switches when I was trying to run a command, I have a log file named -w in a directory. I ...
2
votes
1answer
480 views

What is the `less` command line option to page to the next file at the end of the current one?

I'm sure there used to be an option in less which allowed you to page onto the next file after you reached the end of the current file, so you could just keep *space*ing through a bunch of short files ...
3
votes
1answer
2k views

xmessage over ssh

The following command prints a message over ssh : xmessage Message -display :0 & How does it work? there is no -display option in xmessage's man page.
3
votes
2answers
4k views

How to catch optioned and non optioned arguments correctly?

I want to write a shell script which will take some arguments with some options and print that arguments. Suppose the name of that script is abc.ksh. Usage of that script is - ./abc.ksh -[a ...
11
votes
3answers
2k views

Is there a 'rc' configuration file for grep/egrep? (~/.egreprc?)

I usually do some grep when developing, and there are some extensions that I always don't want to look for (like *.pyc). Is it possible to create a ~/.egreprc or something like that, and put some ...
10
votes
6answers
6k views

Compiling GNU/Linux with -O3 optimization

It's said that compiling GNU tools and Linux kernel with -O3 gcc optimization option will produce weird and funky bugs. Is it true? Has anyone tried it or is it just a hoax?
50
votes
8answers
11k views

How do I delete a file whose name begins with “-” (hyphen a.k.a. dash or minus)?

How do you remove a file whose filename begins with a dash (hyphen or minus) -? I'm ssh'd into a remote OSX server and I have this file in my directory: tohru:~ $ ls -l total 8 -rw-r--r-- 1 me ...
4
votes
2answers
2k views

what is commit=0 for ext4? does mdadm not support it?

I see this in my dmesg log EXT4-fs (md1): re-mounted. Opts: commit=0 EXT4-fs (md2): re-mounted. Opts: commit=0 EXT4-fs (md3): re-mounted. Opts: commit=0 I think that means that dealloc is disabled? ...