RegEx expression to select folder path of a file type
location: linuxexchange.com - date: January 1, 1970
I am looking to make a Regex expression to find places where pdf files are referenced, and select their folder path.
For example for the expression "http://folders/../file.pdf" it should select
The issue is that I only want it to select pdf files and escape if it hits a second quotation mark ("http://folders/other" doesn't have anything get selected)
I currently have two regex expressions that each do half of what I want:
"(.[^"]*?)(?=\.pdf") selects all the paths that end with a pdf, but includes the filename.
"(.[^"]*[\/]) properly grabs just the folder path, but does it for all links.
Is there a way I can get a regex expression that selects just the folder path only when the file ends with a .pdf extension?
Folder turned into binary file type
location: ubuntuforums.com - date: August 2, 2014
Somehow my movie and TV Show folder was turned into a "binary file". It does not look like the files were deleted as the hard drive is still as full as it was before these binary files replaced the folder. When I click on the binary file I'm presented with a error message saying I don't have permissions. This is odd because when I check the permissions on the folder it says I am the owner. I have added some screenshots and would appreciate any help. Thank you in advance.
what regex expression replaces file extension using bash script
location: linuxquestions.com - date: January 13, 2010
What I was trying to ask is will anyone help me to complete a bash script that will take filename from the command line then do the conversion that I have asked it to do in the script and also assign a new extension of my choice that I will include in the script as in the following:
then the script will process and return a result with a new extension, sort of like this:
What I am doing now is entering the comand like this:
convert_this file.mp4 file.avi using the following script.
ffmpeg -i $1 -r 20 -vcodec mpeg4 -vtag DX50 -b 512k -acodec mp3 -ab 128k -bufsize 4m -qmax 51 -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -ar 44100 -g 300 -s 224x176 -aspect 4:3 -ac 2 -y $2
Using LS for a specific path & file type without returing full file path?
- date: August 11, 2013
I am writing a bash script and would like to use LS giving it a path/*.tar and have it return just file names instead of full path and file name to pass the file names through read into an array, below is what happens in terminal:
If i just use LS with a directory it returns:
:~$ ls /home/admin/Backup/
0_BuIndex.txt.backup Backup1376238064.tar Backup1376239611.tar Backup1376241919.tar
Backup1376167035.tar Backup1376238960.tar Backup1376240158.tar Backup1376243097.tar
Backup1376168581.tar Backup1376239110.tar Backup1376241421.tar
Backup1376237070.tar Backup1376239350.tar Backup1376241489.tar
Backup1376237928.tar Backup1376239479.tar Backup1376241608.tar
Giving path & file type it returns:
:~$ ls /home/admin/Backup/*.tar
How to delete all files expect specific file type in the folder using command line [closed]
location: linuxexchange.com - date: April 17, 2014
I have lot of files in specific folder.
I want to delete all files expect *.html file type in that folder.
Is there any way to do this in command line? I am using Linux.
partition file type choces
location: linux.com - date: November 30, 2010
I am putting Ubuntu on a Windows machine with the intention of having a dual-boot machine. I set a 20MB partition aside on my drive for Linux and in the process of installation it wanted to know what file format to use. There were about six choices.
So rather than choose the wrong one I bailed.
I have looked for an explanation about these choices without finding one. (The install process did not prompt the choice of one over another.)
Could someone link me to one?
It also seems that I need an additional swap partition - is 60MB adequate? And I assume it must be the same file format as the OS partition.
Unknown File Type.. Needs to be RAR and Cannot Extract
location: ubuntuforums.com - date: October 27, 2009
I've got a file split into several parts used with HJSplit.
for example, they are: file.rar.001, file.rar.002, file.rar.003, etc.
Ubuntu recognizes the first file, file.rar.001, as a rar file, and gives it the 'zipped' icon, and in it's properties, the file type is rar. However, for the rest of the files, file.rar.002 and on, the file type is unknown, and when I try to extract the files with Archive Manager, it asks me my password, then goes through file.rar.001 first, extracts everything from file.rar.001 into a folder, then doesn't continue after it hits file.rar.002.
When it fails, the folder that was created from file.rar.001 is erased.
how can I extract all the contents or get Ubuntu to recognize the rest of the parts as rar files rather than unknown files.
Unable to delete folder (.fusehidden* file)
location: ubuntuforums.com - date: May 30, 2011
I am running the latest version of Ubuntu (Ubuntu 11.04) which i setup as a dual boot OS with Windows XP SP3. I was listening to my MP3s using the Banshee music player on Ubuntu. My MP3s reside on an NTFS drive (which I mounted in Ubuntu to hear the MP3s). Via the Banshee player I deleted all songs from a particular folder and thought nothing of it until I later booted into Windows.
I saw the folder that had the songs I had deleted the songs and and thought I'd delete the folder as well except that I couldn't. It said the file might be corrupted. I logged backed into Ubuntu (Windows XP was shutdown not hibernated as I remember hearing that on Hibernating, you can't properly delete/copy files on Windows partitions). In Ubuntu too, I wasn't able to delete this folder - either via the Folder explorer or via terminal. I see a file named ".fuse_hidden0000041b00000017" along with some other files I had deleted (in Turquoise colour).
I didn't see any posts in this forum with a h
gedit cannot save text file, type mailbox file !
location: linuxquestions.com - date: September 19, 2009
I am using debian 10.
lately gedit cannot do the simple task of starting/saving a simple new text file!
Type become "mailbox file". Is my computer hacked into?
error: couldn't display "/home/user/finance/notes.txt
Is it all the updates giving problem?
Folder and file permission
- date: July 9, 2009
I have a folder 'wscale' with 777 permission.
out]# ls -lrt
drwxrwxrwx 2 tux tplinux 4096 Jul 9 00:53 agrdata
drwxrwxrwx 2 tux tplinux 4096 Jul 9 17:08 wscale
Now, I want to create a user to give read only permission to this folder. How can I do this? Any help will be much appreciated.
Page: 1 2 3 4 5 6 7 8 9 10