Unix tools: what if a file is named minus something?

Let’s learn unix tools: what if a file is named minus something. The most accurate or helpful solution is served by Super User.

There are ten answers to this question.

Best solution

Unix tools: what if a file is named minus something?

I'm always wondering: most GNU/Unix tools take options in the form "minus something", sometimes followed by an argument. What if you got a file named minus something? $ ls -f $ rm -f $ ls -f $ mv -f abc mv: missing destination file operand after `abc' Try `mv --help' for more information. $ cat -f cat: invalid option -- 'f' Try `cat --help' for more information. or $ ls -ohello.c $ gcc -ohello -ohello.c gcc: fatal error: no input files compilation terminated. This is just out of curiosity...

Answer:

To remove a file named -x, use rm -- -x (-- means end of options) or rm ./-x.

Read more

eepp at Super User Mark as irrelevant Undo

Other solutions

Name unix utility to segment larger file in byte length chunks with output files named aa ab or aaa..?

I am looking for the name of the unix utility to segment a larger file in byte length chunks (10k, 100k, etc.) with output files named something on the order of aa, ab,... or aaa, aab,... I've used it in the recent past but cannot recall what the name...

Answer:

I believe you are referring to 'split'

Read more

Unix_Question at Yahoo! Answers Mark as irrelevant Undo

How do you execute a file in Unix? I was told #!/bin/sh, but where is this used.?

I know in perl you just put .pl (filename.pl) at the end of the file you named, and to run the that you just type perl filename.pl. In unix I being told its something like #!/bin/sh? Where does this go? Does this mean I make the file with #!/bin/sh in...

Answer:

that is accessed with the shell in UNIX. Here is some basic commands: cal This command will print a...

Read more

Tim4545 at Yahoo! Answers Mark as irrelevant Undo

How do I write and distribute a Unix command line tool in Python?

I know how to write a python program which takes command line arguments and does something with them. And I know how to use python setup tools to create a python installer. But are there any good tutorials that will take me (without using setup tools...

Answer:

If you're going the .deb route, you should look for a tutorial on how to create a .deb. Dependency checks...

Read more

Akbar S. Ahmed at Quora Mark as irrelevant Undo

UNIX: Error Message. Help.?

Distance.java:8: class distanceFormula is public, should be declared in a file named Something.java public class Something{

Answer:

asdas

Read more

Xz at Yahoo! Answers Mark as irrelevant Undo

help me describe the IT worker that I need, then evaluate the candidates

At my Pretty Big company, I run a large Unix-based system that does Something Important, and we need to find someone to help me, and ultimately to take over running of the system. My two challenges right now are A) how to describe what I need to the...

Answer:

Yeah, this is a junior with communications skills (bedside manner) and command line proficiency.

Read more

intermod at Ask.Metafilter.Com Mark as irrelevant Undo

Is The Dark Knight Rises most overrated over-praised movie ever?

1.Pacing of the story  was horrible. It felt like watching a 3-hour long trailer where dialogue  is delivered at a snap pace and given no time to sink in. 2. Despite this fast pace to get all this story crammed in there are  at least a good 5-10 minutes...

Answer:

I got to 30 of the 99 problems with the film. And then it dawned on me... its a movie! Im surprised...

Read more

Ahmad Ismail at Quora Mark as irrelevant Undo

Help me pick the best business producitivity management tool(s) for my consulting practice! (Not Daylite)

Hello MeFi peoples, I am trying to find the tool or tools to run my sustainable business consulting practice, which I started in August, and I've been going a bit nuts with too many choices. I've been looking all over, and am getting near hits, but all...

Answer:

ActiveCollab is an open-source, self-hosted basecamp clone, except without 37Signals standing there...

Read more

healthyliving at Ask.Metafilter.Com Mark as irrelevant Undo

Thunderbird email backup check- since I have to delete before restoring!

I'm returning a work laptop and want to delete a personal email profile, including all the emails. First I want to back it up. Since I can't restore anywhere first, I want to be completely certain I have something I can restore. I have two profiles:...

Answer:

Found it myself: "Mail is stored by default within the profile. If you re-configured Thunderbird...

Read more

lockedroomguy at Ask.Metafilter.Com Mark as irrelevant Undo

View Source options in IE 6 Win XP Pro sp1

I am interested to find a lightweight View Source editor that I can invoke from IE using the View --> Source command, or the right-click context menu. Constraints: :: must have syntax coloring :: syntax coloring must be configurable :: must be lightweight...

Answer:

Hello, font9a: This question reminds me a problem I had some time ago, so my answer is based on my own...

Read more

font9a-ga at Google Answers Mark as irrelevant Undo

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.