File name is a name used to identify a file uniquely on given file system.

learn more… | top users | synonyms

1
vote
3answers
75 views

Extract filename from another filename

I receive notification files for different files. I want to extract the filename from these notification files which I would use in another process. The first 4 strings of the notification file will ...
6
votes
2answers
442 views

How to colourise hidden files in `ls` file listings?

LS_COLORS environmental variable lets you decide on colours for different file types for ls command, such as, directories, regular files, links etc. I suppose that dot files are considered a variation ...
3
votes
2answers
647 views

How to find all paths not compatible with Windows?

On most Linux filesystems, NUL (\0) is the only invalid character in paths (and / is reserved as the path separator). Windows has a complicated set of rules for valid paths. Rather than fixing paths ...
3
votes
2answers
399 views

Wget with different filename, but same extension

I need wget to save to a different folder, different filename, and same extension, but I do not have the filename before downloading. For example, let's say I have: http://ge.tt/api/1/files/...
1
vote
2answers
55 views

Nautilus: How are files sorted?

I am quite new to Debian 8.4. I am not sure if this is the right community on stackexchange to pose this question. Please tell me, if not. My question: I am using the Nautilus file manager. I view a ...
1
vote
2answers
26 views

How prepend appropriate amount of 0's to numbers contained in image names?

I've got a folder /User/me/Desktop/folder/images with files like key 1--name.jpg, key 10--name1.jpg, etc. The files are sorted incorrectly when fed to my site so I get an arrangement like key 84--name....
1
vote
2answers
46 views

How to change the default use of detox, so it just doesn't replace spaces by underscores

I'm happy with the default usage of detox for sanitizing filenames, except I don't always want to replace whitespace with a single underscore. Would like to replace whitespace with a single space. ...
1
vote
2answers
204 views

Search for matching files with wildcards without using find in a bash script

For an assignment, I'm supposed to write a bash script that can act as a very basic find, but without actually using the find command. For example, if I put in this input: my_find ~/homedir/ -name '...
1
vote
2answers
88 views

C Shell: different actions depending on the file type

I very new to C Shell. I am trying to read a file from the command line, and determine whether it's a zip file, a .txt, a symbloic link, a pipe, or whatever ("unknown"). Then I'd like to execute a ...
0
votes
2answers
308 views

Unix how to loop through directories, send output to another directory with base name of input file

I am an infrequent user of UNIX, I'm sure this will be fairly trivial for any regular user so I appologize for that. I have the following code: for file in /home/sub1/samples/aaa*/*_novoalign.bam ...
4
votes
1answer
134 views

Deleting ghost files with non-ASCII characters

I have some weird files and folders in my trash on Mac OS X. After I "empty" the trash, the files still remain. I attempted to manually delete the files: $ cd /Volumes/VOLUME/.Trashes/501/...
3
votes
1answer
221 views

Mounted volume name in terminal is different from in GUI

The basic problem is that in the GUI shows a directory name with no space but when I cd to it in the terminal, the directory name has a space in it. What would cause the names to be different? The ...
2
votes
1answer
95 views

Can't copy or view files with hangul on HFS+

I'm trying to copy a directory of Korean and Japanese music on a Debian Jessie box. The source file system is HFS+J (Mavericks vintage) from a dead Mac, mounted with hfstools: # mount -t hfsplus -o ...
2
votes
1answer
152 views

Bash completion - How to get filename completion for suboptions

