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

learn more… | top users | synonyms

29
votes
10answers
12k views

Unix file naming convention

I was wondering what is the naming convention for files in Unix? I am not sure about this, but I think there is perhaps a universal naming convention that one should follow? For example, I want to ...
5
votes
3answers
442 views

How do I delete a file named “°” in bash

I've accidentally created a file named °. Now I'm having trouble deleting it with bash. [/opt/etc/sudoers.d] # ls -l -r--r----- 1 admin administ 21 Feb 3 23:54 010-root -rw-r--r-- 1 ...
7
votes
1answer
1k views

What does 'uni' mean in unistd.h

What does uni mean in unistd.h Does it mean unix? or universal? What is it?
6
votes
1answer
488 views

Why do some symbolic links affect program behavior?

One thing that has been puzzling me for some time is this: % which halt /sbin/halt % file /sbin/halt /sbin/halt: symbolic link to `reboot' However, executing sudo halt does, of course, not reboot ...
12
votes
1answer
2k views

What does *~ mean?

At the end of a makefile I saw rm -f *~ *.class I understand the *.class, but what's *~?
1
vote
3answers
1k views

How can I randomize file names in a given directory?

Ok, this may sound like an odd request but it really has a good purpose! I have a Panasonic Plasma TV with an SD card slot, via which I can display a slideshow of JPEG photos. This is useful for ...
17
votes
3answers
8k views

bulk rename (or correctly display) files with special characters

I have a bunch of directories and subdirectories that contain files with special characters, like this file: robbie@phil:~$ ls test�sktest.txt test?sktest.txt Find reveals an escape sequence: ...
4
votes
1answer
3k views

Recursively compare directory contents by name, ignoring file extensions

I have a directory containing about 7,000 music files. I used lame to recursively re-encode all files in it to a separate directory, outputting all files with the same relative path and file name. ...
8
votes
3answers
474 views

Why do tar and gzip files usually have a file extension?

File extensions are not necessary on unices, still every tarred, gzipped or bzipped file I encounter has a file extension like .tar, .tar.gz or .tgz. Is there any special reason for that or is that ...
1
vote
1answer
268 views

How can I grep through files whose name begins with `-`? [duplicate]

I've tried this. grep -r thanks * slave-iv grep: invalid option -- '@' Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more information. Here's ...
24
votes
3answers
14k views

What charset encoding is used for filenames and paths on Linux?

Does it depend on what file system I use? For example, ext2/ext3/ext4 but also what happens when I insert one of those "joliet" CD-ROMs with ISO 9660? I've heard that POSIX contains some sort of spec ...
56
votes
6answers
9k views

How does Linux handle multiple consecutive path separators (/home////username///file)?

I'm working on a python script that passes file locations to an scp subprocess. That's all fine, but I'm in a situation where I may end up concatenating a path with a filename such that there's a ...
17
votes
6answers
19k views

Grabbing the extension in a file name

How do I get the file extension from bash? Here's what I tried: filename=`basename $filepath` fileext=${filename##*.} By doing that I can get extension of bz2 from the path /dir/subdir/file.bz2, ...
8
votes
2answers
936 views

the slash (/) after a directory name on shell commands

I have a little question here. If I have two files, say filea and fileb, mv filea fileb would delete fileb rename filea to fileb Then if I have two directories, say dira and dirb, mv dira dirb ...
13
votes
6answers
1k views

Is there a terminal app that allows filenames to be clickable?

Is there a terminal emulator (extension or app) that does link resolution for local paths? In particular when I see things like: ...