Questions tagged [filename]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
24 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, ...
1
vote
1answer
158 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 ...
0
votes
1answer
41 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 ...
2
votes
1answer
39 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 ...
0
votes
0answers
30 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 ...
0
votes
3answers
171 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,...
0
votes
3answers
182 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, ...
0
votes
1answer
26 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....
0
votes
1answer
237 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 ...
2
votes
1answer
42 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 /), ...
1
vote
1answer
271 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 ...
3
votes
2answers
263 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 ...
3
votes
1answer
139 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 ...
1
vote
0answers
62 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@...
-1
votes
3answers
188 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 ...
3
votes
4answers
2k 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: ...
0
votes
0answers
43 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 ...
0
votes
0answers
802 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 ...
1
vote
1answer
32 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 - ...
0
votes
2answers
344 views

Are file names allowed to use dots other then before the file extension?

I am checking file name validity on Ubuntu computers. I want to check whether the file extension is correct. Is separating the value after the first dot in order to get the file extension will do? if ...
1
vote
1answer
250 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 ...
1
vote
1answer
95 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 ...
9
votes
6answers
4k 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 ...
2
votes
1answer
898 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 ...
0
votes
0answers
27 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.
1
vote
2answers
1k 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?
2
votes
2answers
280 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`...
0
votes
3answers
175 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. ...
1
vote
1answer
666 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 ...
4
votes
1answer
2k 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?
0
votes
1answer
36 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/...
1
vote
0answers
111 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?
1
vote
0answers
91 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: > ...
1
vote
1answer
534 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 ...
4
votes
3answers
4k 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?
1
vote
0answers
69 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 ...
1
vote
2answers
940 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 ...
0
votes
0answers
700 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- ...
8
votes
1answer
4k 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?
1
vote
2answers
110 views

How do I delete file named -?]d?j??.? from system? [duplicate]

I cannot remove such file, I get error message. file name is -?]d?j??.? and I want to remove it. I try rm -?]d?j??.? but it gives error.
2
votes
3answers
1k views

Truncating file names

I am trying to truncate file names down to the last 4 digits (example: 941_S_5193 to become 5193). What would be the most straightforward way to loop this command to apply to roughly 600 files? Thank ...
0
votes
1answer
873 views

youtube-dl preserve slashes in video title

If a video is titled "5/12", then using %(title)s produces "5_12". Is there any way to preserve special characters in the filename? I would be okay with something like "5%2F12". Alternatively if ...
2
votes
1answer
117 views

Remove date in desktop icons' name

How to remove date (most probably the last modified date) from the desktop icons' name? I tried renaming it but the date still does not go. I have dragged the folder from nautilus to desktop. I am ...
19
votes
2answers
6k 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 ...
7
votes
1answer
10k 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/...
0
votes
2answers
451 views

Inserting file name in first line of merged txt files

I want to combine multiple txt-files using the paste-command and I want the names of each txt file as a part of the newfile. The Txt-files (ie. 01.txt) look like this: X936 X937 X938 ...
7
votes
1answer
959 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 ...
1
vote
3answers
277 views

Swapping file and directory names

I have a collection of files at ./date-and-time/fixed/path/filename where date-and-time and filename are variable. I would like to move all these files to ./filename/date-and-time. The former path is ...
17
votes
3answers
5k 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 ...
2
votes
2answers
386 views

Home directory or disk encryption without filename encryption

Is there any way to use ecryptfs to encrypt the whole disk or only the home directory without simultaneously encrypting the filenames? I'm asking this question because I have to get rid of the ...