I have a function which can take main arguments and then sub-arguments. Some of these sub-arguments are filenames. The current completion code I have is as follows. _scm() { local cur prev opts ...
2
votes
1answer
660 views

Merging folders with practically the same name but different casing

When digging around in the advanced settings in Dropbox I lost a folder. I only discovered this about a month later. I managed to get this folder back from Dropbox however the file structure of the ...
1
vote
1answer
30 views

Scan though directory of files and find replicates with same name and concatenate them into one file

I have a directory with a bunch of files For example: ExperimentA_Rep1.bed ExperimentA_Rep2.bed ExperimentA_Rep3.bed ExperimentB_Rep1.bed ExperimentD_Rep1.bed ExperimentC_Rep1.bed ...
1
vote
1answer
126 views

Can not get the file names with convmv

I have just uploaded some files on a FreeBSD server. Some files have the ??? into their names. The files came from a windows machine, so I try this: $ convmv -f cp850 -t utf-8 * Starting a dry run ...
1
vote
1answer
258 views

Rename files with non-utf8 characters using detox

I am trying to use detox in the following way detox -s utf_8-only -r -v -n to detect invalid filenames on my system. The command performs mostly ok. Unfortunately it falsely detects also German ...
1
vote
1answer
672 views

rename multiple files recursively and remove multiple characters such as ? : or newline from names

I have seen a few similar questions, but nothing that shows how to remove any of a set of special characters from all file names recursively. I want to keep uppercase and lowercase letters, numbers ...
0
votes
1answer
357 views

? appended to filename while copying from a ssh

I am using the command cp error.log error$HOSTNAME.log the command works properly while running it separately in a server, but if it is run as script which uses ssh I am getting a ? appended to the ...
0
votes
1answer
51 views

Standards for dealing with older/previous “.bak” backup of config file before new edit

Assume I have a config file "foo.conf." This file is rarely edited. At some point in the BeforeTime(tm) it was edited and "foo.conf.bak" was created to save the previous state. Now, I want to make ...
0
votes
1answer
224 views

From Mysql query output to retrieve files in the file system and rename the files

I have to call a SQL query from bash that outputs 1000 rows of two columns File_Path (Eg., /opt/files/dest/2.bin) Name_of_the_file (Eg., fax attachment.pdf, invoice.docx... yes, there are spaces). ...
0
votes
1answer
323 views

defining rename command scope; replace word; replace entire file name; wildcards

Im looking to use the rename command to edit file names. More specifically, Im trying to isolate specific pieces to change, or in some cases, the whole name. For example: Lets say I have three ...
-2
votes
1answer
4k views

Shell Script to copy the file to another folder

I am new to Linux, I have to write .sh file which will be called from .Net Application. Script.sh has to move the file from rootdirectory to a specified folder. I am expecting to pass SourceFilePath ...
3
votes
0answers
18 views

Archive Manager doesn't show file with the name “-”

Given that I made a .zip file by piping from stdin like this: $ echo foo | zip temp.zip - This produces an archive OK (with the data in a file named "-"): $ unzip -t temp.zip Archive: temp.zip ...
3
votes
0answers
319 views

mv “Not a directory” when target name too long

I'm trying to do an svn checkout on my local Ubuntu 14.04 LTS vagrant box (SSH via MTPutty): vagrant@vagrant-ubuntu-trusty-64:~/shared/dev$ svn checkout https://... [...] svn: E000020: Can't move '/...
2
votes
0answers
33 views

Producing the next available filename for a pattern (02-output.log etc)

I can use mktemp(1) within a shell script to make a temporary file in a directory with a suitable suffix & prefix. Is there a command that, given a pattern (e.g. NN-output.log) will look for 01-...
2
votes
0answers
143 views

some cyrillic file names got broken after moving from server to server

I moved my website from one server to another and encounter a problem with cyrillic filenames. Some cyrillic URLs in wordpress are fine and some are now broken. It used to be OK on previous server. ...
2
votes
0answers
249 views

How to limit ext4 filenames to only those filenames legal in FAT?

The ext4 filesystem allows some characters that FAT does not allow, such as :. This has caused me much grief in the past when trying to move files, especially as KDE will delete such files instead of ...
1
vote
0answers
22 views

convert windows path to unix path inside wine application command line

I'm running a windows application in wine, which executes configurable commands to run external applications (e.g. an diff editor to show differences between two source files). So these commands are ...
1
vote
0answers
37 views

incrontab on folder name containing line feeds

I'm writing a script searching for directories in a subtree and appending them to incrontab. I can even add folder names with blanks by escaping those with a backslash: /path/to/observed\ directory ...
1
vote
0answers
113 views

How can I switch from one user to another user inside a script?

.The issue is my id 'aaa' can read only the file name and not the contents inside it when I log in with my id "aaa". So to read the contents I have to switch to another user "bbb" which is having ...
1
vote
0answers
46 views

binary is able to run only when run after creating a symbolic link to it

I am facing a rather strange problem. I have a 32 bit qmake binary placed at a very deep path. So for ease of use I created a link using ln -s /complicated/path/to/qmake ~/qmake I am running a ...
1
vote
0answers
50 views

Autocomplete include directories in c++

VisualStudio has some extension which checks the include directories and makes suggestions while typing. My current project uses a lot of included libraries, sometimes with rather long pathnames. Let'...
1
vote
0answers
32 views

About the status of the File Hierarchy standard

In the question Where can I find the Official File Hierarchy Standard for UNIX? one writes: As with all things unix, it's less of a law and more of a guideline; how much of it is adhered to varies by ...
1
vote
0answers
705 views

How to use fslint (in particular findnl) on the command line to actually mimic the behavior of the fslint-gui?

So I am trying the fslint tools. However, the help included in those tools as well as the man page don't indicate that the cleanup actions offered by the fslint-gui are also available through fslint (...
0
votes
0answers
47 views

find awk log print error

I'm trying to find one year old directories named in yyyymmdd format and print it in the log file placed at different location. find ${LOG} -maxdepth 1 -type d -mtime +${DAY} -name '20[0-9][0-9][0-9][...
0
votes
0answers
23 views

Forced search on specific folders in file manager

I am running Arch using XFCE as a DE. I currently have Thunar as my file manager but I have installed Gentoo and Xfe remotely so I am waiting to have a look at them. My question is: in some file ...
0
votes
0answers
24 views

how to find (,put in folder) and relink to post: pictures moved to other directories

I have some 24000 pictures that have been mistakenly scattered into different directories under one top directory (upload). Now I have broken links in (wordpress) posts that were linking to these ...
0
votes
0answers
49 views

What is the purpose of .been_here file?

I was browsing the files under .quickinstall when I located this file. It looks bit suspicious! The file, located at ~/.cpanel/quickinstall only says "I've been here".
0
votes
0answers
43 views

Kali Linux 2.0 File language

does someone know how to change folder names (Documents, Templates, Desktop etc.) I installed it in Croatian and change the language into English (US). Everything works and is translated except for ...
0
votes
0answers
168 views

Shell Script : Check for all the source files in different paths

This is the naming convention of the file. <yearmonthdate>_<sourcesystem>_<totalnoofpartsof file>_<subject area>_<part number>.dat (or .dat.gz) First part is Date, ...