Tag Info

New answers tagged

0

The cleanest solution would be of course to edit the code of gedit. Since that seems out of reach, the solution below is a workaround. If the path information of recently used gedit files is important to you, the soluution can be used as a replacement of gedit's own "recently used" overview. It gives you the information, exactly as it appears on your ...


1

A quick hack, just open all files you think you want, then at the top right menu you can find the path of each file, so you can keep what you want and close others.


4

If you are certain that your zip-archive contains only one file you can extract it to a different filename with unzip -p > thenewFile Explanation: -p tells unzip to extract the content directly to stdout which then gets redirected into a new file.


0

Have you tried unzip7? Install it first (enter this in the terminal): sudo apt-get install unzip and then use this command in the terminal: unzip (the zip file) -d (path to unzip) and it might work fine this way.


0

FINALLY from this afternoon until now, i found the caused. Just for sharing, maybe others might encounter this: but it seems quite funny, i just deleted a bunch of PDF files, PNG files and JPEG files. It's working fine now. i figured this out because every time i access desktop's file it hang. i run "sudo killall nautilus" it's working for a while, i can ...


6

You can trash files inside the trash (files inside /home/USERNAME/.local/share/Trash/files/). They will just disappear for a second and then come back to the same Trash folder. When I tried to trash the Trash folder itself (or its subdirectory "files"), I got an error by Nemo file manager that it got an illegal argument. So this seems not to work (at least ...


15

A Trash folder is first created when a user deletes a file. Within that folder are three directories: files, where the deleted files are stored until the trash is emptied; info, which stores information on where the files once were and when they were deleted; expunged, to which files are briefly moved when the trash is emptied (but may contain some owned ...


2

You could assign a group ownership to a parent folder and then make inside files inherit properties. Assigning group ownership could be set by sudo chmod -R 660 myself:somegroup /path/to/parent The group ownership can be inherited by new files and folders created in your folder /path/to/parent by setting the setgid bit using chmod g+s like this: chmod ...


0

TL;DR: it's ok, really What you have there is exactly the response that sudo apt-get install some-software-name gives. It's very common to use apt-get on Ubuntu as an alternative to Software Center, which is a bit slow. I don't understand why you are running some script, when you can just use sudo apt-get install package-name-1 package-name-2 package-name-3 ...


0

I came here to see where my files ended up but none of the answers hit the point, so for completeness: I am using blueman-manager with xfce on trusty and the files ended up in my home directory.


1

Assuming you are not talking about steganography, you can hide a big image in a bigger file (perhaps the opposite of your question), simply by concatenating it on the end of another smaller image. Though you wont fool ls you will fool many programs that display or manipulate the image, as they will only see the first part of the file and report the size of ...


1

NTFS has some feature called ADS (Alternate Data Stream) which allows you to add data to a file which has no impact on the displayed file size. Maybe something like this also exists for Linux file system like ext4?


0

No. The size of a file is the number of bytes it occupies. You cannot do something to your image file to somehow force the OS to report a different number of bytes than the data within the file occupies.


1

Type the following commands: cd ~/Downloads sudo rm -rf wubi.exe install boot (or whatever the file names are of the files still remaining) Done! ;)


0

You can connect both the devices to the same network and transfer files via SSH. On Ubuntu, install openssh-server. On your phone, install JuiceSSH. Then use scp to copy files.


0

Yes, there's a program, I heard something about that, as I know it's airdroid, check it on by clicking here.


2

You can use the file utility to attempt to classify a file based on a sequence of filesystem tests, magic tests, and language tests - for example $ file pynauty-0.5.tar pynauty-0.5.tar: POSIX tar archive (GNU) $ file opencv-2.4.10.zip opencv-2.4.10.zip: Zip archive data, at least v1.0 to extract When run on compressed files, the default is just to ...


0

You can check the file type with this command for an archive/file without an extension: % file tar-latest tar-latest: XZ compressed data or an other example: % file foo foo: Zip archive data, at least v2.0 to extract To list all archives find . -type f -exec file {} \; | awk '/compressed|archive/' Example % find . -type f ...


0

I was able to set an association like this: xdg-mime default xnview.desktop image/jpeg You can also remove associations and do other things: man xdg-mime I did not need to run sudo update-desktop-database.


2

In Unix like operating systems, if a file or folder starts with a period, it is declared as a hidden file. To show the hidden files do the following steps: Open the nautilus file manager which is called Files Now go to the directory where the hidden files are Now go to View>Show hidden files from the titlebar menu. Alternatively, you can press ...


0

Appears to be a problem with how the camera formats the XQD card. If I format the XQD card as exFAT on windows and then copy the exact same files onto it, it works. So it must be how either camera is formatting the card or how the camera is writing to the card.


0

If the directory is part of a filesystem mounted with CIFS (aka samba), and it contains a file that is a broken symbolic link, then ls fails to mention that file. (I observe this bug on a CIFS client running 14.04.2 LTS, and a server running 12.04.5 LTS.) So the directory is not empty, but (over CIFS) you have no way to see that. The file can only be ...


1

A quick and dirty way could be to clear the file, then set read-only permissions to that file with: echo "" > ~/.nano_history chmod 400 ~/.nano_history


4

Open the file /etc/nanorc (run sudo nano /etc/nanorc) and comment out the line set historylog in this section: ## Enable ~/.nano_history for saving and reading search/replace strings. set historylog Which should then look like this: ## Enable ~/.nano_history for saving and reading search/replace strings. # set historylog Then exit&save and you're ...


0

Of cause it depends on your connection like USB2/USB3 and the internal and external disk speed. But try to use rsync: rsync -arzv --progress /folder/source/* /folder/destination/ What connection do you have? What speed can you report? rsync - a fast, versatile, remote (and local) file-copying tool -a, --archive archive mode; equals ...


1

I'd suggest splitting the files into separate subfolders using the command line before proceeding to view your files. Its unlikely that you will be able to productively view and browse the images until you reduce the file count per folder. For example you can split the files by date. If there is a date stamp in the file, you can use a command like cd ...


5

These are hidden files and folders. Just press Ctrl+H and they will hide.


1

To to use files with spaces you can either use the escape character or youse the double quotes. example: cd new\ dir/ \ is called escape character, used to not expansion of space, so now bash read the space as part of file name. Or you can use: cd "new dir" Now to rename files, it's so easy to rename all files with spaces and replace space with ...


2

Although most answer above is correct, take a look for this command: A 0 byte sized file means an empty file though you can run this command: find . -type f -empty -delete this will delete all empty files. You can take a look for those files before delete: find . -type f -empty


0

To answer on how to get your Ubuntu version visible: System Settings > Details. So when you've obtained your Ubuntu version you can go on by setting up Bluetooth. I did some research and on Ubuntu 14.04 there is an issue on this. If that's your distro I would recommend installing another distro because it's not that stable yet. A distro close to Ubuntu: ...


0

If you run the command ld -lrt, ld creates a file "a.out" with the same hash. You probably created this file with a wrongly typed ls -lrt command.


0

Using python: #!/usr/bin/env python2 import os, re for root, dirs, files in os.walk('/path/to/directory'): for f in files: oldname = os.path.join(root, f) newname = os.path.join(root, re.search(r'(?<=/)[^/]+(?=\(\d+\)$)', oldname).group()) os.rename(oldname, newname) Considering the first part of file names are different (as ...


0

for i in *.text*; do mv "$i" "$(echo "$i" | sed 's/([0-9]\{1,\})$//')"; done just need to change the extension (.text or any other extension) according to need.


-1

This is "additional comment" and not a complete answer by itself. This is a really long way of 'explaining' a minor concept - it will appear long and pedantic except if the reader has missed the point. Short summary: If there are more than one file of name like foo.txt[(n)] foo.txt, foo.txt(1) -- rename -- > no change Appears that nothing happened. It ...


10

Start the one-liner in the folder where the files are saved or change the path for the find command. In the following examples find . the path is . (dot). Test with: find . -type f -print0 | xargs -I{} -0 rename -v -n 's/\([0-9]+\)$//' {} Rename with: find . -type f -print0 | xargs -I{} -0 rename -v 's/\([0-9]+\)$//' {} The command finds all files ...


0

Now I figured it out. It appeared to be rather easy. You should give your password to "unlock full access". Then all the files appear.


0

you can use the command: find . -type f -execdir mv '{}' /parent-dir \; man find -execdir utility [argument ...] ; The -execdir primary is identical to the -exec primary with the exception that utility will be executed from the directory that holds the current file. The filename substituted for the string ``{}'' is not qualified.


2

Using find + xargs + mv: find . -type f -print0 | xargs -0 -I file mv --backup=numbered file . This will move all the files in the current working directory and its subdirectories (recursively) into the current working directory, numbering files with the same filename numerically in order to avoid overwrites of files with the same filename. Sample ...


0

You can do this using find: find . -type f -exec mv -i -t new_dir {} + At first create the directory (mkdir new_dir) where you want to move all the files, here we are moving all the files in the ./new_dir directory. find . -type f will find all the files under all the directories under the current directory, so you need to cd into the directory that ...


0

I don't think it's possible to have both buttons and path at the same time. On a side note, another way to permanently enable the path instead of buttons is to use dconf, a "low-level key/value database designed for storing desktop environment settings". Install dconf-tools and launch dconf-editor: $ sudo apt-get install --yes dconf-tools $ dconf-editor ...


4

You can also do it directly in the shell. This could be useful if you don't want to delete empty hidden files (those whose name begins with a .). While you could do that with find as well, an alternative would be to use the shell itself: shopt -s globstar for file in **/*; do [ ! -s "$file" ] && [ -f "$file" ] && rm "$file"; done ...


26

Use the Find command to find files by size and print file names to standard output. find . -type f -size 0b -print substitute -print with -delete to delete the files rather than print them on screen. find . -type f -size 0b -delete


7

Find and remove all files with a size of 0 recursively: find . -type f -size 0 -print0 | xargs -I{} -0 rm {} Example: % ls -og total 4 -rw-rw-r-- 1 0 Jun 7 20:31 bar -rw-rw-r-- 1 5 Jun 7 20:29 foo % find . -size 0 -print0 | xargs -I{} -0 rm {} % ls -og total 4 -rw-rw-r-- 1 5 Jun 7 20:29 foo


0

I've experienced this bug that made my computer runs very slow. At first I thought it's because the new ppa I've just added. But then I discover that it's a bug that has been confirmed in the launchpad: https://bugs.launchpad.net/ubuntu/vivid/+source/apt/+bug/1445239 It turns out there's a problem in the ServerState::HeaderLine() where it parses ...


1

Connect the computers using your crossover cable (may not be necessary most modern ethernet cards should auto negotiate the connection see this Wikipedia article.) Setup both computers IPv4 settings: On the Ubuntu computer go to network connections and edit your current connection by doing the following: Select the IPv4 tab Select "manual" from the method ...


0

As my reputation level disallows me to comment, I'd like to suggest this to be a dublicate of the following post: Connect Ubuntu to other PC with direct (crossover) cable



Top 50 recent answers are included