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

learn more… | top users | synonyms

0
votes
0answers
9 views

no fonts showing up in filesnames in thunar (and pcmanfm). debian 7.8

I had recently installed a debian 7.8 system. I connect to it both locally from the attached monitor , but also remotely from an nx session. "Fluxbox" is the desktop environment and "thunar" the file ...
-2
votes
1answer
34 views

Move folder from root of Hard Disk to Current Directory [on hold]

I'm trying to figure out how to move a folder that sits in the root of my disk (what do you call that, home?) to a subdirectory. I am not cd'd to the root (again not sure of the terminology). When I ...
1
vote
3answers
45 views

Find a file with the extension .csv in a directory matching a pattern

I have a folder in which I have many subfolders. The Root folder name is allCSV and sub foldername is will be like a_date(s), b_date(s), c_date(s) ... I want a file which is in a_date(s) and ends ...
1
vote
2answers
57 views

Copy .txt files in a certain directory

I have an issue in copying my file in my directories. I have .txt and .jpeg files in a lot of directories, and I want to copy only the .txt files according to the directory. For example, I have this: ...
1
vote
0answers
31 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
1answer
46 views

Searching a filename

How to search a file with a given String and currentTimestamp and if not found trigger a mail? For Ex-:I have to search a file whose filename would be like filename_05172015 and trigger a mail if not ...
2
votes
4answers
92 views

Why . /home/Desktop is incorrect and ./Desktop is correct?

I'm learning about Linux, started yesterday. I have a question which I couldn't answer from my book or Google. What is the difference between ./ and / in the shell? I'm asking this because when I ...
2
votes
0answers
61 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 ...
1
vote
1answer
21 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 ...
2
votes
1answer
31 views

Can not access my external hard drive.

I am fairly new to Linux and have been trying to move some files around with terminal on my external hard drive but I can't seem to get it to work. I am using a generic external hard drive with a ext4 ...
3
votes
4answers
170 views

Overwriting files found by find?

I have a list of files -rw-rw-r-- 1 t t 24813 Oct 23 2002 fig8_21.gif -rw-rw-r-- 1 t t 2259 Oct 23 2002 fig8_21t.gif -rw-rw-r-- 1 t t 35331 Oct 23 2002 fig8_23.gif -rw-rw-r-- 1 t t 2610 Oct 23 ...
0
votes
2answers
75 views

bash - change filename in a loop

So I have my input directory, output directory and list of files: #!/bin/bash ## shell type dir_in=('/Users/dossa013/data/inland-data/input/') dir_out=('/Volumes/Macintosh HD 2/data/cmip5/cru/') ...
0
votes
1answer
35 views

How to ignore spaces in file path for bash select statement [duplicate]

I have the following Bash Script: #!/bin/bash cd ~/Library/Developer/CoreSimulator/Devices/; files=$(find . -name iaGambro_gambro.sql) select file in $files; do if [ -n "$files" ]; then ...
2
votes
0answers
23 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 ...
3
votes
5answers
76 views

`xargs` with spaces in filenames

I'm trying to list only non-image files, searching only in the most recent 500 files. So I run ls -t | head -500 | file | grep -v 'image' which isn't right: it displays a help message. Changing it ...
2
votes
1answer
35 views

Shell Scripting: Deleting or moving files from one directory that match filenames from another directory

I have a very specific and odd problem to solve. I'm working as a research assistant and I've been producing a ton of figures. In one directory, I dump .pngs to view casually (limited space here) and ...
1
vote
3answers
68 views

Rename files (delete some characters that are not always the same)

I have some files named like this : DA1_ATGCATG_L001_R1.fastq.gz Oeu43_TCATGAC_L004_R2.fastq.gz I want to delete the part after the first "_" but keep the end of the names from "_R" to obtain this ...
1
vote
1answer
26 views

Need a shell script for copying files that have long and out of capacity names

I have a directory on a NTFS file system which contains files with short and long names, I entered copy command for that directory to be copied on a Ext2 file system, files with short names copied ...
1
vote
3answers
77 views

How to copy lines from multiple files into one new file and keep file name?

I have 81 files in .fasta format that contain (up to) 53 items. Such as: /User/MyData/Sample_1.fasta /User/MyData/Sample_2.fasta .... /User/MyData/Sample_81.fasta Each .fasta file contains a name ...
0
votes
2answers
15 views

A file containing exports

I have a file containing the following: export PYTHONPATH=/home/myuser/squish-5.0-xyz/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/myuser/squish-5.0-xyz/lib I don't what to place it in my ...
2
votes
2answers
46 views

how to strip the last slash of the directory path?

I have a script which requires an directory as one argument. I want to support the two form: one is like a/b/c (no slash at the end) and another is like a/b/c/ (has slash at the end). My ...
0
votes
4answers
91 views

Foreach loop for ls output

I am trying to process some files in directory using foreach loop for ls output: IFS=$'\n' for i in $(ls -1Atu); do echo "$i" done At first time i thought it works, but when i created file ...
9
votes
1answer
324 views

How do case-insensitive filesystems display both upper and lower case file names?

This question occurred to me the other day when I was working on a development project that relies on an opinionated framework with regard to file names. The framework (irrelevant here) wanted to see ...
1
vote
1answer
32 views

How to change configuration of detox (dash instead underscore)?

