New answers tagged

0

I know this has been answered already, but I always use mc - Midnight Commander to delete awkward files that I am too afraid in attempting to delete. It is a "GUI" like interface where you simply highlight the file you want to delete, and delete it.


3

In addition to frostschutz's double quotes method, and Andy's simple quote one, there are also the shorter: rm -r \~ and the relative path one: rm -rf ./~


5

In theory yes. In practice usually also yes. If you're calling a shell script or alias that does something weird, then maybe no. You could use echo to see what a particular command would be expanded to by the shell: $ echo rm -R ~ rm -R /home/frostschutz $ echo rm -R "~" rm -R ~ Note that echo removes the "" so you should not copy-paste what it prints. ...


5

As Kalvin Lee mentioned, you can cd to the directory and remove its contents, then use rmdir to remove the directory. I recommend this over the rm -R approach because you're less likely to fat-finger the command and blow away your home directory. Generally, you can put things that you don't want the shell to expand in single quotes. This will remove an ...


5

Yes, it's because of the space character. Use cd 'VirtualBox VMs' or cd VirtualBox\ VMs


4

The feature you are looking for is there. You are just missing a * in your example. Type cat file000[1-3]*ESC* and it should work. I think this is the case because the readline function insert-completions (which is bound to ESC*) will not expand the glob pattern if it does not match any files. And without the last * it does not match the files. You can read ...


3

They are valid and you can use them but yes, there are disadvantages. A period is often used in regular expressions to represent a single character. A period in filenames is often used as the standard separator between filename and extensions. A period at the start of a filename is used to indicate configuration and/or hidden files. For these reasons ...


2

Periods by themselves have no meaning, but what follows the period may have meaning to programs that look at the file suffix. For that, look at /etc/mailcap and /etc/mime.types Some implementations of ls can sort by suffix as well, e.g. ls -lX for GNU coreutils.


0

I met same problem and I want to reuse the same filename whatever server side gives, in your case you may get the filename by basename ➸ basename 'http://mysite.com/myfile.jpg' myfile.jpg then you can write a helper bash function like: ➸ function download { name="$(basename $1)"; curl "$1" > "$name"; } ➸ download 'http://mysite.com/myfile.jpg' but ...



Top 50 recent answers are included