Recent content by samuel tarcin

  1. samuel tarcin

    Remove older backups like 1 month

    Find command is very useful option here. You can search for files older then 1 month and delete them with -delete option. $ find /tmp -mtime +7 -type f -name '*.tmp' -delete https://www.poftut.com/how-to-remove-files-older-than-1-day-1-week-1-month-recursively/
  2. samuel tarcin

    ubuntu and raspbian!

    Welcome to the nicest forum in the internet
  3. samuel tarcin

    Opened File Accessor

    There are a lot different ways to a process which is using given file. But fuser command can be used to list users who is using give n files. Fuser /home/john/test.txt will list processes wich opened test.txt file . for more details: https://www.poftut.com/use-fuser-match-user-process/
  4. samuel tarcin

    File Permission of The Sh Files

    Best way is using find command with the -exec option where you can use chmod. $ find /my/bashfiles/ -type d -name *.c -exec chmod 770 {} \; read below: https://www.poftut.com/set-permission-folders-subfolders-linux/
  5. samuel tarcin

    Change your file manager

    Hi,CptCharis Install another filemanager and choose it as standart application for files.
  6. samuel tarcin

    Bash User Input

    Hi, You can use read command in bash where input will be set into a bash variable. Read -p "What is your age" age in this example the user input value will be set into age. Referance: https://www.poftut.com/prompt-input-bash/
  7. samuel tarcin

    SCP Escape path

    You can use thre backslash or \\\ while specifying the path. scp my.cfg [email protected]:/home/samuel/test\\\ 2/ referance :https://www.poftut.com/linux-scp-command-usage-with-examples/
  8. samuel tarcin

    How can I find suid files In Linux?

    You can use following command which can be used to list suid enabled files. $ find / -perm /u=s reference: https://www.poftut.com/linux-find-command-with-examples/
  9. samuel tarcin

    Exclude unwanted string from Linux grep

    There are different ways to exclude and grep given a text file or input stream. I generally prefer the most basic one where use two grep where the first one is for exclude with -v option and pipe to second one where I grep for my string. grep -v 'able' config.txt | grep 'system' For more...
  10. samuel tarcin

    How Can I Define Multiline String In Python

    Well. You can use triple quotes in order to define multi line string like sss='''This is a string''' For more information look https://www.poftut.com/python-string-variable-type/
  11. samuel tarcin

    List Linux KVM VM IP Address ?

    First I want to conguraluce you because using Linux KVM is very technical issue. #!/bin/bash VMNAME=$1 for mac in `sudo virsh domiflist $VMNAME |grep -o -E "([0-9a-f]{2}:){5}([0-9a-f]{2})"` ; do arp -e | grep $mac | grep -o -P "^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}" ; done For more information...
  12. samuel tarcin

    Pip ffi.h Gcc Error ?

    There may be different causes for this issue but installing libffi development library will solve your problem. sudo apt install libffi-dev for Ubuntu. For others look followin link https://www.poftut.com/pip-ffi-h-gcc-error/
  13. samuel tarcin

    How can I add Linux SSH keys ?

    Hi, Well. There are different ways to accomplish that but you can use following command. ssh-copy-id [email protected] Reference https://www.poftut.com/how-to-setup-ssh-keys/
Top