0
votes
1answer
44 views

How to extract the filename without the extension from a full path?

I'm trying to right my first bash script, and at one point a filename is passed to the script as $1. I need to extract the file name without the extension. Currently, I'm assuming that all extensions ...
1
vote
0answers
22 views

Linux - How to change default application for text files with custom extensions?

I do some creative writing and use PyRoom for most of my drafts. I want to save my drafts with a custom extension story(i.e. Persuasion.story) and associate story extension to PyRoom. I want to, ...
1
vote
2answers
154 views

Is there some way Linux editors can tell the programming language without the file extension?

I am editing some scripts on Linux without the languages file extensions, and it seems that the editors, namely vi, nano and gedit are not applying syntax highlighting because the filenames don't use ...
0
votes
2answers
604 views

Copy every file with a certain extension (recursive)

I need a script (may it be bash, ksh, or whatever) which copies, for backup purposes, all the sub-directories and files of a directory: .znc - but .log files. The structure is like this: ...
1
vote
1answer
1k views

How can I make locate/updatedb ignore certain file extensions?

For instance, I don't want either program to find files that end in *.pyc. I'm sure I can do this somehow using regexes or globs, but is there a way to make locate just ignore the files altogether? ...