Questions tagged [filename]

188 questions
54
votes
8 answers

How do I enter a file or directory with special characters in its name?

I want to enter the following folder in the terminal: Milano, Torino (Jan)-Compressed How should I write the command cd to enter this directory? Spaces and several other special characters like \, *, ), ( and ? cause problems when I try to use them…
Pomario
  • 2,078
25
votes
5 answers

Why is there 'amd' in the ubuntu iso filename?

If you download iso file with ubuntu you will get something like this: ubuntu-10.04.3-server-amd64.iso ubuntu-11.10-desktop-amd64.iso Every part in the file name is pretty clean to me, except 'amd'. So I have the following questions. Why is there…
bessarabov
  • 2,022
20
votes
2 answers

How do I use filenames that start with a dash "-" as command arguments?

This may be a simple question, but how do I use files starting with "-" with command line programs? For example, I am trying to use pdfgrep on a file named -2013-01-01.pdf but it complains that there are no options defined for 2, 0, 1, 3 and so…
19
votes
2 answers

Why not make .txt file executable instead of .sh file to run scripts?

I was wondering what's the need to put executable commands inside a .sh file to make a single script, since I can do the same by putting the commands inside a .txt file and making it executable using chmod. I'm assuming this can be done with any of…
18
votes
3 answers

Cannot delete/move files with special characters in file name

As you can see below the files have uncommon characters. Deleting them either in the terminal or Dolphin returns the error: No such file or directory Running ls -la on the directory gave me this output: -rw-rw-r-- 1 aalap aalap 0 Nov 14…
17
votes
2 answers

How to name a file to be the very first in Nautilus?

New versions of Nautilus are cool, because they skip nonalphanumeric letters at the beginning of any file name and sort files according to the first alphanumeric letter (if any). But how to name a file in order to sort it before 0? Assume I have a…
aleskva
  • 1,677
  • 3
  • 13
  • 22
17
votes
2 answers

How long can file names be?

How long can be files names and folder names in Ubuntu Linux and what characters are allowed in file name and folder name in Ubuntu Linux?
16
votes
4 answers

What is the maximum length of a file path in Ubuntu?

Having used Windows systems for a long time, I know that at a certain point, an error window can appear when files and folder names become too long. This happened to me when I tried to backup files with SFTP from a server to a folder in (for…
Prototype700
  • 1,120
15
votes
3 answers

Where do files ending with a ~ come from?

Sometimes duplicate filenames occur while working on Ubuntu which differ only by a ~ from the original filenames. I know kate generates backup files and calls them your_file.py.swp. Is this something similar? If yes which program generates them?…
Aufwind
  • 1,833
15
votes
3 answers

How do I copy the contents of every file in a list into another file?

I have a list of filenames inside a file called list_of_files.txt. I want to copy the contents of each file in that list into another file called all_compounds.sdf. How should I do this from the command line?
15
votes
1 answer

How can I increase Ubuntu's 143-byte file name limit for encrypted directories?

In encrypted directories, Ubuntu (at least 15.10) seems to have a file name byte limit of 143 B--much smaller than the ext4 file system's limit of 255 B. Where is this special limit set, why is it set in the first place, and is there a way to…
14
votes
1 answer

Changing first letter of a filename to uppercase

How can one change the first letter of a filename to uppercase using a command line? IS there any command line to do so?
13
votes
3 answers

How to rename/extract files with long names in zip archive

I have a zip which contains files with very long names. If I try to extract on the command line, I get the error "File name too long". If I use the graphical archive manager it will not extract the files and it will not let me rename them. The same…
Terence Eden
  • 1,826
13
votes
5 answers

Get today’s date and use it in filename

Using the command-line, I want to create a log file with today's date in the name (for example, today is 05/17/2011, so the filename would have to be log051711). I know how to create the file (touch filename), but I don't know how to get today's…
Louis B.
  • 245
13
votes
6 answers

Rename multiple files at the same time

I have around 180 files with the same structure: 000-aaaaaaaa.txt. Regular expression for a file name: /^[0-9]{3}\-[a-zA-Z]+$/gi (3 digits + - + letters + .txt). I would like to cut of the numeral part and - in each file name For…
Max Mikhalchuk
  • 133
  • 1
  • 7
1
2 3
12 13