Skip to main content

Questions tagged [filename]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
53 votes
8 answers
147k views

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 \, *...
Pomario's user avatar
  • 2,038
25 votes
5 answers
13k views

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'. ...
bessarabov's user avatar
  • 2,002
20 votes
2 answers
1k views

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 ...
Kristoffer's user avatar
19 votes
2 answers
7k views

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 ...
Abhik Bhattacharjee's user avatar
18 votes
3 answers
8k views

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 ...
karjedavpalaa's user avatar
17 votes
2 answers
30k views

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?
Gaurav Agarwal's user avatar
17 votes
2 answers
2k views

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 ...
aleskva's user avatar
  • 1,667
15 votes
3 answers
2k views

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 ...
Ramita Rajaa's user avatar
15 votes
3 answers
7k views

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 ...
Aufwind's user avatar
  • 1,823
15 votes
1 answer
7k views

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 ...
BipedalShark's user avatar
13 votes
6 answers
8k views

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 ...
Max Mikhalchuk's user avatar
13 votes
4 answers
37k views

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 ...
Prototype700's user avatar
13 votes
3 answers
15k views

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 ...
Terence Eden's user avatar
  • 1,796
13 votes
1 answer
7k views

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?
harsh vardhan's user avatar
12 votes
5 answers
33k views

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 ...
Louis B.'s user avatar
  • 235
11 votes
6 answers
28k views

How to mass add file extension?

My photo importer moved files from my camera and renamed them, but I forgot to specify that it should keep the file extension. So I have several folders with hundreds of JPG & AVI files that are ...
Torben Gundtofte-Bruun's user avatar
10 votes
2 answers
1k views

Nautilus - How to apply Zoom on the filenames? Not just on the thumbnails

I'm looking to edit the way for nautilus to handle the zoom. Since Ubuntu 13.04, when you use the zoom in nautilus it only changes the thumbnails/icons size, and the filename text stay the same. Is ...
Romain Fluttaz's user avatar
9 votes
1 answer
18k views

rename not working [closed]

I have a bunch of files with names like ... (Karton 1).jpeg and would like to rename them recursively to: ... (brauner Karton).jpeg I tried the following commands, which didn't work: rename -v 's/...
Markus's user avatar
  • 1,585
9 votes
1 answer
4k views

How do you get to show the full name of application in 'Show Applications' and 'Files?

In the image below, only "input method" has the full name; other applications' names are shortened with an ellipsis (…). Why is this? Can it be fixed?
user avatar
8 votes
3 answers
10k views

How to change names of files in a directory to random generated names?

I have many files with different names of different lengths. Extension of these files are jpeg. How to change names of the files to random generated names?
Denis's user avatar
  • 193
8 votes
4 answers
4k views

How can I change the filename timestamp?

I have dat files' names in chronological order: FileName_YYYY_MM_DD_HHMM.dat Is there any commands for adding 30 minutes to each timestamp?
strawberrie's user avatar
8 votes
2 answers
3k views

Why are my file names hashed when I access them from my Google Drive Files on text editors?

When I try accessing my Google Drive folder on VS Code, the file names seem to be hashed and do not appear by their name. This is very annoying. I have tried different editors as well. I have tried ...
Maan Patel's user avatar
7 votes
7 answers
5k views

How can I change all files prefixes in one command?

I need to change the postfixes of all files (all the same .JPEG) to .jpeg (Capital vs. lower case). Is there a quick way of doing so?
Itay Moav -Malimovka's user avatar
7 votes
4 answers
11k views

Find files with a minimum filename length

I'd like to find all files in a certain folder which have a filename of at least n characters (extension included). Is there any way to achieve this with find?
gieldops's user avatar
  • 173
7 votes
1 answer
1k views

'echo [A-Z]*' matches lower-case filenames as well?

I am working on the root directory and want to print directory entries starting with an upper-case letter. $ echo [A-Z]* Applications Library Network System Users Volumes bin cores dev etc home ...
Wizard's user avatar
  • 2,911
7 votes
3 answers
24k views

Keyboard Shortcut to Rename File in GUI (Other Than F2)

I want to rename a file in GUI. I know I can either RightClick > Rename OR press F2, but I know in Chrome OS you can just type Ctrl+Enter in the Files app, and it will do that. Is anything similar to ...
SarahofGaia's user avatar
6 votes
1 answer
163 views

How do I remove a file with 2 hypens in the name, like --karmic.list [duplicate]

How can I read, write, or delete a file which has a name beginning with a pair of hyphens? In my /etc/apt/sources.list.d/ there is a set of files whose name starts with --karmic.list . When I try to ...
Shoaib Nawaz's user avatar
  • 2,249
6 votes
1 answer
358 views

Regular expression to match a concatenation of fixed strings, and alternative expressions

I mean to match (with ls, rm, etc.) files with names test10 to test18, test30 to test38, test22 to test23, with a single regex, in bash. I tried many variants around $ ll "test([1,3][0-8]|22|23)&...
sancho.s ReinstateMonicaCellio's user avatar
6 votes
2 answers
343 views

Find duplicate case insensitive filenames in all folders and sub-folders

I have about 250,000 files in several folders with sub-folders. Looking for a solution how to find duplicate filenames in all folders and their sub-folders. My OS is Ubuntu 22.04, using bash. I prefer ...
sotirov's user avatar
  • 3,663
6 votes
2 answers
5k views

Can I use standard tools to get the full name of a process, when its name has embedded spaces?

I understand that it may be a rare situation for an executable to have spaces in it, but it could happen. An example may be the best explanation.. Using standard tools, I want to determine the ...
Peter.O's user avatar
  • 24.8k
