filename

How do I randomize filenames recursively?

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? Asked By: Nuno Fonseca || Source Answer From GNU Bash manual – The Shopt Builtin: globstar If set, the …

Total answers: 2

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

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 a bash command/script solution. However, suggestions about tools similar to fdupes …

Total answers: 2

Passing filenames with spaces into linux functions using variables in bash script

Passing filenames with spaces into linux functions using variables in bash script I am using the following bash script to retrieve execution status of the ‘cmp’ command: a="./textX" b="./textX" comm="cmp ${a} ${b}" ""${comm}"" statusX=$? echo "Here is cmp status: ${statusX}" This script works. (Variables a and b are identical in this instance for script verification …

Total answers: 1

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

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 of them (both files and directories), e.g. replace …

Total answers: 2

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

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 ‘/’. But these files names are fine …

Total answers: 2

How to download torrents with long filenames?

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? Asked By: int_ua || Source I am here not to solve the problem, but to offer an alternative. If you are not determined to use Transmission by …

Total answers: 4

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

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 …

Total answers: 8

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

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 the ‘amd’ string in the filename? What other kind …

Total answers: 5