Hot answers tagged

24

You renamed the directory cakephp in /opt/lampp/htdocs/cake to .... Your command was perfectly valid, therefore it did not produce an error. You should be able to find the directory at /opt/lampp/htdocs/cake/.... Note that files/folder starting with a dot are hidden (hence you need to use, e.g., ls -a /opt/lampp/htdocs/cake to see it).


10

touch is not able to create directories, you need mkdir for that. However, mkdir has the useful -p/--parents option which creates a full directory structure. From man mkdir: -p, --parents no error if existing, make parent directories as needed So the command you need in your specific situation is: mkdir -p ~/Desktop/a/b/c/d/e/f/g/h/ &&...


5

Your second output, du -s Folder is in kilobytes not megabytes. That is the default output for du. To convert to MB divide by 1024: 120664/1024 = 117.8359375, with the h flag this gets rounded up to 118MB. You can also view the size of the folder in Bytes with du -sb Folder. The du utility gives you the amount that is actually used by the disk. The value ...


3

Check out the suggested answers before posting. The first suggested answer is this one: Split a large file into smaller files and then integrate them to get the original file And here the commands split -b 20M -d bigfile bigfile-part cat bigfile-part* > bigfile Edit: ... and for the hashsum part, you can generate a SHA512 checksum file from the ...


3

Check that the file bios.rom is actually in the current working directory ~/Desktop by typing ls. If you can see the file bios.rom, you just need to put a / at the start of the path to mv to sudo mv bios.rom /usr/share/higan/GameBoyAdvance.sys if the directory name has spaces in it like Game Boy Advance.sys, you need to use the \ character to escape them ...


3

The problem on your system is that your umask settings are a bit strange/messed up. For general information about umask please refer to What is "umask" and how does it work? In short we can say that the umask defines the default permission set for new files. It is configured in /etc/login.defs. The default value for umask is 022 which results in ...


3

One way would be to use find's -exec action to execute a custom test of the number of files. One could use a second find command along with wc to find and count files within each directory, but probably a better option would be to shell globbing to slurp the filenames into an array, and then return a logical value indicating whether the size of the array is ...


2

I've coded two small scripts that can be used for that. First, put the script (name it 'splitter' or anything you like) in a separate folder with the file to be splitted then in the bash run: ./splitter FILE SIZE Being FILE the file to be split and SIZE the size in MB. After that, you will see all the splitted blocks (SPLITTED_FILE.aa, SPLITTED_FILE.ab, ...


2

My first recommendation is ANGRYsearch. Superfast, fully configurable. You can find the official website here. To install, you need some dependencies (if not there already). In a terminal type: sudo apt install python3-pyqt5 Then, download latest release from here. Unzip in a folder, and then from a terminal inside that folder type: chmod +x install.sh ...


2

With xmlstarlet: xmlstarlet ed --inplace -u '/task-arguments/argument[@name="protocol"]/@default-value' -x 'string("tcp")' file.xml xmlstarlet ed --inplace -u '/task-arguments/argument[@name="port"]/@default-value' -x 'string("7223")' file.xml xmlstarlet ed --inplace -u '/task-arguments/argument[@name="username"]/@default-value' -x 'string("test")' file.xml


2

Handbrake seems like a suitable solution for your needs if you want to transcode the movies and make them smaller in size. You should be able to install it from Ubuntu's Software Center or you can install it from the terminal by typing the following (if sudo asks for a password enter the one of the user you're currently logged in with): sudo apt-get update ...


1

Of course. I never even have to use "sudo" with using "scp". Mind though: as with all remote copy-ing the servers need to be setup to allow it. You can even use "scp" without having to use a user and without providing a password if you want.


1

Try using xdg-open (its full path is /usr/bin/xdg-open and it should be installed by default; no need to install it manually). xdg-open is a program that "opens a file or URL in the user's preferred application. If a URL is provided the URL will be opened in the user's preferred web browser. If a file is provided the file will be opened in the preferred ...


1

The default PDF viewer in Ubuntu is Evince. This is located in /usr/bin. So go there and select evince. Then XFE will open PDF files as normal.


1

As the first comment said, without a view of your "file.txt" it is tough to know for sure we are getting this right. My first thought was why don't you take the easy road? The >> will append, so create the one thing, add the rest. cat file.txt | grep 'Values a' | cut -d' ' -f9 > a.csv cat file.txt | grep 'Values b' | cut -d' ' -f9 >> a.csv cat ...


1

You could use paste paste -d, {a..d}.csv > all.csv or (skipping the intermediate files by using process substitution) paste -d, <(grep 'Values a' file.txt | cut -d' ' -f9) <(grep 'Values b' file.txt | cut -d' ' -f9) <(grep 'Values c' file.txt | cut -d' ' -f9) <(grep 'Values d' file.txt | cut -d' ' -f9) There are likely more efficient and ...


1

This is definitely possible. First, change /db-data's group to app-data: sudo chgrp -R app-data /db-data Now set up the permissions: sudo chmod -R g+rwx /db-data sudo chmod -R g-w /db-data/archived-data/* sudo find /db-data/archived-data -type d -exec 'chmod' 'g+rwx' '{}' ';' sudo chmod -R g+rwx /db-data gives app-data full permissions to /db-data and ...


1

To run an operation such as apt-get update or apt-get install, or even something with dpkg -i etc (I assume you are running one of these or similar), you need to use sudo and run the commands with root privileges. For security reasons normal users do not have such privileges but can use root to gain them for the purpose of executing a certain command. To ...


1

I also recommend FSearch https://github.com/cboxdoerfer/fsearch I found that it index my files faster than ANGRYsearch. However searching for files feels smooth with ANGRYsearch. Recrawling is faster with ANGRYsearch. So overall ANGRYsearch feels better. FSearch is just in PreAlpha according to git page. So future release may improve it. Compiling was ...


1

I am going for the desktop search feature of the kde plasma. I guess the following is possible ... balooctl config set contentIndexing no


1

Here is something , that I found was easier to do instead of opening terminal. Right-Click the file and open properties. Then switch to the permissions tab. Then wherever it says Access: change it from whatever it is to Create And Delete Files. This should remove the lock and then you can delete the file normally.


1

Download the tiptoi manager from tiptoi.com Extract the files from install.exe to any directory {~/tiptoi/} Go to {~/tiptoi/}application/ In terminal: java -jar tiptoi-x.x.x-jar-with-dependencies.jar or Nemo: right click on jar file > open with java Enjoy


1

How about using fallocate, this tool allows us to preallocate space for a file (if the filesystem supports this feature). For example, allocating 5GB of data to a file called 'example', one can do: fallocate -l 5G example This is much faster than dd, and will allocate the space very rapidly.



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