I'm trying to delete a file using the console with this command rm ./google-chrome-stable_current_amd64(1).deb  but I get a syntax error. What is wrong with this command?
120813
I asked  how to make cd protect spaces. Tab completion is great, but sometimes you paste the path from the clipboard so this is useful.  The solution breaks with parentheses however. No matter how you try to escape and protect the input it always returns:  bash: syntax error near unexpected token `('   Is there some way to have it also deal with parentheses? What I want is that when I enter this, it works:  cd My path with spaces (and parentheses)
57357
How do I safely delete all files with a specific extension (e.g. .bak) from current directory and all subfolders using one command-line? Simply, I'm afraid to use rm since I used it wrong once and now I need advice.
14499
Recently I accidentally did rm on a set of files and it got me thinking where exactly these files end up?  That is to say, when working with a GUI, deleted files go to the Trash. What's the equivalent for rm and is there a way of undoing an rm command?
2393
I would like to know if there is a command I can issue in a terminal so I do not classically remove (rm) the file, but instead move it to trash (i.e. Nautilus Move to Trash behavior).  In case there is such a command, I would also be interested in knowing what it is.
55829
I have a file whose size is 0 bytes. When I try to remove it an error message appears, saying "Could not find file".  Here is the list of things I've tried to delete the file:   Rebooted Reset folder options Cleaned the registry with CCleaner Using the del command Replacing it with a different file   The dir command gives this information about the file:  25.06.2011 21:06 0 STALKER   File properties:    How can I remove it?
77608
I used one of the following  echo $(stuff) echo `stuff`   (where stuff is e.g. pwd or date or something more complicated).  Then I was told this syntax is wrong, a bad practice, non-elegant, excessive, redundant, overly complicated, a cargo cult programming, noobish, naive etc.  But the command does work, so what exactly is wrong with it?
49738
When I try to run the following command:  echo -e "GET / HTTP/1.1\n\n" | /dev/tcp/74.125.225.19/80   I get the following error message:  bash: /dev/tcp/74.125.225.19/80: No such file or directory   The following command works perfectly, so the problem involves how I'm using /dev/tcp:  echo -e "GET / HTTP/1.1\n\n" | nc 74.125.225.19 80   I'm in Ubuntu 13.04, so the capability should be on my system. What am I doing wrong? What are the rules for using /dev/tcp properly?
81271
I know how to delete all txt file under current directory by rm *.txt. Does anyone know how to delete all files in current directory EXCEPT txt file?
31757
I have a folder which has many files. Some of the data files are labelled 1, 2, 3, ..., 300  I want to remove these data files using the terminal. How do I do this?   I want to do something like   rm some-regular-expression-giving-numbers-from-0--300
116006
As it was instructed in another thread here in the forums, I opened the /usr/share/applications/mimeinfo.cache file to check for correct references. And noticed this doesn't seem to be the problem, there even are 3 optional browsers to use.  x-scheme-handler/http=google-chrome.desktop;chromium-browser.desktop;firefox.desktop; x-scheme-handler/https=google-chrome.desktop;chromium-browser.desktop;firefox.desktop;   I already checked that the programs are correctly named, using the "which" command in the terminal, like this:  $ which google-chrome $ /usr/bin/google-chrome   So google-chrome should be the first option and yet the order to open a url doesn't seem to be arriving to the program, not even to the 2nd or 3rd option for that matter anyways.  Also, the 'Get help online...' command in the 'Help' menu doesn't work. So it is not a problem with the specific document file either.  I'm running Ubuntu 12.04 LTS. If you need to ask for more relevant details, please do. It would be nice to have various opinions on how to solve this, thank you :-)  UPDATE: I ran evince from the terminal as asked. This is what I'm getting when trying to open a link:  /opt/google/chrome/google-chrome: line 42: /opt/google/chrome/chrome: Permission denied /opt/google/chrome/google-chrome: line 42: /opt/google/chrome/chrome: Success   Should I try the fix you suggested even if my error log is different?  UPDATE: Tried @maggotbrain's solution and BINGO, now I can study pdf references faster thanks to you bro!
1552
We have an issue with a folder becoming unwieldy with hundreds of thousands of tiny files.  There are so many files that performing rm -rf returns an error and instead what we need to do is something like:  find /path/to/folder -name "filenamestart*" -type f -exec rm -f {} \;  This works but is very slow and constantly fails from running out of memory.  Is there a better way to do this? Ideally I would like to remove the entire directory without caring about the contents inside it.
54667
I just wanted to ask whether there is any command which would work on common shells (bash, dash, kornshell)? It is supposed to check if the line variable contains any part of the path.  if [[ $line =~ "$PWD"$ ]] ;then
1688
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  staff  1352 Aug 18 14:33 --help ...   How in the world can I delete --help from a CLI?  This issue is something that I come across in different forms on occasion, these files are easy to create, but hard to get rid of.  I have tried using backslash  rm \-\-help   I have tried quotes  rm "--help"   How do I prevent the minus (dash or hyphen) character to be interpreted as an option?
83149
If I have a file which name starting with single or several minus sign, for example --1 it can't be used as a parameter of many commands. Even if I run  cat --1   instead of file content I get unrecognised option error message:  cat: unrecognized option '--1'   Same effect appears when I type  cat "--1" cat '--1' cat \-\-1   nothing works. Files starting with '-' is not illegal in file system, but it is quite hard to work with them in cli and scripts. OK, in case of cat or grep I can use  cat &lt;--1   and this will work, but  rm --1   won't work either and it is quite hard to substitute this command with something else. Very uncomfortable after all. Is there any universal workaround different from not using such file names?   BTW, if name file is single - and all most of commands will understand it as stdin, wouldn't they?   And it would be hard not to use such file names since I can't rename them all in script using mv command either.
38614
I have put the following command into a command block, but it keeps saying invalid command syntax: give @p spawn_egg 1 17 {display:{Name:&quot;help!}}  What do I need to do to fix this?
13643
I need to delete all compiled data:   directories called build, directories called obj, *.so files.   I wrote a command   find \( -name build -o -name obj -o -name *.so \) -exec rm -rf {} \;   that goes through all the directories recursively and deletes all I need.  Why do I have such an output at the end? Maybe I should write a different command.  find: `./3/obj': No such file or directory find: `./3/build': No such file or directory find: `./1/obj': No such file or directory find: `./1/build': No such file or directory find: `./2/obj': No such file or directory find: `./2/build': No such file or directory
100047
I am trying to install Google Chrome,for that I downloaded a google-chrome-stable_current_i386.deb file.  When I try to install using install in terminal   sudo install google-chrome-stable_current_i386.deb  It gives following error.  install: missing destination file operand after ‘google-chrome-stable_current_i386.deb’ Try 'install --help' for more information.