5 votes
3 answers
1k views

How do I randomize filenames recursively?

I already know how to do it in a given directory: for file in *.png; do mv -- "$file" "$RANDOM-$RANDOM-$RANDOM.png" done How do I turn this into a recursive command?
Nuno Fonseca's user avatar
5 votes
1 answer
252 views

Finding files/folders containing 3 items of text

I'm running Ubuntu 14.04 and currently trying to search for files and folders containing "hello", "165" and "920" (in their names - not within the files) using the command below: find . -name "...
Pete Duggan's user avatar
5 votes
2 answers
13k views

Strange file exist with name '* (star, asterisk)'

What is this strange file with name '*' I cannot even guess.. $ ll total 549M -rw-r----- 1 jaewan eng 0 Apr 29 18:37 * drwxr-x--- 21 jaewan eng 4.0K May 20 08:21 ./ drwx------ 19 jaewan eng 4....
lymose's user avatar
  • 51
5 votes
2 answers
8k views

How to use find when there are spaces in the directory names?

I need to find all .nfo files in my media directory so I can use sed to change some parts. The problem is my folders have spaces in the names. find /media/media1/HDTV -name \*.nfo -type f media/...
papampi's user avatar
  • 407
5 votes
1 answer
3k views

Cross-platform non-ASCII symbols in filenames with TrueCrypt

I have a TrueCrypt volume created under Windows 7. Some folders and file names contain Cyrillic symbols. When mounting the volume in Ubuntu 10.10, I see question marks instead of those letters. Is ...
texnic's user avatar
  • 1,233
5 votes
4 answers
5k views

How to download torrents with long filenames?

There is a known problem with transmission: it can't download torrents with filenames longer than 255 bytes. What are the workarounds?
int_ua's user avatar
  • 8,684
5 votes
3 answers
725 views

How to obtain the correct vfat path translation for my floppies?

My father left me a batch of 3.5 inch "floppy" disks created with Windows 95 (Dutch). I want to copy their contents. My only computer with a floppy drive runs Ubuntu 12.04.5 LTS. After installing ...
Reinier Post's user avatar
4 votes
2 answers
3k views

How to delete all first-level subfolders that do not have a specified string in their names

I know that there are quite a lot of answered questions about how to delete all files with or without a certain string in their names, as well as ones about how to delete all subfolders with a certain ...
PyGeek03's user avatar
  • 168
4 votes
2 answers
12k views

Invalid filename issue when I transfer files on Ubuntu to the external drive

I backup files on Ubuntu 12.04 to the external drives. The WD external drive works well. But the Maxell external drive cannot recongnize some files names, such as the saved .html files with '|' or '/...
user1914692's user avatar
4 votes
3 answers
23k views

How to have a forward slash in a file name?

I understand that this will likely break and confuse the hell out of my system, but is it possible to name or rename a file so that it has /s in its name (this is needed for a file which needs to go ...
user avatar
4 votes
2 answers
9k views

How do I fix invalid filename extension?

Ignoring file 'sublime-text.lis' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Christian Nyembo's user avatar
4 votes
1 answer
3k views

What's the maximum filename length in encrypted ext4 partition?

I'm using a two-partition setup with ubuntu (one partition for the system, one for my home directories). Until now I had an ext3 formatted home partition, which I'm currently trying to migrate to an ...
fdlm's user avatar
  • 175
4 votes
3 answers
17k views

Rename Files & Folders With Special Characters

Struggling with this one and Googling it doesn't seem to be giving me solution that works. I have a folder named... file å?? name.txt for example and to avoid problems, I want to rename it however ...
spcurtis81's user avatar
4 votes
1 answer
4k views

apt update message : /etc/apt/apt.conf.d/20auto-upgrades.ucf-dist - invalid file name extension

When I run sudo apt update I receive the following message: /etc/apt/apt.conf.d/20auto-upgrades.ucf-dist has an invalid file name extension. This has also started giving me an error message every now ...
user620554's user avatar
4 votes
1 answer
2k views

Samba CATIA filename mapping

I'm running Ubuntu Server 12.04.2 LTS as an ActiveDirectory connected mail server using dovecot and postfix. All works fine on this part. Now we want to export the mail storage for backup purposes. I ...
hurikhan77's user avatar
4 votes
2 answers
3k views

Cannot read filenames that are in utf8 encoding (Greek characters)

I've downloaded some files using "Download as .zip" option provided by Dropbox. The filenames contain Greek characters. I've extracted them and all I get is this: 2013 ΧειμεÏινÏ.pdf The files ...
Chris's user avatar
  • 1,163
4 votes
1 answer
960 views

Shotwell Viewer can't open files without file ending

I am using Ubuntu 14.04 virtual machine. When I try to open an image without file extension (e.g .png) using Shotwell Viewer, it shows the error: "Shotwell does not support the file format of /...
Aishwarya's user avatar
3 votes
2 answers
8k views

How to make aliases for file paths?

I have many folders on my machine, many of those folders have more folders within them, more folders within those folders, and so on... Now when I am doing certain cd and cp operations that I do every ...
user avatar
3 votes
2 answers
3k views

How to move files based on first word in file name?

In a folder, I have thousand of files, such as: cat eats mouse.jpg cat chases mouse.jpg gorilla eats banana.jpg gorilla is sleeping.jpg elephant is huge.jpg elephant has trunk.jpg (and so on...) I ...
user163125's user avatar
3 votes
4 answers
4k views

Combine two commands into a single command

I'm looking for a way to combine these two so I can do it in one step from the command line. (I think %1 would be in the command.) convert Tess.jpg tess.tif tesseract tess.tif tess For example: ...
fixit7's user avatar
  • 3,147