2022 Developer Survey is open! Take survey.

Questions tagged [filename]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
33 views

How are spaces in path and/or filename handled?

I have hundreds of files that I import often, so the directories contain some spaces in addition to filenames with spaces. Each file has a 4 digit prefix (seq #) that I need to strip off. I am writing ...
user avatar
1 vote
3 answers
151 views

How to delete a bunch of files in a folder knowing a part of their filename?

I have a folder of Markdown files. The files use the following filename convention: [Time-based ID] [Title]. With this convention, you have filenames such as 202204101548 Banana bread or 202204101549 ...
user avatar
0 votes
0 answers
58 views

Differences in filename restrictions between two externals drives (Ubuntu 20.04)

I'm in the middle of moving data from my old external drive to the new one, but even though they're both from the same manufacturer and both have NTFS systems, the old one can store files with "|&...
user avatar
1 vote
0 answers
24 views

Selected filename of downloading file is not directly editable

Every time I download a file in Ubuntu 21.10 with Chrome 100, the nautilus windows opens with the filename selected (highlighted in orange), but the filename is not directly editable. I have to click ...
user avatar
0 votes
0 answers
66 views

ubuntu 20.04.3 - error "invalid filename" while copying to external HD

Why won't Ubuntu 20.04.3 LTS copy all files to external HD? My external drive has been used as backup drive with Ubuntu 18..04 LTS for long time without any problems. But when I recently installed 20....
user avatar
  • 1
0 votes
0 answers
28 views

File names drastically changing when sent as attachments [duplicate]

Hello there one and all. I am using Ubuntu 20.04 LTS and storing files on Google Drive. I try to send as an attachment on Messenger which I called "D6 DPH Package.pdf" and it is transformed ...
user avatar
  • 1
0 votes
2 answers
62 views

Ubuntu CLI, replace a long filepath/filename with a shortcut

I have a long path to some of my files and I don't want to type and/or use the Tab-key as much when using it with commands in the Terminal. So I want to add "shortcuts" to some them (both ...
user avatar
1 vote
0 answers
131 views

When I mount my USB drive, all Chinese characters of names of files/directories are displayed as question marks

When I create or rename a file with Chinese characters(like 我的源程序.c) on Windows, and reboot it to Ubuntu 20.04.2 LTS, and mount it with sudo mount /dev/sdb4 /mnt, and use ls /mnt command, it shows ????...
user avatar
1 vote
3 answers
55 views

How do I perform a loop on files that have the same string before the first underscore?

I am trying to perform a loop on Ubuntu in which I concatenate two files into one single file. The directory has thousands of files, which all come in pairs that have the same string of characters ...
user avatar
  • 27
2 votes
0 answers
48 views

Attempting to clone a musical instrument HDD but all file names are shortened to 8 characters when viewed in Ubuntu Studio 20.04

Edit: Thank you all for the suggestions! It has given me a lot to chew on. I guess I'll start with refining my original question: I am at present trying to browse directories on a hard drive via ...
user avatar
0 votes
0 answers
19 views

Software downloaded from snap store can't show file names

I have installed opera from snap store a while ago. However, it had a problem with showing file names when I try to download or upload something. Image of file import prompt under opera I supposed ...
user avatar
  • 1
1 vote
1 answer
335 views

Show input filename within output filename — after ghostscript command

I use this script (from here) in order to reduce the size of a pdf file: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook \ -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input....
user avatar
  • 2,250
4 votes
1 answer
619 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 ...
user avatar
0 votes
1 answer
27 views

Discs burned in Windows have different language filenames in Ubuntu

I've browsed these backups before and not had an issue with them [other than the rate a disc spins up, if at all], but now they're all given Chinese character filenames - it's probably a simple thing, ...
user avatar
1 vote
1 answer
237 views

Letters all scrambeld - only 4

I have latest ubuntu release (20.04) with gnome fallback session. After reboot I got all letters scrambled. On desktop, in terminal, in explorer all files have only first four letters. I don't know ...
user avatar
  • 287
0 votes
1 answer
114 views

Dealing with spaces in filenames

I have written the following bash function to easily open files from the command line with their default application: ## Open files with their default application function open { # If no arguments ...
user avatar
2 votes
1 answer
76 views

How to grep series title from list of paths?

I have the following command: find /home/cas/plex-media/series/ -type f -name '*.srt' | grep -v .en.srt Which will find all .srt files, that are not .en.srt in the directory and subdirectories of ...
user avatar
  • 540
0 votes
0 answers
38 views

How to have files appear in alphanumeric order? E.g. 09, 0A, 0B, 10, not 0A, 0B, 09, 10

When I use both numbers and letters in filenames, they do not appear in the correct order. Correct example: 00.jpg 01.jpg 02.jpg 03.jpg 04.jpg 05.jpg 06.jpg 07.jpg 08.jpg 09.jpg 0A.jpg 0B.jpg 10.jpg ...
user avatar
0 votes
3 answers
929 views

How to copy a file with a filename containg a ":"?

I have an external usb-drive where some of the filenames contain a ":", e.g.. Screenshot-08-09-12 -08:10:45.png (Old screenshots). I can copy these files towards the hard-disc of my computer,...
user avatar
0 votes
3 answers
193 views

How to rename archives in Ubuntu's terminal? [duplicate]

I have the following files: /home/wiki/15000_20000/xx00 /home/wiki/15000_20000/xx01 /home/wiki/15000_20000/xx02 ... /home/wiki/15000_20000/xx4686 How do I rename xx00, xx01, ..., xx4686 to 152000, ...
user avatar
0 votes
1 answer
30 views

How do I rename *.faa filenames for an expression located inside each file in [brackets]?

I would like to rename the filenames *.faa (a typical name is protein-176.faa) for a name that is located inside each .faa file in brackets [Escherichia coli DSM123]. For example the file protein-44....
user avatar
0 votes
1 answer
414 views

Bash Script to rename or remove punctuation (? !) & string in filenames of files, subdirectories and directories recursively in Ubuntu 16.04

I am new to using Bash scripting, but I have discovered a few solutions that use it to either remove or rename the filename for files within directories and sub-directories in Ubuntu 16.04. For ...
user avatar
  • 21
2 votes
1 answer
57 views

Why do Filenames created under UTF-8 not match the UTF-Codepage layout?

According to Wikipedia's utf-8 Codepage Layout, its character-set is as follows: ! " # $ % & ' ( ) * + , - . / 0-9 : ; < = > ? @ A-Z [ \ ] ^ _ ` a-z { | } ~ But (excepting /), ...
user avatar
  • 31
1 vote
1 answer
756 views

File name error in Ubuntu 20.04.1 [closed]

I just installed Ubuntu 20.04.1 by getting rid of Ubuntu 18.04.2. I had backed up my data on an HDD before installation because I intended to wipe it all out. There were no issues while transferring ...
user avatar
  • 51
3 votes
2 answers
422 views

Store sha256 hashes into relatives files

I would like to generate sha256 hash for each log file in a folder and store that hash in a file named by the original file name suffixed with ".sha265" int he same folder. For example, I ...
user avatar
  • 33
3 votes
1 answer
160 views

Zip certain files having filenames alphanumerically bigger than others

I gzipped files in a slurm job. But job canceled before it is done. It takes so long(~10min for a file, and there is 200 files). How can I zip only the remaining files which are not zipped yet? $ ls ...
user avatar
1 vote
0 answers
127 views

locales (UTF-8) are not set as expected

Ubuntu 16.04.6 LTS is installed on my virtual machine. When I use PuTTY to login, I get the following output: karsten@v38xxx:~$ who am i karsten pts/0 Jun 26 10:14 (87.175.23.xx) karsten@...
user avatar
  • 33
-1 votes
3 answers
343 views

Is there a way to remove a character from multiple file names

I have a client that gave me an ancient PowerMac G4 with a non-booting OS and dying hard drive to retrieve files from. I've been working on that all day and have his files successfully retrieved, but ...
user avatar
3 votes
4 answers
3k 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: ...
user avatar
  • 2,256
0 votes
0 answers
98 views

Checking for illegal/duplicate windows file names in NTFS

Is there a command line tool for checking if a file name is illegal on windows? Similarly, is there a command line tool for checking if file names will clash when case insensitive? I know how to check ...
user avatar
  • 141
0 votes
0 answers
1k views

mv: missing destination file operand when special characters are involved [duplicate]

This one's silly. I saved my vim session with :Obsess -S Session.vim instead of :Obsess Session.vim, so now I have a -S/ Session.vim file in my project and can't open it with vim as the following is ...
user avatar
  • 133
1 vote
1 answer
56 views

How to move files from directory /foo (1) to directory /foo

I know this is basic, but I'm failry new to bash. Due to some duplication I have many photos in many folders and I'd like to clean them up. Here is an example of my file structure - 12-30-14 - ...
user avatar
  • 13
1 vote
1 answer
507 views

Lubuntu is not able to read file names with cyrillic characters

I would be grateful for helping in resolving the following issue. Cyrillic characters in file names are rendered with octal escape sequence codes in Konsole. For example, the file name Тест.txt is ...
user avatar
  • 125
1 vote
1 answer
159 views

Make KDE ignore file extension and run an .exe as a Linux executable

I'm sure you're wondering why the hell I'd want to do that. I'd like to run a Steam game (Doom 3 to be specific), and I can force it to download since Steam now uses Proton to be compatible, but I ...
user avatar
  • 468
11 votes
6 answers
6k 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 ...
user avatar
2 votes
1 answer
1k views

Find and replace folder and file names with Windows incompatible characters

My Ubuntu (18.04) drive is synchronised with a Windows drive. Some of my folder and file names in Ubuntu contains characters not allowed in Windows and this causes issues during sync. I want to find ...
user avatar
  • 1,098
0 votes
0 answers
30 views

Handling filenames in ubuntu not working!

I am trying to manage a Windows file named “- – file.txt” from the Linux command prompt but using “./- – file.txt” or “– – – file.txt” does not work any suggestions? I tried googling but no good.
user avatar
1 vote
2 answers
2k views

How to remove end of file names?

I want to rename a lot of files like 1_16_video1.mp4?1578683110081 & 54_127_video7.mp4?168302 to 1_16_video1.mp4 & 54_127_video7.mp4. How can I rename them?
user avatar
2 votes
2 answers
359 views

Create a function to extract filenames from multiple filenames using delimiter in bash

e.g.,report jpg will display about all the files that are called something.jpg. Here's a code I'm working on including my questions. function report { x=`ls *.$1` num=`ls *.$1 | wc -l`...
user avatar
  • 23
0 votes
3 answers
507 views

Customary format for multi-word filenames? [closed]

Is there a preferred/customary way of formatting a filename that contains multiple words? Or is it a matter of personal choice? I'm trying to make more use of command line, if that makes a difference. ...
user avatar
1 vote
1 answer
2k views

Sorting files to be used in for-loop in bash file

I try to remove duplicates from a directory with 20k files. I figured that duplicate files, although having different filenames, have the same filesize. So I want to sort them first on filesize and ...
user avatar
7 votes
1 answer
3k 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
0 votes
1 answer
38 views

Move JPGs from a dir in home to a usb?

I'm using my raspberry pi to take pics of my 3d printer for time lapse. My only issue is that nothing I'm trying allows me to move them to the USB. My most recent line I've tried: ~/Desktop/gphoto/...
user avatar
1 vote
0 answers
202 views

How to add newline for the file/directory name in Nautilus?

I am trying to do this A and B are in different lines I know how to do it in terminal. mkdir 'A'$'\n''B' How to do it in Nautilus?
user avatar
  • 1,514
1 vote
0 answers
123 views

How to copy a file with systemd mount unit escape in name on cifs mount?

I'm writing a backup with rsync and a file with the systemd mount unit escape \x2d for - on a cifs (protocol version 3) (/mnt/diskstation/backup in this example) causes the following trouble: > ...
user avatar
0 votes
1 answer
733 views

Why do files created by Mousepad or Leafpad not have extensions by default?

Normally, every text document has an extension. With LibreOffice Writer, the extension could be .odt or .doc, etc depending on your preference but mousepad and leafpad don't provide extensions ...
user avatar
6 votes
3 answers
6k 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?
user avatar
  • 173
2 votes
2 answers
144 views

Change number of characters per line in a folder's name

I have noticed that the number of characters allowed per line in a folder's name is lower in Ubuntu 18.04 than it was in Ubuntu 16.04. This causes some long words to be forcefully split between two ...
user avatar
1 vote
2 answers
1k views

Cannot open files with spaces in names by double clicking, but can from terminal

I am running Xubuntu 18.04 in a desktop computer, installed last week. I am having problems to open files if the path has a blank space and I believe this is producing other problems too (for example ...
user avatar
0 votes
0 answers
880 views

mget `*.*` doesn't work

I want to download all files in a folder with ftp. But mget *.* isn't accepted. Here is the terminal output: ftp> ls 200 PORT command successful 150 Directory listing for /DCIM/Camera/ -rw-rw-rw- ...
user avatar
  • 544