date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,466,217,237,000 |
Today i downloaded the latest installer(eclipse-inst-linux64.tar.gz) of eclipse from the official website and i installed in my system. now i want to create a shortcut to launch the program. how can i do that ? if i double click on the eclipse file which is selected as the screenshot i am able to launch the program, s... |
You can create a .desktop file:
$ cd Desktop
$ touch eclipse.desktop
Open it with your favorite text editor (gedit, for example):
$ gedit eclipse.desktop
Add this to that file:
[Desktop Entry]
Type=Application
Name=Name of your application
Icon=/path/to/icon
Exec=/path/to/application
Finally, make it executable:
$ ... | How to create a shortcut for eclipse |
1,466,217,237,000 |
The idea is to be able to create a shortcut from context menu in order to access an application or even an internet link.
The gnome-desktop-item-edit (as indicated here) depends on the gnome-panel package that is not available on all systems.
Is there another way?
|
Create a new template file for a launcher
As indicated here, the ~/Templates folder can be used to add new options under the context menu 'New document'.
So:
gedit ~/Templates/New Launcher.desktop
with this content:
[Desktop Entry]
Type=Application
Name=
Icon=
Categories=System;Settings;
Exec=
Terminal=false
Open... | Add 'Create launcher' to Nautilus context menu (without `gnome-desktop-item-edit`) |
1,466,217,237,000 |
I have been wanting to inspect the executable lines from these application shortcuts for several applications as I am having trouble opening each, or would like to know what settings they use by default to start the program.
Any way, I would like to know how to do this. It is a common flow for me to see how the progr... |
You can install alacarte to you edit menu entries.
In Debian-based distributions:
sudo apt-get install alacarte
Otherwise, as you noted, the information is in .desktop files in the given locations (in particular, the Exec line).
I just do:
grep -iR "name that shows up in menu" ~/.local/share/applications /usr/share... | How can I view an application shortcut's content to find what exact executable line it runs? |
1,466,217,237,000 |
It is possible for the global shortcuts in the dedicated GUI.
Is it possible for the custom shortcuts too?
A similar option as above is not present in the KDE4 GUI for custom shortcuts.
But I imagine there must be some file to back-up.
|
The custom shortcuts seem not to be saved as an overall scheme, but as separate groups of shortcuts.
In the Custom Shortcuts window select Edit - New group, if you don't have one or more already.
Check to enable the group and then drag&drop the shortcuts you already have onto the group.
To save a group, right click o... | Export and import KDE custom shortcuts? |
1,466,217,237,000 |
Is there any way to have files in desktop in Elementary Luna OS. I have checked and tried installing tweak but couldn't move the files to desktop.
|
Actually this function has deliberately been omitted from elementaryOS. It was a specific design choice. But you can at least enable My Computer or Trash bin.
With Pantheon (the default file manager in Luna) you can’t bring files or folders onto the desktop. But in Nautilus, it’s possible. Run
sudo apt-get install gn... | Desktop shortcuts in Elementary OS |
1,466,217,237,000 |
In Gnome 3 you can enter dconf-editor and navigate through lots of settings. Amongst others you can navigate to /org/gnome/desktop/wm/keybindings/ to find that Alt+Tab brings up the application switcher. You can change the keybinding for the application switcher or even add new ones in addition to the ones already pre... |
I figured out a solution to this problem myself that don't even involve modifying the Gnome source code. It is not what I initially looked for but it works perhaps just as well. In dconf-editor in /org/gnome/dekstop/wm/keybindings/ I just changed the following two settings:
switch-applications=['<Super>Tab', '<Alt>Tab... | Changing keybindings for arrows in Alt+Tab application switcher in Gnome 3 |
1,466,217,237,000 |
Suppose I have an alias or a function defined in my .bashrc, that is not enough complex to write a single script.
Is it possible to bind that alias/function to the shortcuts facility provided by the graphical interface Gnome or xfce4 ?
|
Not sure about Gnome/XFCE specific options, but [xbindkeys] (https://wiki.archlinux.org/index.php/Xbindkeys) can do this. Configure it with a ~/.xbindkeysrc file and run xbindkeys during your X session.
From the default config file
# The format of a command line is:
# "command to start"
# associated key
W... | How can I use a keyboard shortcut from an bash alias or function ? |
1,466,217,237,000 |
I'm trying to launch a game from a symbolic link located on my desktop, but every time I do the game installs all its files onto my desktop. And when I try relaunching the game after moving all the files to the game folder, the game tries reinstalling the files again.
Is there any way I can fix this? Or are there an... |
A symlink already behaves like a Windows shortcut, as it contains only a path to the target file.
It just looks like the symlink is targeting the file to install the game instead of the file to run the game.
| Getting symbolic links to behave more like shortcuts in Windows [closed] |
1,466,217,237,000 |
Sorry if this seems a daft question but I'm still new to Linux. Is there an equivalent of a Windows Shortcut in Linux (as opposed to a link)
The problem I have is this:
I have an application that sits in /home/user/appDirectory/application.exe (its a Windows App running under Wine)
I then have a monitoring script that... |
Since your request seems to be for GUI only, I'd suggest following jofels comment about .desktop files.
Archlinux has a quite good short summary over the interesting keys in .desktop files.
A suggestion would be
[Desktop Entry]
Name=Whatever you want
Type=Application
Path=/home/user
Exec=env WINEPREFIX="<prefix>" wi... | Make a shortcut to a program that changes to its directory |
1,466,217,237,000 |
In Windows, there is a shortcut to open the application that is on the dock panel. For example, Super + 1 opens the first application, Super + 2 - second and so on.
Is it possible to do so in Deepin?
|
You can configure global shortcuts to "raise or run" any app. The best way I can think of is using the command wmctrl like this
wmctrl -xa Mail.Thunderbird || thunderbird
This tries to focus on Thunderbird window and otherwise runs the command after ||. You can see a list of your currently opened windows with:
wmc... | How to make shortcut in Deepin to open an application that is on the dock panel? |
1,466,217,237,000 |
I have created an application shortcut in Ubuntu like this:
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=bash -c 'echo $PATH;$SHELL'
Icon=/home/mani/Desktop/omnetpp-5.0/ide/icon.png
Terminal=true
Name=Sample Application
Categories=Development;Application
I saved it with sampleApp.desktop name. Double clicking... |
You just need to say that you want an (-i) interactive shell and it'll load up the extra files which express your shell preferences. So:
bash -i -c 'echo $PATH; $SHELL -i'
You could also just conditionally echo the path in your .bashrc or .bash_profile and use the environment to trigger that, something like:
if [ "" !... | Printing $PATH variable using desktop shortcut |
1,466,217,237,000 |
I want to create a sort of shortcut that when I write to it, it will write the same at X different places at the same time
For example KDenLive write /home/user/multiPlaces/untitled.mp4
So the OS write in /home/user/externalHardDrive/untitled.mp4, /home/user/cloudPlace/untitled.mp4 and /home/user/local/untitled.mp4
... |
Since you want to write to different disks which can be available just part of the time, what you need is file synchronization.
There are many options for this. Syncthing works for me although I don't sync local paths.
| write file to multiple places (different file-systems) [closed] |
1,466,217,237,000 |
I have created a desktop shortcut for a npm application called TMXEditor, but it doesn't work.
I can launch the app if I do cd /home/souto/Apps/maxprograms/TMXEditor && npm start on a terminal.
I put that in a bash file /home/souto/Apps/maxprograms/TMXEditor/start.sh. The application runs if I just run that script in ... |
Given that running it with the utility kioclient exec is almost in guaranty that the problem is some missing additions to the environment variables which can be checked comparing env in the terminal against env in the script that the Desktop file is referencing.
Note that adding a shebang in bash will do nothing about... | How can I start a NPM app from a desktop shortcut? |
1,466,217,237,000 |
I've installed a new version of an app.
Currently it's GUI shortcut leads to /usr/bin/flameshot
But I've installed it in a different path and now I run it from the terminal like this:
cd ~/Applications/Flameshot; ./Flameshot-0.10.1.x86_64.AppImage
How can I replace the GUI shortcut to run the new version without bloc... |
You don't need to cd at all. Just use the full path:
/home/YOUR_USERNAME/Applications/Flameshot/Flameshot-0.10.1.x86_64.AppImage
For example, if your username is elad, then you would put:
/home/elad/Applications/Flameshot/Flameshot-0.10.1.x86_64.AppImage
If you are unsure what the full path is, you can check by open... | How to run 2 lines in GUI command line shortcut |
1,466,217,237,000 |
I use the Cinnamon desktop environment, but shortcuts like Ctrl + Alt + T for opening the Terminal or Prt Sc for Print Screen don't work.
How can I set these two shortcuts in the Cinnamon desktop environment and other, but these two are the most important for me?
Versions of my software:
Debian 9.8 (x86-64)
Cinnamon... |
In my system it looks like this:
Applicatios (the Start Menu) -> Settings -> Keyboard -> Application Shortcuts tab -> Add button
And in command input we could to put this:
xfce4-screenshooter -fs '/home/user_name/Images'
command.
For another options look at a xfce4-screenshooter via comand line section.
| How do I set standard behavior for common shortcuts in Cinnamon? |
1,466,217,237,000 |
There is a feature in X11 that temporarily transforms your mouse pointer into a "kill X11 application" icon (I don't even know what to call it) and allows you to forcibly terminate a process that owns an X11 window. On occasion I've activated this feature accidentally and want to be able to do this consistently.
What... |
That's xkill. It is shipped with Xorg, which is the standard X11 server, so likely you already have it installed.
In any window manager or desktop environment, you can associate a shortcut with a command. The way that is done varies, look into the documentation.
| Terminate X11 Application with Mouse |
1,379,712,042,000 |
I run a VPS which I would like to secure using UFW, allowing connections only to port 80.
However, in order to be able to administer it remotely, I need to keep port 22 open and make it reachable from home.
I know that UFW can be configured to allow connections to a port only from specific IP address:
ufw allow proto ... |
I don't believe this is possible with ufw. ufw is just a frontend to iptables which also lacks this feature, so one approach would be to create a crontab entry which would periodically run and check if the IP address has changed. If it has then it will update it.
You might be tempted to do this:
$ iptables -A INPUT -p... | UFW: Allow traffic only from a domain with dynamic IP address |
1,379,712,042,000 |
How can I find out if my IP address is DHCP, Fixed or Dynamic?
I need to tell my network administrator what the IP address is, that my Virtual Machine is using. I know the numbers, but I don't know if it is fixed or not.
I have tried: ifconfig and that returned my IP address.
|
Right click on the Network Manager icon on Ubuntu top panel and select edit. Go to Wired Network or Wireless Network tab and select the network name. Click on the edit button and go to IPv4 settings tab on the new window. If the method is Automatic (DHCP) you are using dhcp.
Other method is cat /var/log/syslog and che... | How to find out if Ubuntu is using DHCP (Ubuntu 12.04 LTS GUI) |
1,379,712,042,000 |
The easiest/simplest understanding of the web is
a. When you connect to your ISP, the ISP gives a dyanmic address (like a temporary telephone number) only for the duration of that connection, the next time you connect, you will again have a different dynamic IP Address.
b. You use the browser to to different sites ... |
In addition to Tony´s answer, of querying OpenDNS, which I use in my scripts upon logging on to my servers to display both the local machine and remote public IP address:
echo `hostname` `hostname -i` `dig +short +time=1 myip.opendns.com @resolver1.opendns.com`
Google also offers a similar service.
dig TXT +short o-o... | Is there a way to find self's dynamic public ip address using cli in Debian? [duplicate] |
1,379,712,042,000 |
You all probably know commercial dynamic DNS providers like dyndns.org or no-ip.com.
But how to create a similar service for just a handful of machines?
What server software would be best suited for such a setup (under Linux)?
Advantages:
the service would be under your control
no tracking by some opaque company
Min... |
This depends on how similar to DynDNS.org this service should be.
For your seemmingly small use case I would propably set up a combined DHCP/bind-server (with Linux - what else).
The DHCP server is able to update your DNS-server that acts as primary server for a subdomain of "your" provider-domain. Make sure to regist... | How to create a custom dynamic DNS solution? |
1,379,712,042,000 |
A raspberry pi at home running Rasbian Jessie 8.0 is running Apache. Using dig TXT +short o-o.myaddr.l.google.com @ns1.google.com produces an IPv4 that is used to update the value in the record sets of the hosted zone in AWS's route 53 circled in red in the following image.
Testing the domain name is successful.
Wha... |
If you want to stick with AWS tools follow these steps:
Create an AWS IAM User, e.g. dns-updater and assign it this AWS managed policy: AmazonRoute53FullAccess. Generate secret and access keys for the user.
Install AWS-CLI (e.g. pip install awscli)
Configure AWS-CLI, enter the above secret and access keys: aws config... | How does one automatically update Route53 from a raspberry pi server at home? |
1,379,712,042,000 |
I am setting up a RHEL-based server that is associated with dynamic DNS from DynDNS, with a domain of, say, "abc.dyndns.org" that is dynamically updated with the server's IP address.
I have read that in order to ensure access to your server's services, you need to have at least the following in your /etc/hosts:
127.0... |
Some context:
When a program asks your machine to resolve a hostname into a IP address it looks into your /etc/hosts and, if not found, it then makes a DNS query.
You don't need to keep a non-loopback IP address on it. You can just usually keep the localhost entries and an alias.
See, that's my /etc/hosts contents:
[... | Hosts file on server with dynamic DNS? |
1,379,712,042,000 |
I intend to run a debian server at home, it will host various websites, SSH server and email.
I have a dynamic IP address and I am unwilling to pay the extra for a static IP.
I was thinking I could probably get around the DNS issue if I ran my own name server and used something like no-ip to set auto-updated nameserve... |
I do the following which has worked well for me the last 10+ years. I setup a dynamic DNS name on a service such as DynDNS (which was free until this year) or some other such provider. This gives me a foothold so that my constantly changing IP will always be rooted in a static name such as sam.dyndns.org.
I then creat... | Running my own dynamic DNS record hosting |
1,379,712,042,000 |
I'm very new to the networking side of the house and am trying to set up SSH on my new Ubuntu machine. I have my DD-WRT router working with DDNS now and can log in to the router page -- but I'm not sure how to go about forwarding it to my server machine. I realize I would forward port 22 over (or a unique port) -- bu... |
As long as the DD-WRT router is also the DHCP Server for the network, you can set up a static DHCP lease for the server in DD-WRT in Services > DHCP Server under the Static leases section. This will make sure that the DHCP server always hands out the same IP address for your server when it asks for a DHCP lease.
In o... | SSH Setup - How will the router know my computer's ip? |
1,379,712,042,000 |
First question I've asked here so please forgive me if I accidentally break a rule.
I recently set up an ssh server on my home machine, and am using ddclient to keep the dynamic DNS service at home_hostname.my_domain.me updated with the home machine's address. The domain and the dynamic DNS service are provided by Goo... |
Adding to John's answer, the problem ended up being that I had configured my ddclient incorrectly. Changing use=if, if=eth0 to use=web in ddclient.conf fixed the problem for me.
| ssh and VNC connections are directed back to the original machine by dynamic DNS server |
1,379,712,042,000 |
I am using Ubuntu 20.04 OS with dnsjava client library to query DNS servers.
I have nftables rule in this machine which block all traffic on ports except ephemeral port range 32768-61000 which will be used by dnsjava to get results from DNS server.
table inet tb {
chain input {
type filter hoo... |
Use stateful firewall rules. Connection state for stateful rules is handled by Netfilter's conntrack subsystem and can be used from nftables.
The goal is to allow (select) outgoing packets, let them be tracked (automatically) by conntrack and allow back as incoming packets, only those that are part of the flow initial... | How to avoid allowing ephemeral port range rule in nftables |
1,379,712,042,000 |
I have set up a local ssh server, which I like to access with this neat alias from my local network:
~/.ssh/config:
Host myserver-local
HostName 192.168.2.8
User iago-lito
Port 22
In order to access it remotely, I have set up a no-ip account to access it via a dyndns IP resolution, which I like to access with this ne... |
With a reasonably modern OpenSSH, you can run a shell command to select a Match block in ~/.ssh/config. Assuming you have a script am-on-home-network that returns 0 when executed on your home network and 1 when executed outside:
Match Host myserver exec "am-on-home-network"
HostName myserver
User iago-lito
Port 22
Ho... | Make hostname adapt to local/remote situation |
1,379,712,042,000 |
I'm setting up a couple of Raspberry Pi's on my router's DMZ (don't worry all the ports are closed); my router uses DNSMasq for DNS and so I added the MAC addresses; hostnames and IPs of the pi's to the dhcp static leases.
Now that said, I'm only learning to use dhcpcd; I'm used to the old way of using /etc/networkin... |
I am a bit confused about your setup. Maybe I am misunderstanding it.
Anyhow, the way it's normally done is to have one central place to configure everything (in your case, that should probably your router).
Then you don't have to care about the configuration of the RaspPi's. In fact, you can configure them identical... | Static IP and DHCP Lease in dnsmasq? |
1,379,712,042,000 |
I have set up a no-ip account to access my ssh server at home remotely with myserver.ddns.net, which works well.. from outside only.
From outside:
Remote ping:
$ ping myserver.ddns.net # success
Remote ssh:
$ ssh myserver.ddns.net # success
From local:
Local ping:
$ ping 192.168.2.8 # success
Local ssh:
$ ssh 192.1... |
The answer about accessing NAT from an internal network is, more correctly: you do not want to do that because of:
restrictions of consumer-grade technology;
performance reasons - NAT uses more CPU resources and memory - albeit in a domestic scale it is not worrisome;
routing more complex - either using and debbugin... | SSH and ddns: can connect remotely but not locally |
1,379,712,042,000 |
I want to know how do I make a website visible on internet hosted in my local machine using apache2 as a web-server. I'm completely new about this topics, and the thing is (just for practice and learn how it works) how can my IP resolve my domain name and once I type it on my browser can redirects me to my website.
I... |
You need to buy a domain name from domain register and you need to request your ISP provider for a static IP. Once you got the Domain Name and Static IP, you need to configure A record for the same in DNS server.
| Hosted apache2 website visible on internet [closed] |
1,379,712,042,000 |
My Internet provider uses NAT network to connect users. So, when I connect to the Internet, I got an 10.x.x.x IP address.
Is there any way to access Unix device in such type of network?
DDNS needs an external IP to get work, and I can't get it, even if I want.
Any ideas?
EDIT: And of course, the best solution is to ge... |
If your external IP (to your local network) is a non-routable address (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) then you cannot do this. DDNS provides a name->ip mapping but your bigger problem is that you are behind NAT. For inbound connections to work you need forwarding rules on the NAT gateway, which if your I... | DDNS unix device in 10.x network |
1,379,712,042,000 |
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName domain.no-ip.org
ServerAlias www.domain.no-ip.org
DocumentRoot /var/www/main
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel warn
CustomLog /var/l... |
You need no-ip.org to support your “www.” subdomain. You'll need to get the enhanced feature from no-ip.org for it to ever work.
Or alternatively (might be even cheaper), buy your own domain name and make the domain and all the subdomains you want point to your single no-ip.org address.
| Apache subdomain can not be resolved |
1,379,712,042,000 |
I have a DDNS service with noip.com, but the link I have is so hard to remember.
It's working, I can resolve it using resolveip link and I get the current IP of the router.
I tried to use /etc/hosts but it didn't work, it requires that I put an IP.
How can I give a short name to the DDSN link I have.
for example ping ... |
Just store the address in a variable and then you can ping that:
$ foo=unix.stackexchange.com
$ ping "$foo"
PING unix.stackexchange.com (104.18.43.226) 56(84) bytes of data.
64 bytes from 104.18.43.226 (104.18.43.226): icmp_seq=1 ttl=58 time=5.12 ms
64 bytes from 104.18.43.226 (104.18.43.226): icmp_seq=2 ttl=58 time=1... | short name a domain name |
1,379,712,042,000 |
The Internet or Web as I understand it runs on variety of servers. The browser is the client which gives a URI or URL which tries to go through varied ways to connect to the web-page and render the web-page. But sometimes, there is a failure. Sometimes, when it fails you get a 404 or some other service number but som... |
It could be done on a distributed system but that's not likely the case as it would make it more expensive and complicated to run. Even with a distributed system, you could never have enough servers to be perfectly aware of specific network outages. Furthermore, your total load and bandwidth would always be in funct... | can a service like isup.me be duplicated on the system for self? [closed] |
1,379,712,042,000 |
I have problems with my webserver. Normally you start the No-IP-DUC via sudo noip2. I tried to automate it with a cronjob. Using crontab -e, I created this file:
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when ... |
I found an alternative solution: I connected my router to No-IP, and it works now.
| Crontab for starting no-IP does not work [closed] |
1,379,712,042,000 |
I am sharing documents by running a hotspot in conjonction to dnsmasq that redirect all name queries to an IP <IP> where the documents can be found
create_ap wlan0 wlan0 HereAreTheDocuments
echo "address=/#/<IP>" >> /dev/dnsmasq.conf
service dnsmasq start
I need to force users connected to my hotspot to set my IP... |
I finally end up using dnsspoof in conjunction to dnsmasq.
Please tell if you have an alternative to dnsspoof.
| How to force machines connected to an AP to use the local AP DNS? |
1,629,526,887,000 |
The sdc1 was mounted on /media/debian/Ventoy.
debian@debian:~$ sudo blkid | grep Ventoy
/dev/sdc1: LABEL="Ventoy" UUID="F82D-76BE" BLOCK_SIZE="512" TYPE="exfat" PTTYPE="dos" PARTUUID="1af31d46-01"
debian@debian:~$ df /media/debian/Ventoy
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc1 1532... |
My eyes jump straight to the fact that your file name has a pipe | in it.
According to your output the file system type is exfat. FAT and its derivatives do not support inclusion of pipe, along with a few other things, in file names.
If you were to rename the file to strip the problematic characters I’d imagine you’d ... | Why can't I copy all files in a directory to a USB storage device? |
1,629,526,887,000 |
I'm trying to mount various SD cards automatically with udev rules. I started with these rules, solved a problem with the help of this question, and now I have the following situation:
ext4 and vfat formatted devices work perfectly, but when I plug in an exfat or an NTFS formatted disk I get the following line in moun... |
TL;DR: udev and fuse are not really compatible
After noticing that this problem not only occurs with exfat but also with NTFS formatted devices I started looking specifically for problems with udev and fuse.
Some comments about the combination I found:
I think that the fuse process is being killed. You cannot start ... | Mounting exfat with udev rules automatically |
1,629,526,887,000 |
User has a (incremental) backup script using rsync, to external device. This was erroring on an SSD he had. Turns out his device was formatted exFAT. That means I need to detect this in the script, as I need to alter the options to rsync (e.g., exFAT cannot handle symbolic links, no owner/group permissions, etc.).
... |
Thanks to the other posters for replying/suggesting. Here is my full solution.
df -P can be used to obtain device from path, and that can be fed to lsblk --fs to obtain exact file system. So a one-liner is:
fs=$( lsblk --fs --noheadings $( df -P $path | awk 'END{print $1}' ) | awk 'END{print $2}' )
If all you need ... | How to detect NTFS/exFAT file system type from script |
1,629,526,887,000 |
I am trying to mount an exfat drive using fstab with read/write permission for both user and group.
The line of etc/fstab for this drive is:
UUID=5E98-37EA /home/ftagliacarne/data/media exfat defaults,rw,uid=1000,gid=1001,umask=002 0 1
Using these option the drive gets mounted to the correct location to the correct u... |
chmod and chown will not work for mounted fat32, exfat and ntfs-3g, period.
What you're looking for is dmask=0002,fmask=0113.
| ExFat mount permission |
1,629,526,887,000 |
I have a 128 GB Micro SD Card that I formatted as ext4 and used in a Chromebook for an Ubuntu Chroot Environment. I used it for quite some time that way. At some point, I either deleted everything off of it or formatted it using the Chromebook's simple formatting system.
After this, I stuck it in a GoPro Hero Session,... |
Running testdisk on the ddrescue image as per the instructions in this guide, I was able to recover all files.
The initial quickscan did not detect anything useful, but after the quickscan, a deepscan option is available.
Deepscan detected three partition file systems-
ext4, exFAT, exFAT
ext4 was labeled Linux. I di... | SD Card Recovery without data loss or corruption |
1,629,526,887,000 |
I formatted an external hard disk on my ubuntu linux system with exfat.
First I installed the exfat utilities: sudo apt-get install parted exfat-utils
Then I partitioned the disk with a mbr boot record and one primary partition using parted
Finally I formatted the partition with mkfs.exfat -n ShareDisk /dev/sdX1
Th... |
I just spent the better part of a day solving this problem. Apparently, Mac OS is quite picky about how the partition was created and with which flags.
I was able to solve the problem by
Converting the boot record to GPT using sudo gdisk /dev/sdx as suggested here. Just exit gdisk right away with w. It will warn abo... | Mac OS cannot mount exFAT disk created on (Ubuntu) linux |
1,629,526,887,000 |
I came across a SSD which have a very significant performance drop (about 20 times). As there is an ExFAT filesystem used, I suspect it might be due to fragmentation.
Is there a tool available in the open source / free software world (= permissive or affordable license) to de-fragment the filesystem?
Yes, I know about... |
No.
The same applies to NTFS and FAT32. Actually AFAIK off all filesystems that Linux supports, only ext4 can be defragmented (only individual files one by one), and XFS (full defragmentation available).
As a last resort you could install a trial version of Windows 10 Enterprise and defragment from it. There is no bui... | Is there a defragmentation utility for ExFAT available in GNU/Linux world? |
1,629,526,887,000 |
I am running Fedora 35 and am trying to mount an exFAT drive, specifically an SD memory card for my digital camera.
The computer identifies the card reader as device /dev/sde1 and I am trying to use /lacie2 as the mount point.
This works correctly: sudo mount /dev/sde1 /lacie2 and I am able to access the drive. Typing... |
The mount fails because shortname is not a supported option for exfat (that's a vfat option). Remove it from your fstab and you should be able to mount the device.
wrong fs type, bad option, bad superblock on /dev/sde1, missing codepage or helper program, or other error.
In general, if you get this error (and the de... | Mounting exFAT drive on Fedora 35 requires specifying device |
1,629,526,887,000 |
$ apt-get install exfat-utils exfat-fuse
returns as output
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package exfat-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available f... |
Since Debian 11, exFAT is supported by the kernel. exfat-utils has been replaced by exfatprogs, you should install the latter instead. exfat-fuse is still available should you need it.
To mount an exFAT file system with the kernel driver, use
mount -t exfat /path/to/device /path/to/mountpoint
as usual; to mount it us... | Is exfat-utils missing in debian 12? |
1,629,526,887,000 |
Fresh install Ubuntu Server 20.04. cat /proc/filesystems shows exfat in the output. Not installed any other packages for exFAT as it should work from kernel.
Mounted 2 internal HDDs on in fstab as below
#INT-1TB-4K Internal HDD mount to /mnt/INT-1TB-4K
UUID=0E7E-6579 /mnt/INT-1TB-4K exfat defaults, permissions 0 0
#I... |
exfat behaves just like vfat and since it has no concept of permissions, chown and chmod both won't work.
You have to specify mount options such as uid, fmask and dmask, e.g.
defaults,noatime,nofail,uid=1000,fmask=0133,dmask=0022
(run id to find out what your ID is).
| Native exFAT support in 5.4 kernel - issues? |
1,629,526,887,000 |
I don't have permission to chown the mounted directory /mnt/hdd. I am currently logged in as root. The ls -l output is:
rwxrwxrwx 1 root root 131072 Jan 1 1970 hdd
I am mounting it via fstab config:
/dev/sda1 /mnt/hdd exfat-fuse defaults 0 0
I am trying to assign the owner of that drive to www-data via that comman... |
/mnt/hdd is an ExFAT filesystem, which does not actually have a concept of Unix-style file ownerships nor permissions, and so cannot store them. This is why your chown command is failing.
The ownerships and permissions displayed by ls -l are actually created on-the-fly by the exfat-fuse driver according to the mount o... | No permission to chown /mnt/hdd |
1,629,526,887,000 |
From a Phoronix article:
Long story short, with Linux 5.7 is a much better Microsoft exFAT
file-system implementation that is more reliable and with more
functionality than the older driver while it will continue to receive
improvements by Samsung and others.
What is exfat-utils is needed for if the Linux kern... |
The relationship is indeed the same as for other file system tools: exfat-utils provides tools to create, check (and repair), label, and dump ExFAT file systems. Like many other file system tools, they operate directly on the target devices, without using the kernel’s driver (if any); that’s one of the reasons why fil... | What is the relation between exfat-utils and the exFAT kernel driver? |
1,629,526,887,000 |
I have a folder under /mnt/ with drwxrwxrwx permissions and under root:root
I then mount a USB drive (exFAT) to this folder and it becomes drwxr-xr-x
The issue is that now I cannot scp to that folder via WinSCP since there is no permission for group to write to folder, and I am unable to scp as root user.
I am mountin... |
ExFAT filesystems don't support Unix permissions. The Unix permissions are set at mount time.
The ownership/permissions of the mountpoint (/mnt/USB) has nothing to do with whatever gets mounted over it. It's just a placeholder in the file tree.
To fix it now, try:
sudo mount -o remount,umask=0,dmask=0,fmask=0,uid=$(id... | Have drwxrwxrwx permissions on folder, but after mounting to it it becomes drwxr-xr-x which disalows members of the group to write. How do I fix it? |
1,629,526,887,000 |
I have a 2tb hard drive containing gpt and a single 2tb partition with ext4 file system. The partition has one 1.5tb file inside it. I want to change the type of file system of this partition from ext4 to exfat without deleting the 1.5tb file. Can I do that without writing a custom program?
|
There is a tool which some people have successfully used to convert Ext4 partitions to exFAT in place, fstransform. Note that the tool doesn’t officially support conversions to exFAT, and I haven’t tried it — but there are apparently reports of it working (with the --force-untested-file-systems flag).
In any case you ... | Change the file system of a partition without deleting its content |
1,629,526,887,000 |
I have read that support for the exfat filesystem has been incorporated in the Linux kernel since kernel ver 5.4 was released in late 2019 - early 2020. I'm confused about what this means wrt the exfat-fuse package. AFAIK, the exfat-fuse package existed prior to kernel ver 5.4, and was the ad-hoc method for mounting ... |
Fuse was added on 2005-09-09, that's probably Linux ~2.6.18, far earlier than Linux 5.4
Does incorporation of support for exfat filesystems mean that the exfat-fuse package is no longer required?
Both can be used but exfat-fuse has essentially been deprecated and superseded.
There is no mention of a filesystem-spec... | Kernel-mounted vs FUSE-mounted exfat filesystem |
1,629,526,887,000 |
after removing the default exfat-fuse package version 1.2.5 from my Debian Stretch system and replacing it with version 1.3.0, compiled from source, running mount using type exfat results to an unknown filesystem error. Checking with /proc/filesystems reveals that exfat is not listed.
Manually mounting exfat drives wi... |
Install or symlink it as /sbin/mount.exfat.
(I checked strace -f mount -t nosuchfs nowhere nowhere. It tries /sbin/mount.nosuchfs, /sbin/fs.d/mount.nosuchfs, and /sbin/fs/mount.nosuchfs only).
What's the worst that could happen :). If you forget and try to apt install exfat-fuse again, it's either going to give you ... | Configure mount to recognize self compiled fuse exfat |
1,629,526,887,000 |
I need to backup / copy the files of my Linux installation to an external drive, so that I can restore them onto the new, larger disk.
The destination disk for the restoration is twice as large, and will have larger partitions, ext4 and linux-swap. Imaging the entire disk or its first partition is not really a good ... |
Per @cat's comment, posting my comment as an answer -
Have you considered making a sparse file the size of your old installation, formatting it as a ext4 file system, and mounting on loopback, then copying to that? Would solve all the permissions loss, etc. issues. exFAT's filesize limit is 16EiB, surely large enough.... | Backing up Linux to a Windows file system for later restoration |
1,629,526,887,000 |
Considering the fact that exfat does not store ownership information of files, is it possible to mount an exfat partition in Linux with an allow_utime option that is also available for vfat? If not, is there a way to allow any process to use utime on any file in the filesystem?
I found an answer to this here, but this... |
It turns out that allow_utime does work with the kernel exFAT driver, but not the olf FUSE driver as far as I can tell. My real issue was that I was using FUSE to mount the filesystem. After uninstalling exfat-utils, the OS mounted the drive using the kernel driver instead of FUSE, and it was able to use allow_utime j... | Using allow_utime with exfat |
1,378,217,951,000 |
If I rename images via exiv to the exif date time, I do the following:
find . -iname \*jpg -exec exiv2 -v -t -r '%Y_%m_%d__%H_%M_%S' rename {} \;
Now it might happen that pictures have exactly the same timestamp (including seconds). How can I make the filename unique automatically?
The command should be stable in t... |
You may want to try jhead instead which does that out-of-the-box (with a, b... z suffixes allowing up to 27 files with the same date) and doesn't have the stability issue mentioned by @meuh:
find . -iname '*jpg' -exec jhead -n%Y_%m_%d__%H_%M_%S {} +
Or using exiftool (example in man page):
exiftool -ext jpg '-FileNam... | Rename images to exif time: Make unique filenames |
1,378,217,951,000 |
How can I recursively remove the EXIF info from several thousand JPG files?
|
The other ExifTool suggestions are great if you want to remove or change specific sections. But if you want to just remove all of the metadata completely, use this (from the man page):
exiftool -all= dst.jpg
Delete all meta information from an image.
You could also use jhead, with the -de flag:
-de D... | Batch delete exif info |
1,378,217,951,000 |
Let's say I have a bunch of photos, all with correct EXIF information, and the photos are randomly named (because of a problem I had). I have a little program called jhead which gives me the below output:
$ jhead IMG_9563.JPG
File name : IMG_9563.JPG
File size : 638908 bytes
File date : 2011:02:03 20:25:09
C... |
You can to it for all files using a for loop (in the shell/in a shell-script):
for i in *.JPG; do
j=`jhead "$i" | grep date | sed 's/^File date[^:]\+: \(.\+\)$/\1/'`.jpg
echo mv -i "$i" "$j"
done
This is just a very basic outline. Delete echo when you have verified that everything works as expected.
| How can I rename photos, given the EXIF data? |
1,378,217,951,000 |
How do I print the image Exif date with a tool like exiv2?
My goal is to write the image year and month into separate variables. Do I really have to parse the output with regex or is there a alternative to something like this:
exiv2 DSC_01234.NEF -ps | grep 'Image timestamp' | ...regex to parse the date
|
You can use the -g flag to output only the property you're interested in, and -Pv to print the value without any surrounding fluff. The result is easy to parse.
IFS=': '
set $(exiv2 -g Exif.Image.DateTime -Pv DSC_01234.NEF)
unset IFS
year=$1 month=$2 day=$3 hour=$4 minute=$5 second=$6
It may also be helpful to change... | Print specific Exif image data values with exiv2 |
1,378,217,951,000 |
curl -s -v -X HEAD http://sitename.com/123.jpg 2>&1 | grep '^< Last-Modified:' gets me a date. Any way I can retrieve gps coordinates of an image? Any other metadata?
|
What you are getting there is not the time at which the photo was taken. It is the time at which the 123.jpg file was last modified (or created/uploaded onto the server). That information comes from the web server, which gets it from the file's timestamps. The photo could very well be 10 years older than what you get.... | Extract latitude/longitude from an image using curl |
1,378,217,951,000 |
I can't make this work. I have a lot of images and i want to rename his name and append image size to name using exiv2
exiv2 pr * prints all info about file
# exiv2 pr 9b523e5a002268fe5067a928
File name : 9b523e5a002268fe5067a928
File size : 356433 Bytes
MIME type : image/jpeg
Image size : 1920 ... |
Use exiftool instead:
exiftool -ext '' '-filename<%f_${ImageSize}.${FileType}' .
Would rename all the images in the current directory (.).
| How to rename all files and add image size to file name |
1,378,217,951,000 |
Is there a way to extract EXIF information of all images within a directory (into an output file)? Preferably I also need GPS data but this is not essential.
I only ask, as I have a number of directories with a large number of image files within, so automating the EXIF extraction would be useful.
|
With exiftool:
exiftool -r . > exif.txt
(remove the -r if you didn't intend to recurse into sub-directories).
Note that GPS data usually is in EXIF tags.
| Collect EXIF data of a directory |
1,378,217,951,000 |
I am having issues when trying to return the one image file that fits the parameters. $1 is the search parameter, in this incident it is "real" which is a tag on one of the images (not two) in the given folder. What happens when I call it "./test.sh real" is it prints off both images, rather than just the one. I imagi... |
It is probably as you suspected, just a minor change to fix, try instead:
if [[ ! -z "$image" ]]; then
Explanation
Let's say when there is a match by exiftool and grep, then your $image variable contains this:
abcabcabc
But when there is no output, $image contains: (nothing)
In your test condition, you had:
if [[... | Bash script condition always passing even when grep should return nothing |
1,378,217,951,000 |
The output from exif looks like this:
ExifMnoteCanon: Loading entry 0xcf27 ('(null)')...
ExifMnoteCanon: Loading entry 0x3ca8 ('(null)')...
ExifMnoteCanon: Loading entry 0xf88a ('(null)')...
2013:08:22 18:01:16
In my bash script, I store this in a variable:
datetime="$(exif --debug --machine-readable --tag=DateTimeOr... |
Use ANSI C style escape sequence, $'\n' to indicate newline:
% echo "$datetime"
ExifMnoteCanon: Loading entry 0xcf27 ('(null)')...
ExifMnoteCanon: Loading entry 0x3ca8 ('(null)')...
ExifMnoteCanon: Loading entry 0xf88a ('(null)')...
2013:08:22 18:01:16
% echo "${datetime##*\n}"
ull)')...
2013:08:22 18:01:16
%... | Extract last line of multiline string |
1,378,217,951,000 |
I have analog camera and I give a film to the lab where they scan it, I wanted to upload it to flickr but want to change info about camera. Right now it's NORITSU KOKI QSS-32_33 and I wanted it to be pentax k1000 (I don't want to clear exif data). How can I do this from command line.
|
The tool you're looking for is called exiftool. You can use it to read & write exif meta data that's attached to a single image or a whole directories worth of files using its recursive switch (-r).
To change the camera model you can use the -model=".." switch.
Example
Here's an image before the change.
$ exiftool ff4... | How to change camera info in Exif using command line |
1,378,217,951,000 |
I'd like to get a list of all mp3 files with >320 bitrate. I'm not sure, how to apply the regular expression to the output of exiftool -AudioBitrate command.
find . -type f -name '*.mp3' -print0 | while IFS= read -r -d '' i; do
BITRATE=echo $(exiftool -AudioBitrate "$i")| grep -q '#([0-9]+) kbps#';
if $BITRATE >... |
Here is a bash script that works. It is basically what you have with a few tweaks:
#!/bin/bash
set -o pipefail
find . -type f -name "*.mp3" -print0 | while IFS= read -r -d '' file; do
BITRATE=$(exiftool -AudioBitrate "$file" | grep -Eo '[0-9]+ kbps' | sed 's/ kbps//')
if [[ $? -eq 0 ]] && [[ $BITRATE -ge 320 ... | List all mp3 files having over 320 kbps bitrate using bash |
1,378,217,951,000 |
On a Linux system,
I have a bunch of MP4 files named like 20190228_155905.mp4 but with no metadata. I've previously had a similar problem with some jpg's which I solved manually with
exiv2 -M"set Exif.Photo.DateTimeOriginal 2018:09:18 20:11:04" 20180918_201104.jpg
but as far as I can see, the DateTimeOriginal is only... |
This uses ffmpeg (sudo apt install ffmpeg to install) and works on your exact file names. It replaces your old files with new ones with the metadata set. Maybe try WITHOUT the && mv "~$f" "$f" part first:
$ for f in *.mp4; do ffmpeg -i "$f" -metadata creation_time="${f:0:4}-${f:4:2}-${f:6:2} ${f:9:2}:${f:11:2}:${f:13:... | Batch set MP4 create date metadata from filename |
1,378,217,951,000 |
I have a drone that I used to make a flight movie, and I am going to use this footage to build a DEM (digital elevation model) of the topography I was filming. I can extract frames from the movie easily enough, but the method (ffmpeg) does not give these frames the lat-lon-elev-etc information necessary to reliably bu... |
If you have the same number of photos as there are lines in the CSV file, then you can use a simple for loop:
for photo in *.png; do
IFS=" " read -r latitude longitude altitude time compHeading gimbHeading gimbPitch
exiftool -GPSLongitude="$longitude" -GPSLatitude="$latitude" "$photo"
done < test2.csv
| Shell script to add different GPS data to series of photos |
1,378,217,951,000 |
I know how to change a tag value, and how to extract tag values of a file from its metadata, and yes we have great tools like id3tag, exiftool, ffmpeg and etc.
But I need to add a completely new tag, not change an existing one.
For example, consider a situation that we have a .mp3 file and it has 4 tags for its metada... |
TL;DR You cannot define your own ID3Tags, you must us the ones defined in the spec. Since a tag for Audio Bitrate is not defined, you're out of luck. That is not a problem with other audio containers (ones which use a different tag/comment system).
Your major problem is that ID3 tags are a fixed specification. The ... | Add a new custom metadata tag |
1,378,217,951,000 |
I have taken 300 photos at an event. Afterwards I noticed that the date was set incorrectly in the camera - one day off. There are lots of EXIF data in the files, not just creation dates.
How can I change only the dates contained within all relevant EXIF fields to correct the date (minus one day exactly)?
No other d... |
Exiftool has an -alldates parameter:
exiftool -alldates-=24 -filemodifydate-=24 -filecreatedate-=24 *.jpg
The above code works to subtract 24 hours according to this Forum comment (by Phil Harvey):
https://exiftool.org/forum/index.php?topic=6330.msg31354#msg31354
You can combine the above code with an -out file spe... | How to batch change exif data for JPEG photo files (wrong date set in camera)? |
1,378,217,951,000 |
I need to add a tag named "Image Description" to a picture. However, nothing is changed. What am I missing?
cd /tmp/
wget https://i.imgur.com/jGwDTpL.jpg
pic=jGwDTpL.jpg
exiftool -Exif:ImageDescription-="foo" $pic
exiftool -Description-="foo" $pic
exiftool $pic | grep "Image Description"
|
The -= operation is remove. To add a tag, just assign it:
exiftool -Exif:ImageDescription="foo" -Description="foo" "$pic"
exiftool "$pic" | grep "Image Description"
Remember to double-quote your variables ("$pic" in this example) to protect them from shell expansion and globbing
exiftool documentation is available as... | Add an exif tag to a picture using exiftool |
1,378,217,951,000 |
How can I find all groups of images which have the same exif timestamp in a given directory from the command line in linux?
|
Well, let's say you are using exiftool and a command like
exiftool -sep $'\t' -T -filename -createdate dir
This prints one line per image in directory dir with the filename and its creation timestamp. I don't know if this is the timestamp you had in mind but you can always change that field.
Pipe output of that comma... | Find images with same exif timestamp |
1,378,217,951,000 |
I have bunch of .JPG, .NEF and .MOV files made with my Nikon DSLR, named as DSC_0001.JPG, DSC_0002.JPG and so on. After certain number is reached, new directory is made and number count restarted, which leads to duplicates when I move them into one big directory.
I figured out, using bash, how to name them after their... |
The way you're doing it runs crc32 on all files at the same time, producing one string with all the checksums and filenames. That's the string you see that mv complains about.
So, run crc32 inside the loop. Assuming your files are in subdirectories of the current directory (so, ./dir0001/DCIM_0000.JPG, ./dir0002/DCIM_... | How to rename a file to its creation date and hash value combined in order to achieve unique filename? |
1,378,217,951,000 |
I have over 80,000 photos that have been given proper EXIF keywords but Google Drive requires data in the Description for it to be searchable in their online app. I need to copy the contents of the Keywords entry to the description on this mass of photos that goes deep into sub directories.
|
Using ExifTool you could just run:
exiftool -TagsFromFile file.jpg '-Keywords>Description' file.jpg
You can find more info in the manpage for exiftool.
| Copy EXIF meta data from the Keywords to the Description on a huge amount of photos in sub folders |
1,378,217,951,000 |
There is a set of photos with timestamps in their filenames like these:
Photo on 3-09-12 at 9.24 PM #2.jpg
Photo on 3-09-12 at 9.24 PM #1.jpg
Photo on 3-09-12 at 8.23 PM.jpg
etc.
("3-09-12", means "3rd Sep 2012" or DD-MM-YY)
But these photos have no EXIF data at all. Before you imported them to a larger collection,... |
Try:
exiftool '-CreateDate<${FileName;use Date::Manip;
Date_Init("DateFormat=non-US");
/on (.*at.*?)(?: #\d+)?\.jpg$/;$_=$1;
y/./:/;$_=UnixDate($_,"%Y-%m-%d %T")
}' ./*on\ *at*.jpg
(you may have to install the Date::Manip perl mod... | Using EXIFTool to add EXIF data from filenames |
1,378,217,951,000 |
I'm using exiv2 0.27.2. I want to print the tag values of multiple webp files, but without the filename being printed.
With the following command:
exiv2 -g Exif.Image.Artist -Pv *.webp
I get the following output:
3q2NIGNI_o.webp tomato
3qAwrJWu_o.webp orange
3qDZg9vz_o.webp cantelope
I just want th... |
You either post-process the output with a tool like sed etc
exiv2 -g Exif.Image.Artist -Pv ./*.webp | sed 's/.*\.webp[[:blank:]]*//'
or use a loop to pass a single file at a time:
for f in ./*.webp; do exiv2 -g Exif.Image.Artist -Pv "$f"; done
or use exiftool e.g.
exiftool -q -p '$Exif:Artist' ./*.webp
| Exiv2: How to print tag values without printing the corresponding filenames |
1,378,217,951,000 |
I have been scratching my head on this for quite some time now. Let's see what mediainfo says on an image -
$ mediainfo ZQs3vcsHiGY.jpg
General
Complete name : ZQs3vcsHiGY.jpg
Format : JPEG
File size : 895 KiB
Image
Format ... |
What you're looking for is for mediainfo to support EXIF metadata (which is not one of the listed proposals on that page as far as I can tell). You should suggest it to them if you want the feature.
| why does mediainfo not give metadata of an image like exiftool does? |
1,378,217,951,000 |
This is how you can rename all Jpegs in a folder by geolocation and date:
exiftool '-filename<${gpslatitude;} ${gpslongitude} ${datetimeoriginal}' -d "%Y-%m-%d %H.%M.%S%%-c.%%e" *.JPG
this results in very long filenames like
53 33 36.95000000 N 9 58 29.37000000 E 2015-11-04 19.22.49.JPG
How can I use the short locat... |
This will result in a shorter version:
exiftool -coordFormat '%.4f' '-filename<${gpslatitude;} ${gpslongitude} ${datetimeoriginal}_$filename' -d "%Y-%m-%d_%H.%M.%S%%-c.%%e" *.JPG
But it still adds the compass point N,E,S or W
If you want to add the city, this could be added with a loop, using the nominatim API:
#!/bi... | use `exivtool` to rename Photos by location |
1,378,217,951,000 |
Imagemagick 6.9.11-60 on Debian. How to print date & time the photo was taken on the image? (on existing images). I have set this option in camera settings, but it only applies to new photos. The date is on the image medatada. It should be actual date the photo was taken, not the date it was saved on PC harddrive.
|
A lot will vary depending on the images you have and the meta-data they hold, but for example with ImageMagick you can imprint the EXIF date and time from myphoto.jpg with
magick myphoto.jpg -fill black -undercolor white -pointsize 96 -gravity southeast \
-annotate 0 ' %[exif:datetime] ' output.jpg
If you don't have... | Imagemagick, how to print date the photo was taken on the image |
1,378,217,951,000 |
There is no subtitle meta tag for pdf in exiftool. Therefore I want to add new exif tag for pdf files, it's name must be PdfSubTitle. To do this, exiftool has a guide page. But I don't understand because my knowledge of perl and exif not enough. Also there is no example for pdf files in the guide. How can I do that?
W... |
First you need to define your XMP tag (a complete example here)
$ cat config.cfg
%Image::ExifTool::UserDefined = (
'Image::ExifTool::XMP::pdfx' => {
PdfSubTitle => {
Writable => 'string',
},
},
);
1; # end
Then with following command the tag and it's value will be added:
exiftool ... | how to i create new exiftool tag for pdf files as using exiftool config file on gnu/linux? |
1,378,217,951,000 |
Possible Duplicate:
Batch delete exif info
How can I remove all tags from images under a directory (using Linux)? I can find all files with something like find pictures -type f -iname "*jpg" -exec FOO "{}" \; but what should FOO be?
|
exiv2 rm it is available in many platform.
Exiv2 is a C++ library and a command line utility to manage image metadata.
| Removing all tags from images [duplicate] |
1,378,217,951,000 |
I am trying to have some stability in image orientations but they differ in Debian image viewer/LaTeX and with image viewers.
I do but it does not have an effect on the orientation of wrongly positioned images; manually adjusting it with -Orientation=[1234] does not help
exiftool -Orientation=1 -n *.jpg
Fig. 1 Outp... |
I did not manage to solve the problem by ridgy's answer.
I managed to solve it in the end by LaTeX in the thread How to rotate image 90 if height overful?
The case where both picture dimensions are bigger than page size is unsolved in the thread.
exiftool is about one file. To have pictures relationally nice on the pa... | Why exif Orientation does not force image horizontal? [duplicate] |
1,378,217,951,000 |
I've been coming up with a script to remove any EXIF/IPTC/XML meta data from a JPEG file that equals 'OLYMPUS DIGITAL CAMERA'. For those who aren't aware, Olympus cameras set this attribute in all photos with no option to turn it off. Worse still, although I have set up a Lightroom preset to remove it on import, or wh... |
I've taken your requirement and written a fresh script. You may want to customise the set -- . so that the dot is replaced by the default path to the images. Or you can provide the images directory on the command line
#!/usr/bin/env bash
#
export PATH=/opt/bin:$PATH # Prefer commands from Entware
[[ $# -eq ... | Removing multiple attributes simultaneously via exiftool |
1,378,217,951,000 |
Hello I am writing a bash script, this script must give ID to pdf file. How do I solve the this, is there a way?
Example as using bash shell.
Document ID is:
$ exiftool example.pdf | grep 'Document ID'
Document ID : uuid:d037451d-240e-4d82-ba6d-92390b1d2962
For example:
$ pdftool --setDocID "newID" example.pdf... |
exiftool -DocumentID="uuid:$newID" example.pdf
see examples on man exiftool
| How to I set document ID or ID to PDF file via terminal? |
1,543,070,625,000 |
I know I can find files using find: find . -type f -name 'sunrise'. Example result:
./sunrise
./events/sunrise
./astronomy/sunrise
./schedule/sunrise
I also know that I can determine the file type of a file: file sunrise. Example result:
sunrise: PEM RSA private key
But how can I find files by file type?
For example... |
"File types" on a Unix system are things like regular files, directories, named pipes, character special files, symbolic links etc. These are the type of files that find can filter on with its -type option.
The find utility can not by itself distinguish between a "shell script", "JPEG image file" or any other type of ... | How to find files by file type? |
1,543,070,625,000 |
I need to recognize type of data contained in random files. I am new to Linux.
I am planning to use the file command to understand what type of data a file has. I tried that command and got the output below.
Someone suggested to me that the file command looks at the initial bytes of a file to determine data type. The ... |
file uses several kinds of test:
1: If file does not exist, cannot be read, or its file status could not be determined, the output shall indicate that the file was processed, but that its type could not be determined.
This will be output like cannot open file: No such file or directory.
2: If the file is not a regu... | Linux file command classifying files |
1,543,070,625,000 |
I was reading about the file command and I came across something I don't quite understand:
file is designed to determine the kind of file being queried.... file
accomplishes this by performing three sets of tests on the file in
question:
filesystem tests,
magic tests,
language tests
What are magic tests?
|
That refers to the "magic bytes" which many file formats have at the beginning of a file which show what kind of file this is.
E.g. if a file starts with #! then it is considered a script.
| What does “magic tests” mean for the file command? |
1,543,070,625,000 |
Why does file xxx.src lead to cannot open `xxx.src' (No such file or directory) but has an exit status of 0 (success)?
$ file xxx.src ; echo $?
xxx.src: cannot open `xxx.src' (No such file or directory)
0
Note: to compare with ls:
$ ls xxx.src ; echo $?
ls: cannot access 'xxx.src': No such file or directory
2
|
This behavior is documented on Linux, and required by the POSIX standard. From the file manual on an Ubuntu system:
EXIT STATUS
file will exit with 0 if the operation was successful or >0 if an error was encoun‐
tered. The following errors cause diagnostic messages, but don't affect the pro‐
gram exi... | Why does "file xxx.src" lead to "cannot open `xxx.src' (No such file or directory)" but has an exit status of 0 (success)? |
1,543,070,625,000 |
Consider the shared object dependencies of /bin/bash, which includes /lib64/ld-linux-x86-64.so.2 (dynamic linker/loader):
ldd /bin/bash
linux-vdso.so.1 (0x00007fffd0887000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f57a04e3000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f57a0... |
Yes, it links itself when it initialises. Technically the dynamic linker doesn’t need object resolution and relocation for itself, since it’s fully resolved as-is, but it does define symbols and it has to take care of those when resolving the binary it’s “interpreting”, and those symbols are updated to point to their... | How can the dynamic linker/loader itself be dynamically linked as reported by `file`? |
1,543,070,625,000 |
I have a number of files (Jupyter notebooks, .ipynb) which are text files. All of these contain some LaTeX markup. But when I run file, I get:
$ file nb_*
nb_1.ipynb: ASCII text
nb_2.ipynb: ASCII text
nb_3.ipynb: ASCII text, with very long lines
nb_4.ipynb: LaTeX document, ASCII text, wit... |
The file type recognition is driven by so-called magic
patterns. The magic file for analyzing
TeX
family source code contains a number of macro names that cause
a file to be classified as LaTeX. Each match is assigned a
strength, e. g. 15 in case of \begin and 18 for
\chapter. This makes the heuristic more robust agai... | How does the file command distinguish text and LaTeX files? |
1,543,070,625,000 |
I have an image archive I keep up. Sometimes, the sites I pull them from reformat the file while keeping the extension the same, most often making PNG images into JPG's that are still named ".png". Is there a way to discover when this has happened and fix it automatically?
When on Windows, I used IrfanView for this, ... |
You can use file command:
$ file file.png
file.png: PNG image data, 734 x 73, 8-bit/color RGB, non-interlaced
$ mv file.png file.txt
$ file file.txt
file.txt: PNG image data, 734 x 73, 8-bit/color RGB, non-interlaced
The file does some tests on file to determine its type. Probably the most important test is comparin... | Finding a file type assuming wrong extension |
1,543,070,625,000 |
I am looking for a way to determine file types in a folder with thousands of files. File names do not reveal much and have no extension, but are different types. Specifically, I am trying to determine if a file is a sqlite database.
When using the file command, it determines the type of 2-3 files per second. This seem... |
2-3 files per second tested with file seems very slow to me. file actually performs a number of different tests to try and determine the file type. Since you are looking for one particular type of file (sqlite), and you don't care about identifying all the others, you can experiment on a known sqlite file to determine... | Fast way to determine if a file is a SQLite database |
1,543,070,625,000 |
Why doesn't the following return text/csv?
$ echo 'foo,bar\nbaz,quux' > temp.csv;file -b --mime temp.csv
text/plain; charset=us-ascii
I used this example for extra clarity but I'm also experiencing the problem with other CSV files.
$ file -b --mime '/Users/jasonswett/projects/client_work/gd/spec/test_files/wtf.csv'
t... |
Unfortunately, there is probably nothing you can do to make file produce the correct output.
The file command tests the first few bytes of a file against a database of magic numbers. That is easy to check for in binary files (like images or executables) which have some specific identifiers at the beginning of the file... | file command apparently returning wrong MIME type |
1,543,070,625,000 |
I'm running file against a wallet.dat file (A file that Bitcoin keeps its private keys in) and even though there doesn't seem to be any identifiable header or string, file can still tell that it's a Berkley DB file, even if I cut it down to 16 bytes.
I know that file was applying some sort of rule or searching for som... |
Grab the source of the file command. Most if not all open sources unices use this one. The file command comes with the magic database, named after the magic numbers that it describes. (This database is also installed on your live system, but in a compiled form.) Look for the file that contains the description text tha... | How did file identify this particular file? |
1,543,070,625,000 |
Can I use file and magic ( http://linux.die.net/man/5/magic ) to override the description of some other known formats ?
for example, I would like to describe the following formats:
BED: http://genome.ucsc.edu/FAQ/FAQformat.html#format1
Fasta : http://en.wikipedia.org/wiki/FASTA_format
...
that are 'just' text file... |
You can use the -m option to specify an alternate list of magic files, and if you include your own before the compiled magic file (/usr/share/file/magic.mgc on my system) in that list, those patterns will be tested before the "global" ones. You can create a function, or an alias, to transparently always transparently ... | file(1) and magic(5) : describing other formats |
1,543,070,625,000 |
I am writing a menu based bash script, one of the menu options is to send an email with a text file attachment. I am having trouble with checking if my file is a text file. Here is what I have:
fileExists=10
until [ $fileExists -eq 9 ]
do
echo "Please enter the name of the file you want to attach: "
read attachme... |
The problem occurs in cut -d\ -f2. Change it to cut -d\ -f2.
To cut, the arguments look like this:
# bash: args(){ for i; do printf '%q \\\n' "$i"; done; }
# args cut -d\ -f2
cut \
-d\ -f2 \
And here is the problem. \ escaped the space to a space literal instead of a delimiter between arguments in your shell, and yo... | Bash script: check if a file is a text file [closed] |
1,543,070,625,000 |
I have a list of files and I need to find all the image-files from that list.
For example, if my list contained the following:
pidgin.tar.gz
photo01.jpg
picture01
screenshot.gif
invoice.pdf
Then I would like only to select:
photo01.jpg
picture01
screenshot.gif
Notes:
Method must not be dependant on file extensions... |
The following command lists the lines in list_file that contain the name of an image file:
<list_file xargs -d \\n file -i | sed -n 's!: *image/[^ :]*$!!p'
file -i FOO looks at the first few bytes of FOO to determine its format and prints a line like FOO: image/jpeg (-i means to show a MIME type; it's specific to GN... | How to find image files by content |
1,543,070,625,000 |
I want to do a loop for all the images in a directory. The images doesn't have extension so I have to read the first bytes of the image to know its type. The loop should end up being something like.
for file in *
do
if [ file --mime-type -b ]
then
***
fi
done
|
Using the case statement and command substitution :
for file in *; do
case $(file --mime-type -b "$file") in
image/*g) ... ;;
text/plain) ... ;;
application/xml) ... ;;
application/zip) ... ;;
*) ... ;;
esac
done
Check :
http://mywiki.wooledge... | How to check the file type in a script |
1,543,070,625,000 |
Sometimes it seems that the standard file command (5.04 on my Ubuntu system) is not sophisticated enough (or I am just using it wrong, which could well be).
For example when I run it on an .exe file, and I am quite positive that it contains some archive, I would expect output like this:
$ improved-file foo.exe
foo.exe... |
I can't think of an all-in-one tool, but there are programs that can cope with a large array of files of a given category.
For example, p7zip recognizes a large number of archive formats, so if you suspect that a file is an archive, try running 7z l on it.
$ 7z l ta12b563enu.exe
…
Type = Cab
Method = MSZip
…
If you s... | More sophisticated file command for deep inspection? |
1,543,070,625,000 |
Searching, googling, I could not find any information about file types recognized by file.
For example, an *.mp4 file is identified as "ISO Media" (while being able to play with VLC normally). This is not 100% clear, it somehow leaves me to wonder whether it's a correct detection or the file is confused for ISO imag... |
The type detection information isn't actually embedded in the file program, the file program just reads the magic file and then searches the signatures in that file to see what matches.
The magic file exists both as a compiled version, magic.mgc, and as the original source that is human readable and is just called mag... | How to find human-readable information about file types recognized by `file`? |
1,543,070,625,000 |
I would like to write the format of a drawing with "file drawing"
Files start like:
CAD
A1
mm
(Blank after A1)
or:
CAD
A00
m
(Blank after "m")
I tried somethings like in the file magic:
0 string CAD\n CAD-Drawing
>&0 regex ^A[0-9]+ Format=[%s]
>>&0 search \n
>>>&0 regex ^[a-z]+ Units=[%s]
... |
Regexes in man magic are not extensively detailed. But have a look at this brilliant answer by JigglyNaga.
For a start you need to escape several characters in regexes in magic files: ^, + and spaces are examples. Here are two ways of making your magic file work for the files you describe:
0 string CAD\n ... | how can I read a number with file (magic)? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.