Tag Info

New answers tagged

0

Try this: find /path/to/directory -type f -name "*.encrypted" -exec truncate -s +264 {} + find will search in the /path/to/directory and all of its subdirectories for files with .encrypted extension and then run your desired truncate command over all of those found files. If you want to search for the files in entire disk: sudo find / -type f -name ...


-1

If it is a text file, you might be able to place it under quotes like so: sudo "nano /proc/device-tree" Or if that doesn't work, try first sudo -i and then nano /proc/device-tree/


0

This is how S/Mime works, it enc/sign a mail, and sends it as an attachment. Thunderbird and Evolution mail clients are both famous clients that are able to show s/mime attachments. Also there are good informations on this question How to obtain a S/MIME certificate for e-mail encryption?


0

You’ll need rootly powers use sudo for that. Try this: you can use gdb (GNU Debugger) running as root to manipulate contents of memory. These may interest you: http://sourceware.org/gdb/current/onlinedocs/gdb/ http://stackoverflow.com/questions/3305164/how-to-modify-memory-contents-using-gdb


4

Basically when you delete a file ("empty the trash") the index entry to the file is deleted, but the file information is not scrubbed off the disk. As explained here. This is because in Unix file systems, files are indexed by a number, called the inode, and each inode has several attributes associated with it, like permissions, name, etc. When you ...


0

Your stop script does not define port (check the start script, that one does, and this is missing). So when you run the screen -S $port -X quit command, it looks like ($port is not defined so it results in a blank string): screen -S -X quit Screen interprets this as "set the session name to -X, then run the quit command inside a shell". If you had the ...


2

You can use grep to extract the IP addresses, and sort + uniq to count the number of hits: grep -Po '^\d+(\.\d+){3}' filename | sort | uniq -c grep is used to search for text matching a regular expression -o prints only the text that matched the expression, and not the entire line -P enables Perl-style regular expressions ^\d+(\.\d+){3} - a string that ...


1

You can try with vimdiff: vimdiff -b file1 file2


4

You can try cmp. It will compare two files byte by byte. From man cmp: cmp - compare two files byte by byte Although the number of lines must be equals on two files. Also note that cmp will point to the first difference only, to point to the next differences you can skip specific bytes from the start. $ cat foo this is a test $ cat bar this is a test ...


1

In vim, if you type ":e ." (without the quotes), it will bring up the netrw file browser. You can select and open files from there. If you type "i" (without quotes), it will cycle through various views of the directory, including a simple "tree" file browser. Type ":help netrw" for details.


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.) ...


0

This answer is based on an edit by the user to their own question. They should still answer when they can. Run an e2fsck -v /dev/device (replace /dev/device with the actual device path), and it can probably fix the issue.


0

The lock symbol means your user currently have no write permission on the file/folder. To change this: Check the current owner/group/permissions status by right clicking the file/folder, clicking Properties and then switching to the Permissions tab. Open a Terminal by hitting Ctrl+Alt+t. If you are the Owner of the file (i.e. the Owner field shows your ...


0

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


0

Try the following: launch Terminal and enter sudo rm -rf '/path/to/locked/folder' And be VERY careful with the path to folder!


0

Temporary files are usually stored in /tmp, and that's the case even for Archive Manager. Anyway it's not a good practice to batch remove them, since running applications might be using the folder to store temporary files necessary to their current instance to run (as it's the case for Archive Manager), and removing them could break the current instance. So ...


0

You can try to clean file-roller temporal folders with this command: rm -r ~/.cache/.fr-* The above command will delete all the file-roller temporary folders that can remain. Be careful and copy/paste! A typo can be fatal for your data! The temporary folders of file-roller (it creates one for each archiver while contents are open) are stored in ...


0

All of your files will be save in your /home directory. One great thing about linux is that any folder in in the directory tree can be on an separate drive rather than on the same drives as the root directory. So to have your files on your HDD and your documents on your SDD you need to mount your HDD at \home when you boot. The easiest way to do this is to ...


5

I think that the correct code may be this: #!/bin/bash function count() { word_count=$(wc -w < "$FILE") zenity --info --title="Word Counted" --text="Counted words $word_count" } function choose() { FILE="$(zenity --file-selection --title='Select a File')" case $? in 0) count;; 1) zenity ...


6

In order to save the output of a command in a variable, you must enclose the command in backtics (`command`) or, better, in $() ($(command)). You are using single quotes which means that you are saving the string wc $FILE and not actually running wc: $ foo='wc /etc/fstab' ## WRONG $ echo $foo wc /etc/fstab $ foo=`wc /etc/fstab` ## RIGHT $ echo $foo 23 96 ...


0

If it is connecting your Phone to Laptop, then, try the following: Goto Dash, and Type Disks and open it. If you can see your Phone Connected to it, then, select it, goto options and Mount it. Edit : If The Laptop detects it, then only you can connect with it.


1

You can use the same command or mogrify as you've said, just by adding a bit of bash. find $HOME/PDF_Lib -iname '*.pdf' | while read pdf; do ps2pdf -dPDFSETTINGS=/ebook "$pdf" "${pdf:0:(-4)}_new.pdf"; done OR find $HOME/PDF_Lib -iname '*.pdf' | while read pdf; do mogrify -resample 150 -compress JPEG -quality 80 "$pdf"; done


0

as I understand it, you have a text file with the files with the complete path. there are two possibilities: your list has the filenames separated by newlines, i.e. each line has the complete path to a file. in this case: here is a simple way out: for i in $(cat listOfFiles.txt); do rm -f $i done if your list has one or more lines of filenames ...


0

You don't compile an header file (altough it's possible to do so), you compile a source file which might include some header files, but whether the required header files have been included in the source file it's not (or shouldn't be) something up to you, it's something up to the developer: if program.c has been written correctly, it will list its needed ...


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 ...