I found, best to this moment, a solution when changing all those annoying filenames in large quantities, making them readable and easier to manipulate with in command-line. So I found, among many ...
3
votes
2answers
244 views

Location of the crontab file

as many (most?) others, I edit my crontab via crontab -e, where I keep all routine operations such as incremental backup, ntpdate, various rsync operations, as well as making my desktop background ...
2
votes
1answer
36 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 ...
28
votes
2answers
809 views

find(1): how is the star wildcard implemented for it to fail on some filenames?

In a file system where filenames are in UTF-8, I have a file with a faulty name; it is displayed as: D�sinstaller, actual name according to zsh: D$'\351'sinstaller, Latin1 for Désinstaller, itself a ...
1
vote
2answers
226 views

Why do I have double slash here?

$ which mycommand /home/t/program_files/document/other edits//mycommand Why do I have double slash // here?
0
votes
1answer
30 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
2answers
38 views

Why is wget still failing even after enclosing the URL with double quotes?

I enclose URLs I want to wget with "" since most of them have spaces, braces, etc. It usually works fine, but I can't get this URL to work: wget "http://xxxx/Sankarea - 6 - It`s Because I... Ran ...
0
votes
1answer
27 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 ...
1
vote
2answers
87 views

Why is grep searching more than the files I want with asterisk?

Deep within a bash script I have grep -Ech 'string1|string2' /server/directory/$servername_log_20150312* | awk ... I was getting the "too many arguments" error so I turned on set -x and I see that ...
1
vote
1answer
83 views

Create tar files from shell script with current time stamp

I am trying to create a shell script which will back up my git codebase and save in a specific back up directory with current days name So far I have : #!/bin/bash branch="master" if [ $# -eq 1 ] ...
3
votes
3answers
73 views

Find command: multiple conditions

As a standard for my file/dir naming I use something like putting date and tags string into the file name separated by underscore, eg: 2015_03_10_usa_nyc_vacations_album_pictures For a long time I ...
6
votes
2answers
709 views

Use of file names ending with a period

Why does Unix allow files with a period at the end of the name? Is there any use for this? For example: filename. I am asking because I have a simple function that echoes the extension of a file. ...
1
vote
1answer
43 views

Batch rename “case duplicates”

I have a folder on my Linux system that is cross-synchronized with other computers, some of them with Windows. The problem is that in that folder there are files that are "case duplicates", i.e. their ...
1
vote
2answers
105 views

Extracting numbers with a decimal point from ls output in Bash

I would like to extract the numeric part of the file names that begin with "hsli" and end with ".h5" in Bash on Ubuntu 14.04.1 64-bit LTS. My ls -l hsli* output is as follows: -rwxrwxrwx 1 ongun ...
0
votes
0answers
10 views

CAJA: make all files with a given suffix get a given file type

Currently, my files with the suffix (extension) .def are recognized as generic "plain text files", and are opened in gedit, which I prefer for plain text files. However, my .def files are actually a ...
1
vote
2answers
86 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
111 views

for loop when matching both front and back of file name

I'm trying to set up a for loop to run a process on pairs of files. The names of the files look like this 36_002_CGATGT_L001_R1_005.fastq.gz 36_002_CGATGT_L001_R2_005.fastq.gz ...
2
votes
2answers
103 views

remove the low version number of file

I have these files: atk-2.8.0-ia64-11.31.depot gtk+2-2.24.25-ia64-11.31.depot lzo-2.09-ia64-11.31.depot bash-4.3.030-ia64-11.31.depot gtk+3-3.6.5-ia64-11.31.depot ...
0
votes
2answers
50 views

find {} returns the full filename but I just want the filename without the extension, so index.md would return index instead of index.md [duplicate]

So I have find . -name \*.md -type f -exec pandoc --filter ./filter1.py -o {}.html {} And notice the {}.html. The {} returns a filename ending with .md, but I want it to just return the filename ...
3
votes
3answers
199 views

display filename followed by content without interaction

My program writes it state to few files every 30 seconds or so (overwrites) and I would like to look at them with the filenames displayed like "more" does. Like: $ echo 1234 > test00 $ echo 5678 ...
0
votes
3answers
94 views

Running sh file only works if cd'd to scripts directory

I'm trying to run a .sh file, through the ./file.sh syntax. I, wrongly, thought it'd be possible to run: ./usr/bin/foo/bar.sh which just yields "No such file or directory". However, if I run: cd ...
3
votes
1answer
74 views

How do you get the first file in each subdirectory matching a list of file extensions?

How do you get the first file in each subdirectory matching a list of file extensions? My goal is to run a program on just any one of the files in a series of subdirectories. For example, below ...
2
votes
1answer
29 views

Unix Filename ignore list [closed]

We are trying to set up Unix based server and we are trying to figure out if there is any way to forbid creating certain files on the server. I mean files like: .DS_Store, .BridgeCache, ...
0
votes
2answers
72 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 ...
1
vote
0answers
73 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
4answers
74 views

Dynamically reference a file's name

In a single directory, I'd like to replace the first line of each file with the file's name. Each file has as the first line "TestRelation." I'd like to replace it with the file's name. I know I can ...
3
votes
0answers
40 views

How do I safely get multiple filenames from Zenity?

Zenity can be used to create a file selection dialog and select multiple paths. The separator for paths is specified using the --separator option. Therefore we can't use NUL, the only safe character ...