Tag Info

Hot answers tagged

5

The most straightforward option would be find: $ cd /usr/lib; find . . ./libxcb-icccm.so.4.0.0 ./libbz2.so.1.0.6 ./libdca.so.0 ./libxcb-composite.so ./libyajl.so ./libswscale.so ./libxvidcore.so.4.3 ./libjasper.so.1 ./libdrm_intel.so.1 ... It has various tests for filtering such as: -type to filter based on type (regular file f, directory d, etc.) ...


3

for dir in /A/*; do find "$dir" -mindepth 2 -depth -type d -exec mv -t "$dir" -- {} \; done This instructs find to search for all directories (-type d) at least 2 levels underneath (-mindepth 2) $dir depth-first (-depth). For each object it finds it runs mv -t "$dir" -- <SRC>. As always, mv doesn't allow you to merge a source directory into an ...


3

Try this workaround if it works for you. Make sure you have not activated unstable repos for different releases or pre-released updates but for 14.04 LTS recommended only check in --> system settings/software & updates. then run: sudo apt-get -f install sudo dpkg-reconfigure libc6 sudo dpkg-reconfigure libc-bin sudo apt-get install --reinstall libc6 ...


3

You have to use quotes if the path contains space characters: FILE_NAME="/home/$USER/Downloads/My Folder"


2

for i in {1..2} ; do cat *_$i.fastq.gz >>Combined_$i.fastq.gz ; done This probably won't work well, as concatenated gzip files ; I would imagine you would prefer to use zcat *_$i.fastq.gz >>Combined_$i.fastq & then gzip; or perhaps better, simply scrap the idea of cat & do this: for i in {1..2} ; do tar -c *_$i.fastq.gz ...


2

This answer is an edited version of this answer, but with the difference that this one is for Unity (instead of XFCE) and is to manage a set of (links to) folders per workspace, instead of application launchers. However, by uncommenting a line (see further below), you can also set a different set of application launchers per workspace at the same time. The ...


2

you can use GREP, I think this is the most simple solution, probably also add some other grep parameters to make the match more accurate tree | grep ABC


2

Find its inode number: stat '\home\profile\\blabla\' Then remove it by its inode: find . -inum [inode-number] -exec rm -i {} \; This will pass the inode number to rm.


2

Directory /opt is optional. It is not being used for anything in the standard Ubuntu distro so somebody decided not to create one. Not a big deal. Just create it with sudo mkdir /opt


1

I suggest mkdir --mode=755 /opt. Read/Write/Search for Owner (root:root), Read/Search for Group and Other. Allows root to create files/directories, allows anybody else to search and descend the directory tree under /opt (depending on lower nodes permissions)


1

Launch your file explorer as root using: gksudo nautilus This will open your file explorer, and grant it root, so it should be able to view/delete the directory/file. If you are like me, and don't care about the warnings in this question you can use this instead: sudo nautilus


1

From the Launcher click on System Settings -> under the System heading click User Accounts. A User Accounts window will open and you can select a user to view that user's account information, including Account Type, Language, Password (requires authentication), Automatic Login (ON/OFF), and Last Login. To view the user(s) information from the terminal ...


1

This isn't a great example for learning bash, but the simplest way is: zcat *_1.fastq.gz | gzip > Combined_1.fastq.gz & zcat *_2.fastq.gz | gzip > Combined_2.fastq.gz Using a loop: for f in *_1.fastq.gz; do zcat "$f" done | gzip > Combined_1.fastq.gz Notes you iterate over the results of a glob pattern -- do not be tempted to parse ...


1

The example at the top doesn't make it clear that "touch" sets the time of the directory (the new time in the listing was the same as the original, simply because the touch was so soon after the directory was created)... yes, the definition of "FILE" in the documentation does include directories, so you can use touch to change their timestamps, BUT... there ...


1

The issue is the embedded blank in the name. The simplest way to resolve this issue is to enclose the full path string with quotes (i.e. FILE_NAME="/home/${USER}/Downloads/My Folder" The reason to use " in your case is because of your use of $USER which requires a substitution, with ' this would not occur. A secondary question is how are you going to use ...


1

I'd rather recomment you to have different permissions for directories and files, because you'll need to run some commands inside of directory (like ls, cp, cat etc.), and they require "executable" permission. At the same time I strongly recommend you to add "executable" bit only to that files, that should be executable - some scripts, commands, etc. You ...



Only top voted, non community-wiki answers of a minimum length are eligible