0

Ok, let's see this one -rw-r--r-- First 3 symbols are user permissions: -rw = read and write, Next 3 symbols are group permissions : -r- = read only Next 3 symbols are other permissions : -r- = read only Last symbol is a sticky bit, in above case it's unset. Note: x stands for execute permission, basically someone is allowed to run a program.


0

cd in to the directory which contains your file and run : ll check this link for more details :permission Hope this'll help you.


0

Although the below script produces error with meta-characters, the rm command eventually will locate the file and remove it. Trying to create a script which escapes special characters is kind of useless, because the rm command does not take the modified input (with special characters escaped) as literal therefore it escapes the added backlashes any way ...


5

Through python. import sys import os fil = sys.argv[1] with open(fil) as f: for line in f: os.remove(line.rstrip('\n')) Save the above script in a file named like script.py and then execute the script by firing the below command on terminal. python3 script.py file file is an input file where the path of the files you actually want to remove ...


2

Another way to do this: You can 'prepare' the file by making it a shell script: $ sed -E "s/^(.*)$/rm '\1'/" input_file rm 'file1' rm 'file2' rm 'file with some spaces.ext' If your filenames may have a single quote ('), you can use this slightly expanded version to escape them first: $ sed -E "s/'/'\\\''; s/^(.*)$/rm '\1'/" input_file rm 'file1' rm ...


2

Silly, but here is one: tar -cvf /dev/null --remove-files -T filename


9

Here's one way that can deal with file names with whitespace, backslashes and other strange characters: while read -r file; do rm -- "$file"; done < list.txt That will read each line of list.txt, save it as $file and run rm on it. The -r ensures that backslashes are read literally (so that \t matches a \ and a t and not a TAB). The -- ensures that it ...


0

if you are copying as the root user (sudo cp -r ~/Downloads/wallpap/ /usr/share/backgrounds/) then you'll have to change the permissions: sudo chown -R username /usr/share/backgrounds/wallpap/ Hope this'll help you


14

Use xargs: xargs rm < file # or xargs -a file rm But that will not work if the file names/paths contain characters that should be escaped. If your filenames don't have newlines, you can do: tr '\n' '\0' < file | xargs -0 rm # or xargs -a file -I{} rm {} Alternatively, you can create the following script: #!/bin/bash if [ -z "$1" ]; then ...


1

You can use the 'touch' utility to change the file date/time. From the command line interface, short version explanation: $ touch --help For long version explanation: $ info coreutils 'touch invocation' To display the contents of a directory, sorted by date: $ ls -lS


0

There is something known as the hash value for each file. If you modify the file, the hash value will not be the same. You can check the md5sum hash value of a file. cd in to the directory which contains your file and type the following command: md5sum <filename> Hope this'll help.


0

It seems you are missing some corresponding libraries for the platform the game was compiled for. What distribution do you use? I'm asking because on Ubuntu 12.04 you could simply install the i386-libraries with sudo apt-get install ia32-libs On 14.04 LTS you have to do something like: sudo -i cd /etc/apt/sources.list.d echo "deb ...


0

are you running a 64 bit platform of linux as this is a 64 bit app? i downloaded chmoded the file like so chmod +x ToF_Beta2.065_linux64.bin then i ran like this ./ToF_Beta2.065_linux64.bin and it run perfect :) but im 64 bit ubuntu hope this helps


0

if you chmod it +x you can also try sh programname


0

It appears 7zip doesn't support multi-volume ZIP archives. Igor Pavlov states it in this forum thread


1

Maybe the files permissions are not correctly set. Run the following to reset permissions to default (644 for files and 755 for directories): sudo find /usr/share/backgrounds/ -type f -exec chmod 644 {} + sudo find /usr/share/backgrounds/ -type d -exec chmod 755 {} +


0

Here you can access all the iso's directly: http://cdimage.ubuntu.com/


1

you would do a timestamp like this (then your file name would always be unique): alias record="ffmpeg -f alsa -ac 2 -i default -f x11grab -r 15 -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -s 1440x900 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -threads 0 /home/brian/test$(/bin/date +%Y%m%d%H%M%S).avi" That would be ...


0

All files and directories except those in your home folder are owned by root, which is the "god"-user on your system. That you have an administrative account does just mean that you have the privilege to get root rights by using sudo for terminal programs or gksu/gksudo/pkexec for GUI programs. So to have full access on the folders that are not your home, ...


0

I have found WinSCP to be the best tool for a Windows desktop or server interacting with a Linux environment. You need to install ssh on the Linux environment first for WinSCP to work.


2

p7m is an encryption format that is often used for email attachments. I was also not able to find a Linux tool that is able to open that file type after a quick google research. However, there exist some tools for Windows (e.g. Cryptigo p7mViewer) or OSX. What you could try if you have no access to a computer running Windows/OSX is to install the Windows ...


1

Ctrl+S, then any regular expression. Sources: 1, 2



Top 50 recent answers are included